Skip to content

Commit 82db24b

Browse files
committed
Update test_integer_from_lua
1 parent 7957c68 commit 82db24b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/conversion.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ fn test_integer_from_lua() -> Result<()> {
183183

184184
// Out of range
185185
let err = f.call::<i32>(i64::MAX).err().unwrap().to_string();
186+
#[cfg(any(feature = "lua51", feature = "luau", feature = "luajit"))]
186187
assert!(err.starts_with("bad argument #1: error converting Lua number to i32 (out of range)"));
188+
#[cfg(any(feature = "lua52", feature = "lua53", feature = "lua54"))]
189+
assert!(err.starts_with("bad argument #1: error converting Lua integer to i32 (out of range)"));
187190

188191
// Should fallback to default conversion
189192
assert_eq!(f.call::<i32>("42")?, 42);

0 commit comments

Comments
 (0)