Skip to content

Commit ed52c7b

Browse files
committed
test(static inlined): pretty print the diff
Issue: rust-langGH-1090
1 parent 50077c5 commit ed52c7b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

bindgen-tests/tests/tests.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,24 @@ fn test_extern_generated_headers() {
742742
let actual_h = fs::read_to_string(generated_path.join("extern.h"))
743743
.expect("Could not read actual extern.h");
744744

745-
assert_eq!(expected_c, actual_c);
746-
assert_eq!(expected_h, actual_h);
745+
if expected_c != actual_c {
746+
error_diff_mismatch(
747+
&actual_c,
748+
&expected_c,
749+
None,
750+
Path::new(expect_path.join("extern.c").to_str().unwrap()),
751+
)
752+
.unwrap();
753+
}
754+
755+
if expected_h != actual_h {
756+
error_diff_mismatch(
757+
&actual_h,
758+
&expected_h,
759+
None,
760+
Path::new(expect_path.join("extern.h").to_str().unwrap()),
761+
)
762+
.unwrap();
763+
}
747764

748765
}

0 commit comments

Comments
 (0)