Skip to content

Commit 48921ce

Browse files
committed
Implement assert_non_crate_hash_different for tests
1 parent a26d99f commit 48921ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler/rustc_interface/src/tests.rs

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ fn assert_different_hash(x: &Options, y: &Options) {
9696
assert_same_clone(y);
9797
}
9898

99+
fn assert_non_crate_hash_different(x: &Options, y: &Options) {
100+
assert_eq!(x.dep_tracking_hash(true), y.dep_tracking_hash(true));
101+
assert_ne!(x.dep_tracking_hash(false), y.dep_tracking_hash(false));
102+
// Check clone
103+
assert_same_clone(x);
104+
assert_same_clone(y);
105+
}
106+
99107
// When the user supplies --test we should implicitly supply --cfg test
100108
#[test]
101109
fn test_switch_implies_cfg_test() {

0 commit comments

Comments
 (0)