Skip to content

Commit 5df92af

Browse files
committed
// tests1.rs
// // Tests are important to ensure that your code does what you think it should // do. Tests can be run on this file with the following command: rustlings run // tests1 // // This test has a problem with it -- make the test compile! Make the test pass! // Make the test fail! // // Execute `rustlings hint tests1` or use the `hint` watch subcommand for a // hint. // I AM NOT DONE #[cfg(test)] mod tests { #[test] fn you_can_assert() { assert!(true); // 传入true,测试通过 } }
1 parent d5dd2df commit 5df92af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/tests/tests1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
mod tests {
1717
#[test]
1818
fn you_can_assert() {
19-
assert!();
19+
assert!(true); // 传入true,测试通过
2020
}
2121
}

0 commit comments

Comments
 (0)