Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Dec 1, 2024
1 parent 031854f commit 1c6b6ad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,21 @@ fn test_function_calls() -> Result<()> {

let output = output.lock().unwrap();
if cfg!(feature = "luajit") && lua.load("jit.version_num").eval::<i64>()? >= 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(())
Expand Down

0 comments on commit 1c6b6ad

Please sign in to comment.