Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for enum validation with arrays of boolean values #712

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

otto-ifak
Copy link
Contributor

@otto-ifak otto-ifak commented Jan 16, 2024

For the const keyword, there are tests like

"description": "const with [false] does not match [0]",

This PR adds corresponding tests for enum (for all drafts except draft3).

@gregsdennis
Copy link
Member

gregsdennis commented Jan 16, 2024

I'm not sure that these tests are adding anything that this test doesn't already cover.

I suspect that the root of the problem in the linked PR is a zero/false equivalency language issue.

@otto-ifak
Copy link
Contributor Author

Yes, the linked PR is about Python.
However, as far as I understood, there are many tests related to language specific problems in the test suite like JavaScript properties and so on.

I also think, that the new tests indeed cover more than the empty array [] does. There are actually many of these tests for the const keyword already:

"description": "const with [false] does not match [0]",

I basically just copied these to enum.

@Julian
Copy link
Member

Julian commented Jan 16, 2024

Thanks! These look good.

(Greg I assume the thumbs up is understanding how these fit in now -- so merging)

@Julian Julian merged commit 544f7c3 into json-schema-org:main Jan 16, 2024
1 check 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.

None yet

3 participants