Skip to content

Commit

Permalink
Fix CI for NULL errors on macOS 15
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jan 16, 2025
1 parent f5f28d9 commit c7e89fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions framework-crates/objc2-metal/tests/null_error_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ fn test() {

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

0 comments on commit c7e89fd

Please sign in to comment.