Skip to content

Commit 1c6b6ad

Browse files
committed
Fix tests
1 parent 031854f commit 1c6b6ad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/hooks.rs

+12
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,21 @@ fn test_function_calls() -> Result<()> {
7575

7676
let output = output.lock().unwrap();
7777
if cfg!(feature = "luajit") && lua.load("jit.version_num").eval::<i64>()? >= 20100 {
78+
#[cfg(not(force_memory_limit))]
7879
assert_eq!(*output, vec![(None, "main"), (Some("len".to_string()), "Lua")]);
80+
#[cfg(force_memory_limit)]
81+
assert_eq!(
82+
*output,
83+
vec![(None, "C"), (None, "main"), (Some("len".to_string()), "Lua")]
84+
);
7985
} else {
86+
#[cfg(not(force_memory_limit))]
8087
assert_eq!(*output, vec![(None, "main"), (Some("len".to_string()), "C")]);
88+
#[cfg(force_memory_limit)]
89+
assert_eq!(
90+
*output,
91+
vec![(None, "C"), (None, "main"), (Some("len".to_string()), "C")]
92+
);
8193
}
8294

8395
Ok(())

0 commit comments

Comments
 (0)