From da35ef9f49139f4dfc7eb5ea2a04f800e895a65f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 15 Jul 2016 16:07:42 -0700 Subject: [core] Add support for $id key to filters https://github.com/mapbox/mapbox-gl-style-spec/issues/391 --- platform/darwin/test/MGLFeatureTests.mm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'platform') diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm index 13ad8759b0..1b1722f172 100644 --- a/platform/darwin/test/MGLFeatureTests.mm +++ b/platform/darwin/test/MGLFeatureTests.mm @@ -1,6 +1,7 @@ #import #import +#import #import "../../darwin/src/MGLFeature_Private.h" @interface MGLFeatureTests : XCTestCase @@ -12,16 +13,16 @@ - (void)testGeometryConversion { std::vector features; - mapbox::geometry::point point = { -90.066667, 29.95 }; - features.emplace_back(point); + mbgl::Point point = { -90.066667, 29.95 }; + features.push_back(mbgl::Feature { point }); - mapbox::geometry::line_string lineString = { + mbgl::LineString lineString = { { -84.516667, 39.1 }, { -90.066667, 29.95 }, }; - features.emplace_back(lineString); + features.push_back(mbgl::Feature { lineString }); - mapbox::geometry::polygon polygon = { + mbgl::Polygon polygon = { { { 1, 1 }, { 4, 1 }, @@ -35,7 +36,7 @@ { 2, 3 }, }, }; - features.emplace_back(polygon); + features.push_back(mbgl::Feature { polygon }); NS_ARRAY_OF(MGLShape *) *shapes = MGLFeaturesFromMBGLFeatures(features); XCTAssertEqual(shapes.count, 3, @"All features should be converted into shapes"); @@ -87,8 +88,8 @@ - (void)testPropertyConversion { std::vector features; - mapbox::geometry::point point = { -90.066667, 29.95 }; - mbgl::Feature pointFeature(point); + mbgl::Point point = { -90.066667, 29.95 }; + mbgl::Feature pointFeature { point }; pointFeature.id = { UINT64_MAX }; pointFeature.properties["null"] = nullptr; pointFeature.properties["bool"] = true; -- cgit v1.2.1