We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_integer_from_lua
1 parent 7957c68 commit 82db24bCopy full SHA for 82db24b
tests/conversion.rs
@@ -183,7 +183,10 @@ fn test_integer_from_lua() -> Result<()> {
183
184
// Out of range
185
let err = f.call::<i32>(i64::MAX).err().unwrap().to_string();
186
+ #[cfg(any(feature = "lua51", feature = "luau", feature = "luajit"))]
187
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)"));
190
191
// Should fallback to default conversion
192
assert_eq!(f.call::<i32>("42")?, 42);
0 commit comments