From 8df80203b8030c96c60fdf6fcb3f16bda83df5fd Mon Sep 17 00:00:00 2001 From: Minseong Jang Date: Mon, 13 Feb 2023 15:09:31 +0900 Subject: [PATCH] Update assertion message --- src/irgen/mod.rs | 2 +- src/tests.rs | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/irgen/mod.rs b/src/irgen/mod.rs index 041e78c..9cca9ea 100644 --- a/src/irgen/mod.rs +++ b/src/irgen/mod.rs @@ -635,7 +635,7 @@ impl IrgenFunc<'_> { /// %b0:i1:unit = store %b0:p1:i32 %l1:i32* /// %b0:i2:unit = store %b0:p2:i32 %l2:i32* /// ``` - /// + /// /// In particular, note that it is added to the local allocation list and store them to the /// initial phinodes. /// diff --git a/src/tests.rs b/src/tests.rs index 1bac2ec..b7522aa 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -186,7 +186,7 @@ pub fn test_irgen(path: &Path) { // size. For this reason, we make `fuzzer` generate the C source code which returns values // typecasted to `unsigned char`. However, during `creduce` to reduce the code, typecasting may // be nullified. So, we truncate the result value to byte size one more time here. - println!("clang: {}, kecc: {}", status as u8, value as u8); + println!("clang (expected): {}, kecc: {}", status as u8, value as u8); assert_eq!(status as u8, value as u8); } @@ -371,7 +371,10 @@ pub fn test_asmgen(path: &Path) { drop(buffer); temp_dir.close().expect("temp dir deletion failed"); - println!("kecc interp: {}, qemu: {}", value as u8, qemu_status as u8); + println!( + "kecc interp (expected): {}, qemu: {}", + value as u8, qemu_status as u8 + ); assert_eq!(value as u8, qemu_status as u8); } @@ -463,7 +466,7 @@ pub fn test_end_to_end(path: &Path) { // typecasted to `unsigned char`. However, during `creduce` to reduce the code, typecasting may // be nullified. So, we truncate the result value to byte size one more time here. println!( - "clang: {}, kecc interp: {}", + "clang (expected): {}, kecc interp: {}", clang_status as u8, value as u8 ); assert_eq!(clang_status as u8, value as u8); @@ -531,6 +534,9 @@ pub fn test_end_to_end(path: &Path) { drop(buffer); temp_dir.close().expect("temp dir deletion failed"); - println!("clang: {}, qemu: {}", clang_status as u8, qemu_status as u8); + println!( + "clang (expected): {}, qemu: {}", + clang_status as u8, qemu_status as u8 + ); assert_eq!(clang_status as u8, qemu_status as u8); }