From 10bd05e4cd627968fde58da6e9b6d1040b7f3edb Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 3 Jan 2017 14:19:50 +0100 Subject: [PATCH] If a test name is null do not try to run the test --- LiblinphoneTester/DetailTableView.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/LiblinphoneTester/DetailTableView.m b/LiblinphoneTester/DetailTableView.m index e1937de67..91167a099 100644 --- a/LiblinphoneTester/DetailTableView.m +++ b/LiblinphoneTester/DetailTableView.m @@ -66,9 +66,11 @@ static NSString *const kAllTestsName = @"Run All tests"; 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]; + if (test_name) { + NSString *testName = [NSString stringWithUTF8String:test_name]; + TestItem *item = [[TestItem alloc] initWithName:testName fromSuite:suite]; + [_tests addObject:item]; + } } } @@ -81,7 +83,8 @@ static NSString *const kAllTestsName = @"Run All tests"; if ([self.detailItem isEqualToString:@"All"]) { // dont sort tests if we use all suites at once for (int i = 0; i < bc_tester_nb_suites(); i++) { - [self addTestsFromSuite:[NSString stringWithUTF8String:bc_tester_suite_name(i)]]; + const char *tmp = bc_tester_suite_name(i); + [self addTestsFromSuite:[NSString stringWithUTF8String:tmp]]; } } else { [self addTestsFromSuite:self.detailItem];