From 1c6b6ad80121e40845812c73128f9bcb23f620ef Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Sun, 1 Dec 2024 02:11:12 +0000 Subject: [PATCH] Fix tests --- tests/hooks.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/hooks.rs b/tests/hooks.rs index 7231bdfd..ddbfc37f 100644 --- a/tests/hooks.rs +++ b/tests/hooks.rs @@ -75,9 +75,21 @@ fn test_function_calls() -> Result<()> { let output = output.lock().unwrap(); if cfg!(feature = "luajit") && lua.load("jit.version_num").eval::()? >= 20100 { + #[cfg(not(force_memory_limit))] assert_eq!(*output, vec![(None, "main"), (Some("len".to_string()), "Lua")]); + #[cfg(force_memory_limit)] + assert_eq!( + *output, + vec![(None, "C"), (None, "main"), (Some("len".to_string()), "Lua")] + ); } else { + #[cfg(not(force_memory_limit))] assert_eq!(*output, vec![(None, "main"), (Some("len".to_string()), "C")]); + #[cfg(force_memory_limit)] + assert_eq!( + *output, + vec![(None, "C"), (None, "main"), (Some("len".to_string()), "C")] + ); } Ok(())