From 17e12433cbe0174fe93196a43953af95ccb71dae Mon Sep 17 00:00:00 2001 From: liv Date: Wed, 9 Jan 2019 21:47:50 +0100 Subject: [PATCH] add a test --- exercises/test1.rs | 15 +++++++++++++++ src/verify.rs | 1 + 2 files changed, 16 insertions(+) create mode 100644 exercises/test1.rs diff --git a/exercises/test1.rs b/exercises/test1.rs new file mode 100644 index 00000000..6d7a2e87 --- /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 b396dc09..5e5108c3 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")?;