summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLStyleLayerTests.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/test/MGLStyleLayerTests.m')
-rw-r--r--platform/darwin/test/MGLStyleLayerTests.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.m b/platform/darwin/test/MGLStyleLayerTests.m
new file mode 100644
index 0000000000..74c6b2f906
--- /dev/null
+++ b/platform/darwin/test/MGLStyleLayerTests.m
@@ -0,0 +1,22 @@
+#import "MGLStyleLayerTests.h"
+
+@implementation MGLStyleLayerTests
+
+- (void)setUp {
+ [super setUp];
+#if TARGET_OS_IPHONE
+ UIApplication *app = [UIApplication sharedApplication];
+ UIViewController *vc = [[UIViewController alloc] init];
+ app.keyWindow.rootViewController = vc;
+ [vc view]; // Force load xib
+ _mapView = [[MGLMapView alloc] initWithFrame:CGRectMake(0, 0, 256, 256)];
+ [vc.view addSubview:_mapView];
+ _mapView.delegate = self;
+#else
+ [MGLAccountManager setAccessToken:@"pk.feedcafedeadbeefbadebede"];
+ NSWindowController *windowController = [[NSWindowController alloc] initWithWindowNibName:@"MGLStyleLayerTests" owner:self];
+ [windowController showWindow:nil];
+#endif
+}
+
+@end