From 7013a3e0a04e77063a990a7a7c61a22523b82f41 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 12 Jul 2017 14:40:25 +0100 Subject: [PATCH] Init testing --- src/main.rs | 3 +++ src/tests/args.rs | 6 ++++++ src/tests/mod.rs | 1 + 3 files changed, 10 insertions(+) create mode 100644 src/tests/args.rs create mode 100644 src/tests/mod.rs diff --git a/src/main.rs b/src/main.rs index c923d7c..b5f6af7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,9 @@ extern crate clap; mod args; +#[cfg(test)] +mod tests; + fn main() { let matches = args::get_matches(); } diff --git a/src/tests/args.rs b/src/tests/args.rs new file mode 100644 index 0000000..2a034ec --- /dev/null +++ b/src/tests/args.rs @@ -0,0 +1,6 @@ +use args; + +#[test] +fn it_works() { + assert_eq!(4, 4); +} diff --git a/src/tests/mod.rs b/src/tests/mod.rs new file mode 100644 index 0000000..6e10f4a --- /dev/null +++ b/src/tests/mod.rs @@ -0,0 +1 @@ +pub mod args;