From 931ad9b84e75faf734ddff19b692481013260f6e Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 23 Jun 2024 10:44:24 -0700 Subject: InstructionTextBuffer is only present with alloc (new crate flag) --- test/long_mode/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/long_mode') 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", -- cgit v1.1