mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
Update linphone and fix tests names to remove unsupported characters (it is not exhaustive...)
This commit is contained in:
parent
b052102c21
commit
3f90f37ada
2 changed files with 15 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 1a2125b588ca36a7274061ddcd60afe81330eab4
|
||||
Subproject commit a8e2461db5cc79eda8ef6737b4112a5b3b0f33d6
|
||||
|
|
@ -25,8 +25,19 @@
|
|||
return skipped_suites;
|
||||
}
|
||||
|
||||
+ (NSString*)safeifyTestString:(NSString*)testString{
|
||||
NSArray* invalidChars= @[@"[", @"]", @" ", @"-", @"."];
|
||||
NSString* safeString = testString;
|
||||
|
||||
for (NSString* c in invalidChars) {
|
||||
safeString = [safeString stringByReplacingOccurrencesOfString:c withString:@"_"];
|
||||
}
|
||||
return safeString;
|
||||
}
|
||||
|
||||
+ (void)initialize {
|
||||
mediastreamer2_tester_init();
|
||||
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
|
||||
|
||||
int count = mediastreamer2_tester_nb_test_suites();
|
||||
for (int i=0; i<count; i++) {
|
||||
|
|
@ -41,9 +52,10 @@
|
|||
if( [[mediastream_tester_Tests skippedSuites] containsObject:sSuite] ) continue;
|
||||
|
||||
// prepend test_ so that it gets found by introspection
|
||||
NSString* safesTest = [sTest stringByReplacingOccurrencesOfString:@" " withString:@"_"];
|
||||
NSString* safesSuite = [sSuite stringByReplacingOccurrencesOfString:@" " withString:@"_"];
|
||||
NSString* safesTest = [self safeifyTestString:sTest];
|
||||
NSString* safesSuite = [self safeifyTestString:sSuite];
|
||||
NSString *selectorName = [NSString stringWithFormat:@"test_%@__%@", safesSuite, safesTest];
|
||||
NSLog(@"Adding test: %@", selectorName);
|
||||
[mediastream_tester_Tests addInstanceMethodWithSelectorName:selectorName block:^(mediastream_tester_Tests* myself) {
|
||||
[myself testForSuite:sSuite andTest:sTest];
|
||||
}];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue