@@ -2168,7 +2168,7 @@ test "compile and run bytecode" {
2168
2168
try lua .loadBytecode ("..." , bc );
2169
2169
try lua .protectedCall (0 , 1 , 0 );
2170
2170
const v = try lua .toInteger (-1 );
2171
- try testing . expectEqual (@as ( i32 , 133 ) , v );
2171
+ try expectEqual (133 , v );
2172
2172
2173
2173
// Try mutable globals. Calls to mutable globals should produce longer bytecode.
2174
2174
const src2 = "Foo.print()\n Bar.print()" ;
@@ -2182,7 +2182,7 @@ test "compile and run bytecode" {
2182
2182
defer testing .allocator .free (bc2 );
2183
2183
// A really crude check for changed bytecode. Better would be to match
2184
2184
// produced bytecode in text format, but the API doesn't support it.
2185
- try testing . expect (bc1 .len < bc2 .len );
2185
+ try expect (bc1 .len < bc2 .len );
2186
2186
}
2187
2187
2188
2188
test "userdata dtor" {
@@ -2205,13 +2205,13 @@ test "userdata dtor" {
2205
2205
2206
2206
var data = lua .newUserdataDtor (Data , ziglua .wrap (Data .dtor ));
2207
2207
data .gc_hits_ptr = & gc_hits ;
2208
- try expectEqual (@as (* const anyopaque , @ptrCast (data )), try lua .toPointer (1 ));
2209
- try testing . expectEqual (@as ( i32 , 0 ) , gc_hits );
2208
+ try expectEqual (@as (* anyopaque , @ptrCast (data )), try lua .toPointer (1 ));
2209
+ try expectEqual (0 , gc_hits );
2210
2210
lua .pop (1 ); // don't let the stack hold a ref to the user data
2211
2211
lua .gcCollect ();
2212
- try testing . expectEqual (@as ( i32 , 1 ) , gc_hits );
2212
+ try expectEqual (1 , gc_hits );
2213
2213
lua .gcCollect ();
2214
- try testing . expectEqual (@as ( i32 , 1 ) , gc_hits );
2214
+ try expectEqual (1 , gc_hits );
2215
2215
}
2216
2216
}
2217
2217
@@ -2233,11 +2233,11 @@ test "tagged userdata" {
2233
2233
try testing .expectEqual (data .val , data2 .val );
2234
2234
2235
2235
var tag = try lua .userdataTag (-1 );
2236
- try testing .expectEqual (@as ( i32 , 13 ) , tag );
2236
+ try testing .expectEqual (13 , tag );
2237
2237
2238
2238
lua .setUserdataTag (-1 , 100 );
2239
2239
tag = try lua .userdataTag (-1 );
2240
- try testing .expectEqual (@as ( i32 , 100 ) , tag );
2240
+ try testing .expectEqual (100 , tag );
2241
2241
2242
2242
// Test that tag mismatch error handling works. Userdata is not tagged with 123.
2243
2243
try expectError (error .Fail , lua .toUserdataTagged (Data , -1 , 123 ));
0 commit comments