summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLHeatmapColorTests.mm
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-30 16:43:55 -0700
committerGitHub <noreply@github.com>2018-03-30 16:43:55 -0700
commit59e92904c360e5aad94a1b789276bf6147120d7c (patch)
treefcb675741c492692324d841f8aaae905a3ccf8f4 /platform/darwin/test/MGLHeatmapColorTests.mm
parentb6866f764e5a804399ed60bbbce43a379b568ece (diff)
downloadqtlocation-mapboxgl-59e92904c360e5aad94a1b789276bf6147120d7c.tar.gz
Eviscerate mbgl expression to Foundation JSON object conversion (#11389)
* [ios, macos] Eviscerate mbgl expression to Foundation JSON object conversion * [ios, macos] Remove literal special case MGLJSONObjectFromMBGLValue() is just a literal translation from C++ types to Foundation types; no need for expression-specific literal wrapping. * [ios, macos] Implemented RGB(A) operators * [ios, macos] More robust color conversion * [macos] Create calibrated RGB from expression on Sierra * [macos] Calibrate colors in expressions at runtime * [ios, macos] Special-case number conversion without fallbacks * [ios, macos] Test mgl_number expressions * [ios, macos] Updated tests for aftermarket expressions * [ios, macos] Relax roundtripping requirement for serialize() * [ios, macos] Fixed interpolation expression tests * [ios, macos] Removed dead code * [ios, macos] Fixed color conversion on Sierra
Diffstat (limited to 'platform/darwin/test/MGLHeatmapColorTests.mm')
-rw-r--r--platform/darwin/test/MGLHeatmapColorTests.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/test/MGLHeatmapColorTests.mm b/platform/darwin/test/MGLHeatmapColorTests.mm
index ba28cc0345..bed777ae05 100644
--- a/platform/darwin/test/MGLHeatmapColorTests.mm
+++ b/platform/darwin/test/MGLHeatmapColorTests.mm
@@ -46,7 +46,8 @@
layer.heatmapColor = nil;
XCTAssertTrue(rawLayer->getHeatmapColor().isUndefined(),
@"Unsetting heatmapColor should return heatmap-color to the default value.");
- XCTAssertEqualObjects(layer.heatmapColor, defaultExpression,
+ // The contained colors aren’t object equal, even though their descriptions are.
+ XCTAssertEqualObjects(layer.heatmapColor.description, defaultExpression.description,
@"heatmapColor should return the default value after being unset.");
functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];