mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
15 lines
280 B
Rust
15 lines
280 B
Rust
#[warn(clippy::eq_op)]
|
|
#[test]
|
|
fn eq_op_shouldnt_trigger_in_tests() {
|
|
let a = 1;
|
|
let result = a + 1 == 1 + a;
|
|
assert!(result);
|
|
}
|
|
|
|
#[test]
|
|
fn eq_op_macros_shouldnt_trigger_in_tests() {
|
|
let a = 1;
|
|
let b = 2;
|
|
assert_eq!(a, a);
|
|
assert_eq!(a + b, b + a);
|
|
}
|