diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-11-29 17:38:34 +0200 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2016-12-02 11:28:34 -0800 |
commit | d44d1c8401f38982905bce3166eaad8431661263 (patch) | |
tree | 3083c4acec0ddaa853d51ec4a267c11b09bc9fe1 /platform/darwin/test/MGLMapViewTests.m | |
parent | 2c4e7ae70f68eecf56707f0ebd9810340f41e6a3 (diff) | |
download | qtlocation-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.m | 22 |
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 |