diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index 5f1a1e765..129c9a740 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -31,7 +31,7 @@ return { number.intValue }; } else if ((strcmp([number objCType], @encode(double))) == 0) { return { number.doubleValue }; - } else if ((strcmp([number objCType], @encode(bool))) == 0) { + } else if ((strcmp([number objCType], @encode(char))) == 0) { return { number.boolValue }; } } diff --git a/platform/darwin/test/MGLFilterTests.mm b/platform/darwin/test/MGLFilterTests.mm index 04cb82fac..5b102e2e8 100644 --- a/platform/darwin/test/MGLFilterTests.mm +++ b/platform/darwin/test/MGLFilterTests.mm @@ -42,6 +42,7 @@ NSPredicate *typePredicate = [NSPredicate predicateWithFormat:@"%K == %@", @"$type", @"Feature"]; NSPredicate *idPredicate = [NSPredicate predicateWithFormat:@"%K == %@", @"$id", @"1234123"]; NSPredicate *specialCharsPredicate = [NSPredicate predicateWithFormat:@"%K == %@", @"ty-’pè", @"sŒm-ethįng"]; + NSPredicate *booleanPredicate = [NSPredicate predicateWithFormat:@"%K != %@", @"cluster", [NSNumber numberWithBool:YES]]; return @[equalPredicate, notEqualPredicate, greaterThanPredicate, @@ -53,7 +54,8 @@ inNotInPredicate, typePredicate, idPredicate, - specialCharsPredicate]; + specialCharsPredicate, + booleanPredicate]; } - (void)testAllPredicates