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