Skip to content

Commit

Permalink
Improve debuggability for compiler error tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Dec 14, 2020
1 parent 00121f5 commit c41d5d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/tests/compile_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ fn test_compile_errors(fixture_file: &str, expected_error: &str) {
.expect("Unable to read fixture file");

match fe_compiler::evm::compile(&src, CompileStage::AllUpToBytecode) {
Err(compile_error) => assert!(format!("{}", compile_error).contains(expected_error)),
Err(compile_error) => assert!(
format!("{}", compile_error).contains(expected_error),
format!("{} did not contain {}", compile_error, expected_error)
),
_ => panic!(
"Compiling succeeded when it was expected to fail with: {}",
expected_error
Expand Down

0 comments on commit c41d5d0

Please sign in to comment.