diff --git a/Tests/Unit/SOGoTest.h b/Tests/Unit/SOGoTest.h index 119cb7e34..ed49be707 100644 --- a/Tests/Unit/SOGoTest.h +++ b/Tests/Unit/SOGoTest.h @@ -54,8 +54,6 @@ - (BOOL) run; -NSString *_stringForCharacterAtIndex(NSUInteger index, NSString *str, NSUInteger length); - - (NSString*) stringFromDiffBetween: (NSString*) str1 and: (NSString*) str2; @end diff --git a/Tests/Unit/SOGoTest.m b/Tests/Unit/SOGoTest.m index c5e4dbec1..408ca77d6 100644 --- a/Tests/Unit/SOGoTest.m +++ b/Tests/Unit/SOGoTest.m @@ -31,6 +31,36 @@ static NSString *SOGoTestAssertException = @"SOGoTestAssertException"; +/* Helper function for diffForString:andString */ +static NSString *_stringForCharacterAtIndex(NSUInteger index, NSString *str, NSUInteger length) +{ + NSString *chrStr; + unichar chr; + if (index < length) + { + chr = [str characterAtIndex: index]; + if (isprint(chr)) + { + chrStr = [NSString stringWithFormat: @"%c", chr]; + } + else + { + if (chr == 10) + chrStr = @"[NL]"; + else if (chr == 0) + chrStr = @"[\0]"; + else + chrStr = [NSString stringWithFormat: @"[NP: %u]", chr]; + } + } + else + { + chrStr = @"[none]"; + } + + return chrStr; +} + @implementation SOGoTest + (NSArray *) allTestClasses @@ -186,36 +216,6 @@ static NSString *SOGoTestAssertException = @"SOGoTestAssertException"; return YES; } -/* Helper function for diffForString:andString */ -NSString *_stringForCharacterAtIndex(NSUInteger index, NSString *str, NSUInteger length) -{ - NSString *chrStr; - unichar chr; - if (index < length) - { - chr = [str characterAtIndex: index]; - if (isprint(chr)) - { - chrStr = [NSString stringWithFormat: @"%c", chr]; - } - else - { - if (chr == 10) - chrStr = @"[NL]"; - else if (chr == 0) - chrStr = @"[\0]"; - else - chrStr = [NSString stringWithFormat: @"[NP: %u]", chr]; - } - } - else - { - chrStr = @"[none]"; - } - - return chrStr; -} - /* Returns a string with a very verbose diff of the two strings. In case the strings are equal it returns an empty string.