Test scanning upper case hex digits
This commit is contained in:
parent
b1adcb158e
commit
0991ca01ed
1 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,12 @@ final class ColorParserTest: XCTestCase {
|
|||
XCTAssertEqual(Color(red: 0xAA, green: 0xBB, blue: 0xCC), color)
|
||||
}
|
||||
|
||||
func testScanningThreeDigitColorUppercase() throws {
|
||||
let scanner = Scanner(string: "#ABc")
|
||||
let color = scanner.color()
|
||||
XCTAssertEqual(Color(red: 0xAA, green: 0xBB, blue: 0xCC), color)
|
||||
}
|
||||
|
||||
func testScanningFourDigitColor() throws {
|
||||
let scanner = Scanner(string: "#abcd")
|
||||
let color = scanner.color()
|
||||
|
|
Loading…
Add table
Reference in a new issue