From 4d5036616f85ff87ffe9042739872b1a080015b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Thu, 12 Jan 2017 16:48:17 -0800 Subject: [ios, macos] Rewrote style layer tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced the style layer integration tests with unit tests. Test conversion of style values to property values and vice versa, not just round-tripping. Test the initial state and null-resetting of each null-resettable property. Test NSValue additions for style attribute enumerations. Test properties common to all style layer classes. Test MGLStyle’s source and layer collections. Eviscerated implementations of unavailable style layer properties corresponding to style specification properties that were renamed. Implemented corresponding getters to prevent ivars from being autosynthesized for these unavailable properties. Added a missing bridging header to the iOS test project. --- platform/darwin/src/MGLLineStyleLayer.mm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'platform/darwin/src/MGLLineStyleLayer.mm') diff --git a/platform/darwin/src/MGLLineStyleLayer.mm b/platform/darwin/src/MGLLineStyleLayer.mm index f3b9f22df9..f6884fad15 100644 --- a/platform/darwin/src/MGLLineStyleLayer.mm +++ b/platform/darwin/src/MGLLineStyleLayer.mm @@ -238,9 +238,11 @@ namespace mbgl { return MGLStyleValueTransformer, NSArray *, float>().toStyleValue(propertyValue); } - - (void)setLineDasharray:(MGLStyleValue *> *)lineDasharray { - NSAssert(NO, @"Use -setLineDashPattern: instead."); +} + +- (MGLStyleValue *> *)lineDasharray { + return self.lineDashPattern; } - (void)setLineGapWidth:(MGLStyleValue *)lineGapWidth { @@ -313,9 +315,11 @@ namespace mbgl { return MGLStyleValueTransformer, NSValue *>().toStyleValue(propertyValue); } - - (void)setLineTranslate:(MGLStyleValue *)lineTranslate { - NSAssert(NO, @"Use -setLineTranslation: instead."); +} + +- (MGLStyleValue *)lineTranslate { + return self.lineTranslation; } - (void)setLineTranslationAnchor:(MGLStyleValue *)lineTranslationAnchor { @@ -332,9 +336,11 @@ namespace mbgl { return MGLStyleValueTransformer().toEnumStyleValue(propertyValue); } - - (void)setLineTranslateAnchor:(MGLStyleValue *)lineTranslateAnchor { - NSAssert(NO, @"Use -setLineTranslationAnchor: instead."); +} + +- (MGLStyleValue *)lineTranslateAnchor { + return self.lineTranslationAnchor; } - (void)setLineWidth:(MGLStyleValue *)lineWidth { -- cgit v1.2.1