about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jsgf@fb.com>2021-06-10 14:01:21 -0700
committerJeremy Fitzhardinge <jsgf@fb.com>2021-06-21 17:22:35 -0700
commit48921ce30095bcc356f2fe082e29edb004d1eda9 (patch)
tree7ad5da57ff58278f4eaf2ba9cb32986ffa1e233d
parenta26d99f348de873e7a7b2b9ab6e78506278c0fee (diff)
downloadrust-48921ce30095bcc356f2fe082e29edb004d1eda9.tar.gz
rust-48921ce30095bcc356f2fe082e29edb004d1eda9.zip
Implement assert_non_crate_hash_different for tests
-rw-r--r--compiler/rustc_interface/src/tests.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs
index 865c281be9c..c210865a4ad 100644
--- a/compiler/rustc_interface/src/tests.rs
+++ b/compiler/rustc_interface/src/tests.rs
@@ -96,6 +96,14 @@ fn assert_different_hash(x: &Options, y: &Options) {
     assert_same_clone(y);
 }
 
+fn assert_non_crate_hash_different(x: &Options, y: &Options) {
+    assert_eq!(x.dep_tracking_hash(true), y.dep_tracking_hash(true));
+    assert_ne!(x.dep_tracking_hash(false), y.dep_tracking_hash(false));
+    // Check clone
+    assert_same_clone(x);
+    assert_same_clone(y);
+}
+
 // When the user supplies --test we should implicitly supply --cfg test
 #[test]
 fn test_switch_implies_cfg_test() {