summaryrefslogtreecommitdiff
path: root/render-test/ios/iosTestRunner.mm
blob: 9326602befb0edc1acbb77225abb8a2def129136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#import "iosTestRunner.h"

#import "ios_test_runner.hpp"

#include <string>

@interface IosTestRunner ()
{
    TestRunner* runner;
}
@end

@implementation IosTestRunner

-(instancetype)init
{
    self = [super init];
    if (self) {
        runner = new TestRunner();
        NSString *path = [[NSBundle mainBundle] pathForResource:@"mac-manifest" ofType:@"json"];
        
//        NSString * path1 = [[NSBundle mainBundle] pathForResource:@"package-lock" ofType:@"json" inDirectory:@"integration"];
        NSString *path1 = [[NSBundle mainBundle] bundlePath];
        (void)path1;
//        NSURL *url = [NSURL fileURLWithPath:path];
        std::string manifest = std::string([path UTF8String]);
        runner->startTest(manifest);
        delete runner;
        runner = nullptr;
    }
    return self;
}

@end