From 77d7b89bba46663732ecb16413e3c48abb6afe94 Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Fri, 12 Sep 2025 13:51:42 +0300 Subject: [PATCH 1/2] Update unit testing output for additional test https://github.com/rust-lang/rust-by-example/commit/7898fcf62a75ba22d63f1d15a092c04cfb0495dd#diff-aa011c62f1a0a519ca875c43c358d6084f87256a4a3ff354d4b0a7eef807e27dR158 added a new test but forgot to update the total number of tests to run. --- src/testing/unit_testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testing/unit_testing.md b/src/testing/unit_testing.md index 859647ca2d..d0d78a385d 100644 --- a/src/testing/unit_testing.md +++ b/src/testing/unit_testing.md @@ -155,7 +155,7 @@ Running these tests gives us: ```shell $ cargo test -running 3 tests +running 4 tests test tests::test_any_panic ... ok test tests::test_divide ... ok test tests::test_specific_panic ... ok From 555891062a70421752f1592f42e27026b389050c Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Fri, 12 Sep 2025 13:55:50 +0300 Subject: [PATCH 2/2] Update some more obsolete values of the number of executed and filtered tests --- src/testing/unit_testing.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/testing/unit_testing.md b/src/testing/unit_testing.md index d0d78a385d..55a686e1e7 100644 --- a/src/testing/unit_testing.md +++ b/src/testing/unit_testing.md @@ -179,7 +179,7 @@ $ cargo test test_any_panic running 1 test test tests::test_any_panic ... ok -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 3 filtered out Doc-tests tmp-test-should-panic @@ -193,11 +193,12 @@ tests that should be run. ```shell $ cargo test panic -running 2 tests +running 3 tests test tests::test_any_panic ... ok test tests::test_specific_panic ... ok +test tests::test_specific_panic_shorthand ... ok -test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out +test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out Doc-tests tmp-test-should-panic