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 39cad7c00..9ecb9f933 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 ad94046cb..85ad1522f 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 9d19e6ee9..b40acd1cd 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 @@ -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();