Implement assert_non_crate_hash_different for tests

This commit is contained in:
Jeremy Fitzhardinge 2021-06-10 14:01:21 -07:00
parent a26d99f348
commit 48921ce300

View File

@ -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() {