We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e79227d commit 7c0626aCopy full SHA for 7c0626a
exercises/tests/tests2.rs
@@ -1,17 +1,11 @@
1
-// tests2.rs
2
-//
3
-// This test has a problem with it -- make the test compile! Make the test pass!
4
-// Make the test fail!
5
6
-// Execute `rustlings hint tests2` or use the `hint` watch subcommand for a
7
-// hint.
8
-
9
-// I AM NOT DONE
10
11
#[cfg(test)]
12
mod tests {
13
#[test]
14
fn you_can_assert_eq() {
15
- assert_eq!();
+ // 1. 让测试编译并通过:assert_eq! 需要两个相等的参数
+ // assert_eq!(42, 42);
+
+ // 2. 让测试编译但失败:传入两个不相等的参数(取消注释下面这行,注释上面的)
+ assert_eq!(42, 13);
16
}
17
0 commit comments