summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/darwin/src/NSExpression+MGLAdditions.mm2
-rw-r--r--platform/darwin/test/MGLFilterTests.mm4
2 files changed, 4 insertions, 2 deletions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm
index 5f1a1e765a..129c9a740c 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 04cb82fac1..5b102e2e86 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