Merge 53fa6d73311d57b4071c130eac279590bd6d03ba into 37cbcd9049627653a46f3a90d0d5dd5468464e1c

This commit is contained in:
Zakir Jiwani 2026-03-26 17:36:27 +08:00 committed by GitHub
commit 58580c2f4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 1 deletions

View File

@ -14,3 +14,13 @@ mod sausage_factory {
fn main() { fn main() {
sausage_factory::make_sausage(); sausage_factory::make_sausage();
} }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_make_sausage() {
sausage_factory::make_sausage();
}
}

View File

@ -517,7 +517,7 @@ because "blue" is `&str`, not `String`."""
[[exercises]] [[exercises]]
name = "modules1" name = "modules1"
dir = "10_modules" dir = "10_modules"
test = false test = true
hint = """ hint = """
Everything is private in Rust by default. But there's a keyword we can use Everything is private in Rust by default. But there's a keyword we can use
to make something public!""" to make something public!"""

View File

@ -13,3 +13,13 @@ mod sausage_factory {
fn main() { fn main() {
sausage_factory::make_sausage(); sausage_factory::make_sausage();
} }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_make_sausage() {
sausage_factory::make_sausage();
}
}