add a test

This commit is contained in:
liv 2019-01-09 21:47:50 +01:00
parent b90f642029
commit 17e12433cb
2 changed files with 16 additions and 0 deletions

15
exercises/test1.rs Normal file
View File

@ -0,0 +1,15 @@
// test1.rs
// Make me compile! Scroll down for hints :)
fn something() -> [f32; 120] {
???
}
fn something_else() -> String {
???
}
fn main() {
println!("This array is {} items long, and it should be 120", something().len());
println!("This function returns a string: {}", something_else());
}

View File

@ -19,6 +19,7 @@ pub fn verify() -> Result<(), ()> {
compile_only("exercises/primitive_types/primitive_types4.rs")?;
compile_only("exercises/primitive_types/primitive_types5.rs")?;
compile_only("exercises/primitive_types/primitive_types6.rs")?;
compile_only("exercises/test1.rs")?;
test("exercises/tests/tests1.rs")?;
test("exercises/tests/tests2.rs")?;
test("exercises/tests/tests3.rs")?;