diff --git a/src/integration_tests/calc_test.rs b/src/integration_tests/calc_test.rs new file mode 100644 index 0000000..871724a --- /dev/null +++ b/src/integration_tests/calc_test.rs @@ -0,0 +1,4 @@ +#[test] +fn test_add_one() { + assert_eq!(crate::unit_tested_file::add_one(1), 2); +} \ No newline at end of file diff --git a/src/integration_tests/mod.rs b/src/integration_tests/mod.rs new file mode 100644 index 0000000..caed048 --- /dev/null +++ b/src/integration_tests/mod.rs @@ -0,0 +1 @@ +mod calc_test; \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index d1ffcea..664b12f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,10 @@ // mod doc_test; // todo: failed to resolve: use of undeclared crate or module `doc_test` + +#[cfg(test)] +mod integration_tests; + mod async_; mod averaged_collection; mod cfg;