parser-tests icon indicating copy to clipboard operation
parser-tests copied to clipboard

Add tests for casemapping equality/comparisons

Open kylef opened this issue 8 years ago • 1 comments
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 ...
}

kylef avatar Oct 30 '17 19:10 kylef

Very good idea, will be doing this for sure!

DanielOaks avatar Oct 30 '17 19:10 DanielOaks