summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLMapViewTests.m
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-11-29 17:38:34 +0200
committerJesse Bounds <jesse@rebounds.net>2016-12-02 11:28:34 -0800
commitd44d1c8401f38982905bce3166eaad8431661263 (patch)
tree3083c4acec0ddaa853d51ec4a267c11b09bc9fe1 /platform/darwin/test/MGLMapViewTests.m
parent2c4e7ae70f68eecf56707f0ebd9810340f41e6a3 (diff)
downloadqtlocation-mapboxgl-d44d1c8401f38982905bce3166eaad8431661263.tar.gz
[ios, macos] renamed MGLStyleLayerTests to MGLMapViewTests
Diffstat (limited to 'platform/darwin/test/MGLMapViewTests.m')
-rw-r--r--platform/darwin/test/MGLMapViewTests.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLMapViewTests.m b/platform/darwin/test/MGLMapViewTests.m
new file mode 100644
index 0000000000..63ff3501ca
--- /dev/null
+++ b/platform/darwin/test/MGLMapViewTests.m
@@ -0,0 +1,22 @@
+#import "MGLMapViewTests.h"
+
+@implementation MGLMapViewTests
+
+- (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:@"MGLMapViewTests" owner:self];
+ [windowController showWindow:nil];
+#endif
+}
+
+@end