summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLHillshadeStyleLayerTests.mm
blob: 2e8795759f82675491ef45ffeba23fb42e6bc7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.

#import "MGLStyleLayerTests.h"
#import "../../darwin/src/NSDate+MGLAdditions.h"

#import "MGLStyleLayer_Private.h"

#include <mbgl/style/layers/hillshade_layer.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/expression/dsl.hpp>

@interface MGLHillshadeLayerTests : MGLStyleLayerTests
@end

@implementation MGLHillshadeLayerTests

+ (NSString *)layerType {
    return @"hillshade";
}

- (void)testProperties {
    MGLPointFeature *feature = [[MGLPointFeature alloc] init];
    MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"sourceID" shape:feature options:nil];

    MGLHillshadeStyleLayer *layer = [[MGLHillshadeStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
    XCTAssertNotEqual(layer.rawLayer, nullptr);
    XCTAssertTrue(layer.rawLayer->is<mbgl::style::HillshadeLayer>());
    auto rawLayer = layer.rawLayer->as<mbgl::style::HillshadeLayer>();

    MGLTransition transitionTest = MGLTransitionMake(5, 4);


    // hillshade-accent-color
    {
        XCTAssertTrue(rawLayer->getHillshadeAccentColor().isUndefined(),
                      @"hillshade-accent-color should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeAccentColor;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        layer.hillshadeAccentColor = constantExpression;
        mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
        XCTAssertEqual(rawLayer->getHillshadeAccentColor(), propertyValue,
                       @"Setting hillshadeAccentColor to a constant value expression should update hillshade-accent-color.");
        XCTAssertEqualObjects(layer.hillshadeAccentColor, constantExpression,
                              @"hillshadeAccentColor should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeAccentColor = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<mbgl::Color>(
                step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1)))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeAccentColor(), propertyValue,
                       @"Setting hillshadeAccentColor to a camera expression should update hillshade-accent-color.");
        XCTAssertEqualObjects(layer.hillshadeAccentColor, functionExpression,
                              @"hillshadeAccentColor should round-trip camera expressions.");


        layer.hillshadeAccentColor = nil;
        XCTAssertTrue(rawLayer->getHillshadeAccentColor().isUndefined(),
                      @"Unsetting hillshadeAccentColor should return hillshade-accent-color to the default value.");
        XCTAssertEqualObjects(layer.hillshadeAccentColor, defaultExpression,
                              @"hillshadeAccentColor should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeAccentColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeAccentColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        // Transition property test
        layer.hillshadeAccentColorTransition = transitionTest;
        auto toptions = rawLayer->getHillshadeAccentColorTransition();
        XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay);
        XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration);

        MGLTransition hillshadeAccentColorTransition = layer.hillshadeAccentColorTransition;
        XCTAssertEqual(hillshadeAccentColorTransition.delay, transitionTest.delay);
        XCTAssertEqual(hillshadeAccentColorTransition.duration, transitionTest.duration);
    }

    // hillshade-exaggeration
    {
        XCTAssertTrue(rawLayer->getHillshadeExaggeration().isUndefined(),
                      @"hillshade-exaggeration should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeExaggeration;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"1"];
        layer.hillshadeExaggeration = constantExpression;
        mbgl::style::PropertyValue<float> propertyValue = { 1.0 };
        XCTAssertEqual(rawLayer->getHillshadeExaggeration(), propertyValue,
                       @"Setting hillshadeExaggeration to a constant value expression should update hillshade-exaggeration.");
        XCTAssertEqualObjects(layer.hillshadeExaggeration, constantExpression,
                              @"hillshadeExaggeration should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"1"];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeExaggeration = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<float>(
                step(zoom(), literal(1.0), 18.0, literal(1.0))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeExaggeration(), propertyValue,
                       @"Setting hillshadeExaggeration to a camera expression should update hillshade-exaggeration.");
        XCTAssertEqualObjects(layer.hillshadeExaggeration, functionExpression,
                              @"hillshadeExaggeration should round-trip camera expressions.");


        layer.hillshadeExaggeration = nil;
        XCTAssertTrue(rawLayer->getHillshadeExaggeration().isUndefined(),
                      @"Unsetting hillshadeExaggeration should return hillshade-exaggeration to the default value.");
        XCTAssertEqualObjects(layer.hillshadeExaggeration, defaultExpression,
                              @"hillshadeExaggeration should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeExaggeration = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeExaggeration = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        // Transition property test
        layer.hillshadeExaggerationTransition = transitionTest;
        auto toptions = rawLayer->getHillshadeExaggerationTransition();
        XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay);
        XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration);

        MGLTransition hillshadeExaggerationTransition = layer.hillshadeExaggerationTransition;
        XCTAssertEqual(hillshadeExaggerationTransition.delay, transitionTest.delay);
        XCTAssertEqual(hillshadeExaggerationTransition.duration, transitionTest.duration);
    }

    // hillshade-highlight-color
    {
        XCTAssertTrue(rawLayer->getHillshadeHighlightColor().isUndefined(),
                      @"hillshade-highlight-color should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeHighlightColor;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        layer.hillshadeHighlightColor = constantExpression;
        mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
        XCTAssertEqual(rawLayer->getHillshadeHighlightColor(), propertyValue,
                       @"Setting hillshadeHighlightColor to a constant value expression should update hillshade-highlight-color.");
        XCTAssertEqualObjects(layer.hillshadeHighlightColor, constantExpression,
                              @"hillshadeHighlightColor should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeHighlightColor = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<mbgl::Color>(
                step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1)))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeHighlightColor(), propertyValue,
                       @"Setting hillshadeHighlightColor to a camera expression should update hillshade-highlight-color.");
        XCTAssertEqualObjects(layer.hillshadeHighlightColor, functionExpression,
                              @"hillshadeHighlightColor should round-trip camera expressions.");


        layer.hillshadeHighlightColor = nil;
        XCTAssertTrue(rawLayer->getHillshadeHighlightColor().isUndefined(),
                      @"Unsetting hillshadeHighlightColor should return hillshade-highlight-color to the default value.");
        XCTAssertEqualObjects(layer.hillshadeHighlightColor, defaultExpression,
                              @"hillshadeHighlightColor should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeHighlightColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeHighlightColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        // Transition property test
        layer.hillshadeHighlightColorTransition = transitionTest;
        auto toptions = rawLayer->getHillshadeHighlightColorTransition();
        XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay);
        XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration);

        MGLTransition hillshadeHighlightColorTransition = layer.hillshadeHighlightColorTransition;
        XCTAssertEqual(hillshadeHighlightColorTransition.delay, transitionTest.delay);
        XCTAssertEqual(hillshadeHighlightColorTransition.duration, transitionTest.duration);
    }

    // hillshade-illumination-anchor
    {
        XCTAssertTrue(rawLayer->getHillshadeIlluminationAnchor().isUndefined(),
                      @"hillshade-illumination-anchor should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeIlluminationAnchor;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"'viewport'"];
        layer.hillshadeIlluminationAnchor = constantExpression;
        mbgl::style::PropertyValue<mbgl::style::HillshadeIlluminationAnchorType> propertyValue = { mbgl::style::HillshadeIlluminationAnchorType::Viewport };
        XCTAssertEqual(rawLayer->getHillshadeIlluminationAnchor(), propertyValue,
                       @"Setting hillshadeIlluminationAnchor to a constant value expression should update hillshade-illumination-anchor.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationAnchor, constantExpression,
                              @"hillshadeIlluminationAnchor should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"'viewport'"];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeIlluminationAnchor = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<mbgl::style::HillshadeIlluminationAnchorType>(
                step(zoom(), literal("viewport"), 18.0, literal("viewport"))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeIlluminationAnchor(), propertyValue,
                       @"Setting hillshadeIlluminationAnchor to a camera expression should update hillshade-illumination-anchor.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationAnchor, functionExpression,
                              @"hillshadeIlluminationAnchor should round-trip camera expressions.");


        layer.hillshadeIlluminationAnchor = nil;
        XCTAssertTrue(rawLayer->getHillshadeIlluminationAnchor().isUndefined(),
                      @"Unsetting hillshadeIlluminationAnchor should return hillshade-illumination-anchor to the default value.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationAnchor, defaultExpression,
                              @"hillshadeIlluminationAnchor should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeIlluminationAnchor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeIlluminationAnchor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
    }

    // hillshade-illumination-direction
    {
        XCTAssertTrue(rawLayer->getHillshadeIlluminationDirection().isUndefined(),
                      @"hillshade-illumination-direction should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeIlluminationDirection;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"1"];
        layer.hillshadeIlluminationDirection = constantExpression;
        mbgl::style::PropertyValue<float> propertyValue = { 1.0 };
        XCTAssertEqual(rawLayer->getHillshadeIlluminationDirection(), propertyValue,
                       @"Setting hillshadeIlluminationDirection to a constant value expression should update hillshade-illumination-direction.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationDirection, constantExpression,
                              @"hillshadeIlluminationDirection should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"1"];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeIlluminationDirection = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<float>(
                step(zoom(), literal(1.0), 18.0, literal(1.0))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeIlluminationDirection(), propertyValue,
                       @"Setting hillshadeIlluminationDirection to a camera expression should update hillshade-illumination-direction.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationDirection, functionExpression,
                              @"hillshadeIlluminationDirection should round-trip camera expressions.");


        layer.hillshadeIlluminationDirection = nil;
        XCTAssertTrue(rawLayer->getHillshadeIlluminationDirection().isUndefined(),
                      @"Unsetting hillshadeIlluminationDirection should return hillshade-illumination-direction to the default value.");
        XCTAssertEqualObjects(layer.hillshadeIlluminationDirection, defaultExpression,
                              @"hillshadeIlluminationDirection should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeIlluminationDirection = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeIlluminationDirection = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
    }

    // hillshade-shadow-color
    {
        XCTAssertTrue(rawLayer->getHillshadeShadowColor().isUndefined(),
                      @"hillshade-shadow-color should be unset initially.");
        NSExpression *defaultExpression = layer.hillshadeShadowColor;

        NSExpression *constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        layer.hillshadeShadowColor = constantExpression;
        mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
        XCTAssertEqual(rawLayer->getHillshadeShadowColor(), propertyValue,
                       @"Setting hillshadeShadowColor to a constant value expression should update hillshade-shadow-color.");
        XCTAssertEqualObjects(layer.hillshadeShadowColor, constantExpression,
                              @"hillshadeShadowColor should round-trip constant value expressions.");

        constantExpression = [NSExpression expressionWithFormat:@"%@", [MGLColor redColor]];
        NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
        layer.hillshadeShadowColor = functionExpression;

        {
            using namespace mbgl::style::expression::dsl;
            propertyValue = mbgl::style::PropertyExpression<mbgl::Color>(
                step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1)))
            );
        }

        XCTAssertEqual(rawLayer->getHillshadeShadowColor(), propertyValue,
                       @"Setting hillshadeShadowColor to a camera expression should update hillshade-shadow-color.");
        XCTAssertEqualObjects(layer.hillshadeShadowColor, functionExpression,
                              @"hillshadeShadowColor should round-trip camera expressions.");


        layer.hillshadeShadowColor = nil;
        XCTAssertTrue(rawLayer->getHillshadeShadowColor().isUndefined(),
                      @"Unsetting hillshadeShadowColor should return hillshade-shadow-color to the default value.");
        XCTAssertEqualObjects(layer.hillshadeShadowColor, defaultExpression,
                              @"hillshadeShadowColor should return the default value after being unset.");

        functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
        XCTAssertThrowsSpecificNamed(layer.hillshadeShadowColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}];
        functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}];
        XCTAssertThrowsSpecificNamed(layer.hillshadeShadowColor = functionExpression, NSException, NSInvalidArgumentException, @"MGLHillshadeLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
        // Transition property test
        layer.hillshadeShadowColorTransition = transitionTest;
        auto toptions = rawLayer->getHillshadeShadowColorTransition();
        XCTAssert(toptions.delay && MGLTimeIntervalFromDuration(*toptions.delay) == transitionTest.delay);
        XCTAssert(toptions.duration && MGLTimeIntervalFromDuration(*toptions.duration) == transitionTest.duration);

        MGLTransition hillshadeShadowColorTransition = layer.hillshadeShadowColorTransition;
        XCTAssertEqual(hillshadeShadowColorTransition.delay, transitionTest.delay);
        XCTAssertEqual(hillshadeShadowColorTransition.duration, transitionTest.duration);
    }
}

- (void)testPropertyNames {
    [self testPropertyName:@"hillshade-accent-color" isBoolean:NO];
    [self testPropertyName:@"hillshade-exaggeration" isBoolean:NO];
    [self testPropertyName:@"hillshade-highlight-color" isBoolean:NO];
    [self testPropertyName:@"hillshade-illumination-anchor" isBoolean:NO];
    [self testPropertyName:@"hillshade-illumination-direction" isBoolean:NO];
    [self testPropertyName:@"hillshade-shadow-color" isBoolean:NO];
}

- (void)testValueAdditions {
    XCTAssertEqual([NSValue valueWithMGLHillshadeIlluminationAnchor:MGLHillshadeIlluminationAnchorMap].MGLHillshadeIlluminationAnchorValue, MGLHillshadeIlluminationAnchorMap);
    XCTAssertEqual([NSValue valueWithMGLHillshadeIlluminationAnchor:MGLHillshadeIlluminationAnchorViewport].MGLHillshadeIlluminationAnchorValue, MGLHillshadeIlluminationAnchorViewport);
}

@end