From 0e99d946eee3398d5629d6f29f8bf7387643795a Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 18 Jun 2024 11:10:59 -0700 Subject: enough infratructure to avoid bounds checks, at incredible user cost --- test/long_mode/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 21b92e6..8b01461 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -62,9 +62,14 @@ fn test_display_under(decoder: &InstDecoder, data: &[u8], expected: &'static str text, expected ); - /* - let mut text2 = String::new(); - instr.write_2(&mut text2); + let mut text2 = yaxpeax_x86::long_mode::BigEnoughString::new(); + let mut out = yaxpeax_x86::long_mode::NoColorsSink { + out: &mut text2, + }; + instr.write_to(&mut out); + core::mem::drop(out); + let text2 = text2.into_inner(); + assert!( text2 == text, "display error for {}:\n decoded: {:?} under decoder {}\n displayed: {}\n expected: {}\n", @@ -74,7 +79,6 @@ fn test_display_under(decoder: &InstDecoder, data: &[u8], expected: &'static str text2, text, ); - */ } else { eprintln!("non-fmt build cannot compare text equality") } -- cgit v1.1