summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests')
-rw-r--r--src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/common.rs3
-rw-r--r--src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/integration_test.rs6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/common.rs b/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/common.rs
new file mode 100644
index 000000000..5fb7a390a
--- /dev/null
+++ b/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/common.rs
@@ -0,0 +1,3 @@
+pub fn setup() {
+ // setup code specific to your library's tests would go here
+}
diff --git a/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/integration_test.rs b/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/integration_test.rs
new file mode 100644
index 000000000..e26fa7109
--- /dev/null
+++ b/src/doc/book/listings/ch11-writing-automated-tests/no-listing-12-shared-test-code-problem/tests/integration_test.rs
@@ -0,0 +1,6 @@
+use adder;
+
+#[test]
+fn it_adds_two() {
+ assert_eq!(4, adder::add_two(2));
+}