From 90bf38853ba1616ebbe2b527a3dcfd833763562f Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Tue, 23 Jun 2015 11:15:15 +0200 Subject: [PATCH] LinphoneTester: add "All" suite to launch... all tests :-) --- LinphoneTester/DetailViewController.m | 69 +++++++++++++++++---------- LinphoneTester/MasterViewController.m | 12 ++--- submodules/belle-sip | 2 +- 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/LinphoneTester/DetailViewController.m b/LinphoneTester/DetailViewController.m index 3b18339e7..c2aaf1eaa 100644 --- a/LinphoneTester/DetailViewController.m +++ b/LinphoneTester/DetailViewController.m @@ -62,21 +62,34 @@ static NSString* const kAllTestsName = @"Run All tests"; } } +- (void)addTestsFromSuite:(NSString *)suite { + int count = bc_tester_nb_tests([suite UTF8String]); + + for (int i = 0; i < count; i++) { + const char *test_name = bc_tester_test_name([suite UTF8String], i); + NSString *testName = [NSString stringWithUTF8String:test_name]; + TestItem *item = [[TestItem alloc] initWithName:testName fromSuite:suite]; + [_tests addObject:item]; + } +} + - (void)configureView { - const char* suite = [self.detailItem UTF8String]; - if( suite == NULL ) return; - NSString* nssuite = [NSString stringWithUTF8String:suite]; - int count = bc_tester_nb_tests(suite); - _tests = [[NSMutableArray alloc] initWithCapacity:count]; - - [_tests addObject:[TestItem testWithName:kAllTestsName fromSuite:nssuite]]; - - for (int i=0; i