Skip to content

Commit 17e1243

Browse files
author
liv
committed
add a test
1 parent b90f642 commit 17e1243

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

exercises/test1.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// test1.rs
2+
// Make me compile! Scroll down for hints :)
3+
4+
fn something() -> [f32; 120] {
5+
???
6+
}
7+
8+
fn something_else() -> String {
9+
???
10+
}
11+
12+
fn main() {
13+
println!("This array is {} items long, and it should be 120", something().len());
14+
println!("This function returns a string: {}", something_else());
15+
}

src/verify.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub fn verify() -> Result<(), ()> {
1919
compile_only("exercises/primitive_types/primitive_types4.rs")?;
2020
compile_only("exercises/primitive_types/primitive_types5.rs")?;
2121
compile_only("exercises/primitive_types/primitive_types6.rs")?;
22+
compile_only("exercises/test1.rs")?;
2223
test("exercises/tests/tests1.rs")?;
2324
test("exercises/tests/tests2.rs")?;
2425
test("exercises/tests/tests3.rs")?;

0 commit comments

Comments
 (0)