XCTAssertEqual fails to compare two string values?

From the documentation of XCTAssertEqual:

Generates a failure when a1 is not equal to a2. This test is for C
scalars, structs and unions.

You should use XCTAssertEqualObjects (which uses isEqual: internally) or something like:

XCTAssertTrue([[firstNickName initialsFromString] isEqualToString:expectedResult],
              @"Strings are not equal %@ %@", expectedResult, [firstNickName initialsFromString]);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)