diff options
Diffstat (limited to 'platform/darwin/src/MGLRuntimeStylingTests.m.ejs')
-rw-r--r-- | platform/darwin/src/MGLRuntimeStylingTests.m.ejs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLRuntimeStylingTests.m.ejs b/platform/darwin/src/MGLRuntimeStylingTests.m.ejs new file mode 100644 index 0000000000..fff6aaf697 --- /dev/null +++ b/platform/darwin/src/MGLRuntimeStylingTests.m.ejs @@ -0,0 +1,40 @@ +<% + const type = locals.type; + const layoutProperties = locals.layoutProperties; + const paintProperties = locals.paintProperties; +-%> +// This file is generated. +// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. + +#import "MGLStyleLayerTests.h" + +@interface MGL<%- camelize(type) %>LayerTests : MGLStyleLayerTests +@end + +@implementation MGL<%- camelize(type) %>LayerTests + +- (void)test<%- camelize(type) %>Layer { + NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"]; + NSURL *url = [NSURL fileURLWithPath:filePath]; + MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"sourceID" URL:url]; + MGL<%- camelize(type) %>StyleLayer *layer = [[MGL<%- camelize(type) %>StyleLayer alloc] initWithLayerIdentifier:@"layerID" sourceIdentifier:@"sourceID"]; + [self.mapView.style addSource:source]; + [self.mapView.style addLayer:layer]; + +<% for (const property of layoutProperties) { -%> + <%- testImplementation(property, type) %> +<% } -%> +<% for (const property of paintProperties) { -%> + <%- testImplementation(property, type) %> +<% } -%> + + MGL<%- camelize(type) %>StyleLayer *gLayer = [self.mapView.style layerWithIdentifier:@"layerID"]; +<% for (const property of layoutProperties) { -%> + <%- testGetterImplementation(property, type) %> +<% } -%> +<% for (const property of paintProperties) { -%> + <%- testGetterImplementation(property, type) %> +<% } -%> +} + +@end |