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 an expectation that can assert the type of a value without specifying the content of the value #131

Open
popematt opened this issue Nov 14, 2024 · 0 comments

Comments

@popematt
Copy link
Contributor

In the conformance tests, it would be useful to write test that assert that some input is or is not some type.

For example, one might want to write a test that asserts that when the null keyword is quoted that should not be interpreted as a null value. While we could assert that it is the symbol or string with the text "null", that requires having implemented support for symbols/strings already.

(ion_1_x "the null keyword must be unquoted to be a null value"
         (text " 'null' ")
         (denotes (any (not Null))) // or perhaps (any !Null)

Slightly less ideal (for test isolation), but simpler to read would be something like this:

(ion_1_x "the null keyword must be unquoted to be a null value"
         (text " 'null' ")
         (denotes (any Symbol))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant