diff --git a/blog/content/edition-2/posts/04-testing/index.fa.md b/blog/content/edition-2/posts/04-testing/index.fa.md index 2e065c56b..a8bc545d1 100644 --- a/blog/content/edition-2/posts/04-testing/index.fa.md +++ b/blog/content/edition-2/posts/04-testing/index.fa.md @@ -77,7 +77,7 @@ error[E0463]: can't find crate for `test` #![test_runner(crate::test_runner)] #[cfg(test)] -fn test_runner(tests: &[&dyn Fn()]) { +pub fn test_runner(tests: &[&dyn Fn()]) { println!("Running {} tests", tests.len()); for test in tests { test(); diff --git a/blog/content/edition-2/posts/04-testing/index.ja.md b/blog/content/edition-2/posts/04-testing/index.ja.md index 6f8837f58..8a1d0100a 100644 --- a/blog/content/edition-2/posts/04-testing/index.ja.md +++ b/blog/content/edition-2/posts/04-testing/index.ja.md @@ -81,7 +81,7 @@ error[E0463]: can't find crate for `test` #![test_runner(crate::test_runner)] #[cfg(test)] -fn test_runner(tests: &[&dyn Fn()]) { +pub fn test_runner(tests: &[&dyn Fn()]) { println!("Running {} tests", tests.len()); for test in tests { test(); diff --git a/blog/content/edition-2/posts/04-testing/index.md b/blog/content/edition-2/posts/04-testing/index.md index 94b8d4ec6..fa34ac75b 100644 --- a/blog/content/edition-2/posts/04-testing/index.md +++ b/blog/content/edition-2/posts/04-testing/index.md @@ -73,7 +73,7 @@ To implement a custom test framework for our kernel, we add the following to our #![test_runner(crate::test_runner)] #[cfg(test)] -fn test_runner(tests: &[&dyn Fn()]) { +pub fn test_runner(tests: &[&dyn Fn()]) { println!("Running {} tests", tests.len()); for test in tests { test(); diff --git a/blog/content/edition-2/posts/04-testing/index.zh-CN.md b/blog/content/edition-2/posts/04-testing/index.zh-CN.md index a343d67a3..6471a265f 100644 --- a/blog/content/edition-2/posts/04-testing/index.zh-CN.md +++ b/blog/content/edition-2/posts/04-testing/index.zh-CN.md @@ -75,7 +75,7 @@ error[E0463]: can't find crate for `test` #![test_runner(crate::test_runner)] #[cfg(test)] -fn test_runner(tests: &[&dyn Fn()]) { +pub fn test_runner(tests: &[&dyn Fn()]) { println!("Running {} tests", tests.len()); for test in tests { test();