Skip to content

Commit bc52998

Browse files
committed
INTENG-6187 check expected string in unit test
1 parent 9cce964 commit bc52998

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCEncodingUtilsTests.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ - (void)testSanitizeStringWithNil {
3535
XCTAssertNil(result);
3636
}
3737

38-
// INTENG-6187 rare bad access crash
38+
// INTENG-6187 bad access crash
3939
- (void)testEncodeDictionaryToJsonStringCrashTest {
40+
NSString *expectedString = @"{\"World\":\"Hello\"}";
4041

4142
// untyped collection
4243
NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
@@ -45,7 +46,7 @@ - (void)testEncodeDictionaryToJsonStringCrashTest {
4546

4647
// encodeDictionaryToJsonString should ignore non-string keys
4748
NSString *result = [BNCEncodingUtils encodeDictionaryToJsonString:params];
48-
XCTAssertNotNil(result);
49+
XCTAssertTrue([expectedString isEqualToString:result]);
4950
}
5051

5152
@end

0 commit comments

Comments
 (0)