summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLLineStyleLayer.mm
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-12 16:48:17 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-13 10:26:43 -0800
commit4d5036616f85ff87ffe9042739872b1a080015b2 (patch)
tree586bc460e60c638c7ab83c074ba15a473e18a889 /platform/darwin/src/MGLLineStyleLayer.mm
parent85fc75db8ddb5e045d5612fb38925535a8bb1804 (diff)
downloadqtlocation-mapboxgl-4d5036616f85ff87ffe9042739872b1a080015b2.tar.gz
[ios, macos] Rewrote style layer tests
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.
Diffstat (limited to 'platform/darwin/src/MGLLineStyleLayer.mm')
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.mm18
1 files changed, 12 insertions, 6 deletions
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<std::vector<float>, NSArray<NSNumber *> *, float>().toStyleValue(propertyValue);
}
-
- (void)setLineDasharray:(MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
- NSAssert(NO, @"Use -setLineDashPattern: instead.");
+}
+
+- (MGLStyleValue<NSArray<NSNumber *> *> *)lineDasharray {
+ return self.lineDashPattern;
}
- (void)setLineGapWidth:(MGLStyleValue<NSNumber *> *)lineGapWidth {
@@ -313,9 +315,11 @@ namespace mbgl {
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
-
- (void)setLineTranslate:(MGLStyleValue<NSValue *> *)lineTranslate {
- NSAssert(NO, @"Use -setLineTranslation: instead.");
+}
+
+- (MGLStyleValue<NSValue *> *)lineTranslate {
+ return self.lineTranslation;
}
- (void)setLineTranslationAnchor:(MGLStyleValue<NSValue *> *)lineTranslationAnchor {
@@ -332,9 +336,11 @@ namespace mbgl {
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLLineTranslationAnchor>().toEnumStyleValue(propertyValue);
}
-
- (void)setLineTranslateAnchor:(MGLStyleValue<NSValue *> *)lineTranslateAnchor {
- NSAssert(NO, @"Use -setLineTranslationAnchor: instead.");
+}
+
+- (MGLStyleValue<NSValue *> *)lineTranslateAnchor {
+ return self.lineTranslationAnchor;
}
- (void)setLineWidth:(MGLStyleValue<NSNumber *> *)lineWidth {