Skip to content

test: add semver assertions for numeric context values#365

Merged
toddbaert merged 2 commits intoopen-feature:mainfrom
buildingisfun23:fix/issue-237
Apr 13, 2026
Merged

test: add semver assertions for numeric context values#365
toddbaert merged 2 commits intoopen-feature:mainfrom
buildingisfun23:fix/issue-237

Conversation

@buildingisfun23
Copy link
Copy Markdown
Contributor

Summary

Closes #237

  • Adds Float rows (1 and 1.2) to the existing partial version handling scenario to assert that float context values are handled correctly by sem_ver
  • Adds a new semver-numeric-context-flag flag definition (using the > operator against "1.1") to evaluator/flags/testkit-flags.json
  • Adds a new numeric context value handling scenario (@semver-numeric-context) that asserts Float and Integer context values compare correctly against string semver targets (e.g. 1.2 (Float) > "1.1" → match)

Test coverage added

version type expected
1.2 Float match
1.1 Float no-match
2 Integer match
1 Integer no-match
1.2 String match
1 Float match (partial version)
1.2 Float match (partial version)

Add Float and Integer context type coverage to the semver test suite:
- Add Float rows (1 and 1.2) to the partial version handling scenario
- Add semver-numeric-context-flag targeting rule using '>' operator
- Add new 'numeric context value handling' scenario asserting Float and
  Integer context values compare correctly against string semver targets

Closes open-feature#237

Signed-off-by: buildingisfun23 <buildingisfun23@users.noreply.github.com>
@buildingisfun23 buildingisfun23 requested a review from a team as a code owner April 13, 2026 02:58
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new flag semver-numeric-context-flag to the testkit flags and adds corresponding Gherkin test scenarios to verify semantic version comparison with numeric (Float and Integer) and string context values. I have no feedback to provide as there were no review comments.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert
Copy link
Copy Markdown
Member

Thanks @buildingisfun23 I made some basic tweaks on the naming and added a missing tag.

@toddbaert toddbaert merged commit 18a3128 into open-feature:main Apr 13, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance semver test suite

2 participants