Fixed RealmSwift tests by sometimes using XCTAssert instead of XCTAssertEqual

This is a bug in XCTest, not Realm. @alazier 
I couldn't get this test to pass. It unexpectedly throws an exception.