diff options
| author | liv <liv@fastmail.com> | 2019-01-09 21:47:50 +0100 |
|---|---|---|
| committer | liv <liv@fastmail.com> | 2019-01-09 21:47:50 +0100 |
| commit | 17e12433cbe0174fe93196a43953af95ccb71dae (patch) | |
| tree | c727bd8db1c0bf39bdcc5862d9afabf239b3dca2 | |
| parent | b90f642029568dc4260601693f2e13cd41637048 (diff) | |
add a test
| -rw-r--r-- | exercises/test1.rs | 15 | ||||
| -rw-r--r-- | src/verify.rs | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/exercises/test1.rs b/exercises/test1.rs new file mode 100644 index 0000000..6d7a2e8 --- /dev/null +++ b/exercises/test1.rs @@ -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()); +} diff --git a/src/verify.rs b/src/verify.rs index b396dc0..5e5108c 100644 --- a/src/verify.rs +++ b/src/verify.rs @@ -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")?; |
