mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-03-31 03:29:19 +00:00
Add test for modules1 to prevent passing by commenting out main
This commit is contained in:
parent
573d5a2acd
commit
06d89d20ae
@ -14,3 +14,13 @@ mod sausage_factory {
|
||||
fn main() {
|
||||
sausage_factory::make_sausage();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_make_sausage() {
|
||||
sausage_factory::make_sausage();
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,3 +13,13 @@ mod sausage_factory {
|
||||
fn main() {
|
||||
sausage_factory::make_sausage();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_make_sausage() {
|
||||
sausage_factory::make_sausage();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user