Skip to content

Commit c7e89fd

Browse files
committed
Fix CI for NULL errors on macOS 15
1 parent f5f28d9 commit c7e89fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

framework-crates/objc2-metal/tests/null_error_handling.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ fn test() {
2020

2121
let metal_lib = unsafe { NSURL::URLWithString(ns_string!("file://missing.metallib")) }.unwrap();
2222
let err = binary_archive.serializeToURL_error(&metal_lib).unwrap_err();
23-
assert_eq!(err.domain().to_string(), "__objc2.missingError");
24-
assert_eq!(err.code(), 0);
23+
if err.domain().to_string() == "__objc2.missingError" {
24+
assert_eq!(err.code(), 0);
25+
} else {
26+
// In macOS 15, the error is no longer NULL
27+
assert!(err.domain().to_string() == "MTLBinaryArchiveDomain");
28+
}
2529
}

0 commit comments

Comments
 (0)