parser-tests
parser-tests copied to clipboard
Add tests for casemapping equality/comparisons
trafficstars
Comparing nicknames, channel names etc in various case mappings could be introduced into this test suite.
class CaseMappingTests: XCTestCase {
func testRFC1459EqualCompare() {
let casemap = CaseMapping.rfc1459
XCTAssertEqual(casemap.compare("hello{}|", "HELLO[]\\"), .orderedSame)
}
func testRFC1459Compare() {
let casemap = CaseMapping.rfc1459
XCTAssertEqual(casemap.compare("hello{}|1", "HELLO[]\\2"), .orderedAscending)
}
/// etc ...
}
Very good idea, will be doing this for sure!