Skip to content

Instantly share code, notes, and snippets.

@mafis
Created September 9, 2009 06:59
Show Gist options
  • Save mafis/183531 to your computer and use it in GitHub Desktop.
Save mafis/183531 to your computer and use it in GitHub Desktop.
@import <Foundation/CPString.j>
@implementation CPStringTest : OJTestCase
- (void)testStringByReplacingOccurrencesOfStringWithString
{
var expectedString = @"hello world. A new world!";
var dummyString = @"hello woold. A new woold!";
var actualString = [dummyString stringByReplacingOccurrencesOfString:@"woold" withString:@"world"];
[self assertTrue:(expectedString === actualString)
message:"stringByAppendingFormat: expected:" + expectedString + " actual:" + actualString];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment