Skip to content

Commit

Permalink
[TECH] - Fix multiplication tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swhitty committed Aug 30, 2024
1 parent a708dc1 commit 7d96c4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions SwiftDrawTests/LayerTree.ColorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ final class LayerTreeColorTests: XCTestCase {
XCTAssertEqual(noColor.withAlpha(0.3).maybeNone(), .none)
XCTAssertEqual(noColor.withAlpha(0.0).maybeNone(), .none)

XCTAssertEqual(someColor.withAlpha(1.0).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 1.0))
XCTAssertEqual(someColor.withAlpha(0.5).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 0.5))
XCTAssertEqual(someColor.withAlpha(0.3).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 0.3))
XCTAssertEqual(someColor.withAlpha(1.0).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 0.4 * 1))
XCTAssertEqual(someColor.withAlpha(0.5).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 0.4 * 0.5))
XCTAssertEqual(someColor.withAlpha(0.3).maybeNone(), .srgb(r: 0.1, g: 0.2, b: 0.3, a: 0.4 * 0.3))
XCTAssertEqual(someColor.withAlpha(0.0).maybeNone(), .none)

XCTAssertEqual(anotherColor.withAlpha(1.0).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 1.0))
XCTAssertEqual(anotherColor.withAlpha(0.5).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 0.5))
XCTAssertEqual(anotherColor.withAlpha(0.3).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 0.3))
XCTAssertEqual(anotherColor.withAlpha(1.0).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 0.1 * 1))
XCTAssertEqual(anotherColor.withAlpha(0.5).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 0.1 * 0.5))
XCTAssertEqual(anotherColor.withAlpha(0.3).maybeNone(), .srgb(r: 0.4, g: 0.3, b: 0.2, a: 0.1 * 0.3))
XCTAssertEqual(anotherColor.withAlpha(0.0).maybeNone(), .none)
}

Expand Down

0 comments on commit 7d96c4b

Please sign in to comment.