// // LinphoneTester_Tests.m // LinphoneTester Tests // // Created by guillaume on 10/09/2014. // // #import #include "linphone/linphonecore.h" #include "linphone/liblinphone_tester.h" #import "NSObject+DTRuntime.h" @interface LinphoneTester_Tests : XCTestCase @end @implementation LinphoneTester_Tests { NSString* bundlePath; NSString* documentPath; } static void linphone_log_function(OrtpLogLevel lev, const char *fmt, va_list args) { NSString* log = [[NSString alloc] initWithFormat:[NSString stringWithUTF8String:fmt] arguments:args]; NSLog(@"%@",log); } void LSLog(NSString* fmt, ...){ va_list args; va_start(args, fmt); linphone_log_function(ORTP_MESSAGE, [fmt UTF8String], args); va_end(args); } - (id)init { self = [super init]; if( self ){ bundlePath = [[NSBundle mainBundle] bundlePath]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); documentPath = [paths objectAtIndex:0]; LSLog(@"Bundle path: %@", bundlePath); LSLog(@"Document path: %@", documentPath); liblinphone_tester_set_fileprefix([bundlePath UTF8String]); liblinphone_tester_set_writable_dir_prefix( ms_strdup([documentPath UTF8String]) ); } return self; } + (NSArray*)skippedSuites { NSArray* skipped_suites = @[@"Flexisip"]; return skipped_suites; } + (void)initialize { liblinphone_tester_init(); int count = liblinphone_tester_nb_test_suites(); for (int i=0; i