Skip to content

tests: add CGColor tests - #25

Merged
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/cgcolor
Jul 26, 2026
Merged

tests: add CGColor tests#25
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/cgcolor

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

Adds a gnustep-tests suite for CGColor under Tests/opal, checking the generic RGB, gray and CMYK colours: their components, alpha, number of components, equality, copy and copy-with-alpha, the colour space model, and rendering (filling a bitmap context with a device colour and reading the pixel back). Expected values were checked against Apple CoreGraphics on a macOS runner.

Five checks are marked hopeful, with the fix sent separately:

  • CGColorGetNumberOfComponents does not count alpha (reports 3 for RGB, 1 for gray, 4 for CMYK; CoreGraphics counts alpha and reports 4, 2, 5).
  • CGColorEqualToColor returns false for equal colours and for a colour and its copy.

@fredkiefer
fredkiefer merged commit 358b1ff into gnustep:master Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants