Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/compile_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn do_test(data: &[u8]) {
let output = desc.to_string();
if let Ok(desc) = DummyScript::from_str(&output) {
let rtt = desc.to_string();
assert_eq!(output, rtt);
assert_eq!(output.to_lowercase(), rtt.to_lowercase());
} else {
panic!("compiler output something unparseable: {}", output)
}
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/roundtrip_concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn do_test(data: &[u8]) {
let re = Regex::new("(\\D)1@").unwrap();
let output = re.replace_all(&output, "$1");
let data_str = re.replace_all(&data_str, "$1");
assert_eq!(data_str, output);
assert_eq!(data_str.to_lowercase(), output.to_lowercase());
}
}

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/roundtrip_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn do_test(data: &[u8]) {
let normalize_aliases = multi_wrap_pkh_re.replace_all(&normalize_aliases, "$1:pkh(");
let normalize_aliases = normalize_aliases.replace("c:pk_k(", "pk(").replace("c:pk_h(", "pkh(");

assert_eq!(normalize_aliases, output);
assert_eq!(normalize_aliases.to_lowercase(), output.to_lowercase());
}
}

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/roundtrip_miniscript_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn do_test(data: &[u8]) {
let normalize_aliases = multi_wrap_pkh_re.replace_all(&normalize_aliases, "$1:pkh(");
let normalize_aliases = normalize_aliases.replace("c:pk_k(", "pk(").replace("c:pk_h(", "pkh(");

assert_eq!(normalize_aliases, output);
assert_eq!(normalize_aliases.to_lowercase(), output.to_lowercase());

}
}
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/roundtrip_semantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn do_test(data: &[u8]) {
let data_str = String::from_utf8_lossy(data);
if let Ok(pol) = DummyPolicy::from_str(&data_str) {
let output = pol.to_string();
assert_eq!(data_str, output);
assert_eq!(data_str.to_lowercase(), output.to_lowercase());
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/policy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ mod tests {
fn concrete_policy_rtt(s: &str) {
let conc = ConcretePol::from_str(s).unwrap();
let output = conc.to_string();
assert_eq!(s, output);
assert_eq!(s.to_lowercase(), output.to_lowercase());
}

fn semantic_policy_rtt(s: &str) {
let sem = SemanticPol::from_str(s).unwrap();
let output = sem.to_string();
assert_eq!(s, output);
assert_eq!(s.to_lowercase(), output.to_lowercase());
}

#[test]
Expand All @@ -177,6 +177,7 @@ mod tests {
//fuzzer crashes
assert!(ConcretePol::from_str("thresh()").is_err());
assert!(SemanticPol::from_str("thresh()").is_err());
concrete_policy_rtt("ripemd160(aaaaaaaaaaaaaaaaaaaaaa0Daaaaaaaaaabaaaaa)");
}

#[test]
Expand Down