| ... | ... | @@ -319,10 +319,7 @@ test "ElfDynLib" { |
| 319 | 319 | return error.SkipZigTest; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | | _ = ElfDynLib.open("invalid_so.so") catch |err| { |
| 323 | | try testing.expect(err == error.FileNotFound); |
| 324 | | return; |
| 325 | | }; |
| 322 | try testing.expectError(error.FileNotFound, ElfDynLib.open("invalid_so.so")); |
| 326 | 323 | } |
| 327 | 324 | |
| 328 | 325 | pub const WindowsDynLib = struct { |
| ... | ... | @@ -423,8 +420,5 @@ test "dynamic_library" { |
| 423 | 420 | else => return error.SkipZigTest, |
| 424 | 421 | }; |
| 425 | 422 | |
| 426 | | _ = DynLib.open(libname) catch |err| { |
| 427 | | try testing.expect(err == error.FileNotFound); |
| 428 | | return; |
| 429 | | }; |
| 423 | try testing.expectError(error.FileNotFound, DynLib.open(libname)); |
| 430 | 424 | } |