summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLStyleLayerTests.m
blob: 74c6b2f906fe14ad4a34cc595cd8f5643e933a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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