Skip to content

tests: cover the NSSliderCell tick mark values#465

Merged
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/nsslidercell-ticks
Jul 12, 2026
Merged

tests: cover the NSSliderCell tick mark values#465
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/nsslidercell-ticks

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

minMax.m covers value clamping to the minimum and maximum. This covers the
tick mark values, which it does not: the tick mark count,
tickMarkValueAtIndex: spacing and its out-of-range exception, and
closestTickMarkValueToValue: snapping a value to the nearest tick (rounding
halves towards positive infinity and clamping out-of-range values to the
end ticks), plus the no-tick and single-tick cases.

@DTW-Thalion DTW-Thalion requested a review from fredkiefer as a code owner July 12, 2026 01:33
@DTW-Thalion DTW-Thalion force-pushed the tests/nsslidercell-ticks branch from a3a7375 to 821f761 Compare July 12, 2026 13:40
Comment thread Tests/gui/NSSliderCell/tickMarks.m Outdated
}

/* The restrict-to-ticks flag round-trips. */
[cell setAllowsTickMarkValuesOnly: YES];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both slider cells are never released. Also this bit of code could be moved up a bit to keep the two separate d.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both cells are now autoreleased, and the flag round-trip is moved up so the second cell stands on its own.

minMax.m covers value clamping to the minimum and maximum; this covers the
tick mark values, which it does not: the tick mark count, tickMarkValueAtIndex:
spacing and its out-of-range exception, and closestTickMarkValueToValue: snapping
a value to the nearest tick (rounding halves towards positive infinity and
clamping out-of-range values to the end ticks), plus the no-tick and single-tick
cases.
@DTW-Thalion DTW-Thalion force-pushed the tests/nsslidercell-ticks branch from 821f761 to c9d5c9e Compare July 12, 2026 19:58
@fredkiefer fredkiefer merged commit 31044f8 into gnustep:master Jul 12, 2026
3 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