aboutsummaryrefslogtreecommitdiff
path: root/test/long_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-23 10:44:24 -0700
committeriximeow <me@iximeow.net>2024-06-23 10:44:24 -0700
commit931ad9b84e75faf734ddff19b692481013260f6e (patch)
tree381ef4deb26ed5e728f378e99f2ea11426be45d4 /test/long_mode/mod.rs
parent4c1f3c84bdba53c514713fbaaf00431efd60d21c (diff)
InstructionTextBuffer is only present with alloc (new crate flag)
Diffstat (limited to 'test/long_mode/mod.rs')
-rw-r--r--test/long_mode/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs
index 6c666e1..d8cb0ef 100644
--- a/test/long_mode/mod.rs
+++ b/test/long_mode/mod.rs
@@ -92,9 +92,12 @@ fn test_display_under(decoder: &InstDecoder, data: &[u8], expected: &'static str
text,
);
+ #[cfg(feature="alloc")]
let mut formatter = yaxpeax_x86::long_mode::InstructionTextBuffer::new();
+ #[cfg(feature="alloc")]
let text3 = formatter.format_inst(&instr.display_with(yaxpeax_x86::long_mode::DisplayStyle::Intel)).expect("printing succeeds");
+ #[cfg(feature="alloc")]
assert!(
text3 == text,
"display error through InstructionTextBuffer for {}:\n decoded: {:?} under decoder {}\n displayed: {}\n expected: {}\n",