Get tests passing on macOS 13

macOS 13 uses NSTaggedPointerString for short CFStrings
which means the retain counts aren't meaningful. Increasing the length
of the strings avoids this.

Empty arrays also seem to refer to a shared constant object that
doesn't have meaningful retain counts either.

Fixes #597
This commit is contained in:
Jeff Muizelaar
2023-06-20 09:46:28 -04:00
parent 133d7efd3c
commit d10ad8dead
4 changed files with 19 additions and 17 deletions
+1 -1
View File
@@ -839,7 +839,7 @@ fn out_of_range_variations() {
// attributes greater than max are dropped on macOS <= 11
// on macOS 12 they seem to be preserved as is.
let var_attrs = var_attrs.find(variation_attribute);
if macos_version() >= (12, 0, 0) {
if macos_version() >= (12, 0, 0) && macos_version() < (13, 0, 0) {
let var_attrs = var_attrs.unwrap().downcast::<CFDictionary>().unwrap();
assert!(!var_attrs.is_empty());
let var_attrs: CFDictionary<CFType, CFType> = unsafe { std::mem::transmute(var_attrs) };