From 23b5bc4bd9c2a9333073938d529bd556bc0b2808 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 18 Sep 2020 12:31:41 +0800 Subject: [PATCH] Prevent errors when using alternative error printout style. --- codegen/src/test/function.rs | 4 +++- codegen/src/test/module.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/codegen/src/test/function.rs b/codegen/src/test/function.rs index a4a54959..31797438 100644 --- a/codegen/src/test/function.rs +++ b/codegen/src/test/function.rs @@ -245,7 +245,6 @@ mod generate_tests { false } }); - eprintln!("actual != expected, diverge at char {}", counter); /* let (actual_diff, expected_diff) = { let mut actual_diff = String::new(); @@ -256,6 +255,9 @@ mod generate_tests { } (actual_diff, expected_diff) }; + */ + eprintln!("actual != expected, diverge at char {}", counter); + /* eprintln!(" actual: {}", actual_diff); eprintln!("expected: {}", expected_diff); assert!(false); diff --git a/codegen/src/test/module.rs b/codegen/src/test/module.rs index b560e94b..4d71f296 100644 --- a/codegen/src/test/module.rs +++ b/codegen/src/test/module.rs @@ -226,7 +226,6 @@ mod generate_tests { false } }); - eprintln!("actual != expected, diverge at char {}", counter); /* let (actual_diff, expected_diff) = { let mut actual_diff = String::new(); @@ -237,6 +236,9 @@ mod generate_tests { } (actual_diff, expected_diff) }; + */ + eprintln!("actual != expected, diverge at char {}", counter); + /* eprintln!(" actual: {}", actual_diff); eprintln!("expected: {}", expected_diff); assert!(false);