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

Adds data model conformance tests for nulls and booleans #132

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

popematt
Copy link
Contributor

Issue #, if available:

#88

Description of changes:

Adds test cases for nulls and booleans as well as a few annotation test cases asserting that true, etc. cannot be used as annotations.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +31 to +39
(ion_1_x "in text, typed null suffix parsing has precedence over sexp operator rules"
(each (text "(null.)")
(text "(null.-)")
(text "(null..)")
(text "(null.true)")
(text "(null.1)")
(text "(null.nan)")
(text "(null.+inf)")
(text "(null.foo)")
(text "(null.[])")
(text "(null.())")
(text "(null.{})")
(signals "invalid type")))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! When we get to the tests for s-expressions, this will be one of a zillion corner cases to cover. 😵‍💫

(then (binary 0xEB 0x0A) (denotes (Null sexp )))
(then (binary 0xEB 0x0B) (denotes (Null struct ))))

(ion_1_x "Null denotations"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do I understand correctly that this is checking whether the denotes operator is working as intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. This was already part of the nulls file, so I kept it.

@popematt popematt merged commit a0acfb4 into amazon-ion:main Nov 15, 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.

2 participants