diff options
author | iximeow <me@iximeow.net> | 2024-06-18 11:10:59 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-06-18 11:45:17 -0700 |
commit | 0e99d946eee3398d5629d6f29f8bf7387643795a (patch) | |
tree | 6b163d010996d958a51d8330dcfedfa660276b36 /test | |
parent | 1f18a960a5826ce38e2f758b9160df260d120cfc (diff) |
enough infratructure to avoid bounds checks, at incredible user cost
Diffstat (limited to 'test')
-rw-r--r-- | test/long_mode/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
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") } |