From efb710f1594c460826c4ae0bc15e4a0fde81e02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20=C5=9Eim=C5=9Fek?= Date: Thu, 21 Mar 2024 09:49:07 +0300 Subject: [PATCH] Adding integration_tests --- src/integration_tests/calc_test.rs | 4 ++++ src/integration_tests/mod.rs | 1 + src/lib.rs | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 src/integration_tests/calc_test.rs create mode 100644 src/integration_tests/mod.rs 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;