Skip to content

Commit e79227d

Browse files
authored
Update tests1.rs
1 parent 66f33ff commit e79227d

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

exercises/tests/tests1.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
// tests1.rs
2-
//
3-
// Tests are important to ensure that your code does what you think it should
4-
// do. Tests can be run on this file with the following command: rustlings run
5-
// tests1
6-
//
7-
// This test has a problem with it -- make the test compile! Make the test pass!
8-
// Make the test fail!
9-
//
10-
// Execute `rustlings hint tests1` or use the `hint` watch subcommand for a
11-
// hint.
12-
13-
// I AM NOT DONE
14-
151
#[cfg(test)]
162
mod tests {
173
#[test]
184
fn you_can_assert() {
19-
assert!();
5+
// 1. 先让测试编译并通过:assert! 接收一个布尔值,传入true即可
6+
// assert!(true);
7+
8+
// 2. 让测试失败:传入false(取消注释下面这行,注释上面的true)
9+
assert!(false);
2010
}
2111
}

0 commit comments

Comments
 (0)