-
Notifications
You must be signed in to change notification settings - Fork 16
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 tests cases for make_* system macros #135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
(produces {foo:0} )) | ||
(then "a symbol with unknown text" | ||
(text "(:make_field $0 1)") | ||
// Could be (produces {$0:1} ), but some implementations don't support $0 nicely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is saying "$0
support is often bad early in an implementation's development" right? If so, I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and it's also exposing a weakness in IonElement
—it doesn't have any support for $0
, but we're using it in the conformance runner in ion-java
because it's so much easier to work with than IonValue
.
"in text using qualified system macro address 7" | ||
(text " (:$ion::7 1) ") | ||
"in binary using system macro address 7" | ||
(binary "EF 07 00 00 01 00") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, make_timestamp
is the only system macro that requires a 2-byte arg encoding bitmap. I think this is probably ok since most of its value proposition comes from usage in TDL, but it is eye-catching.
Issue #, if available:
#88
Description of changes:
Adds actual test cases for all of the
make_*
system macros.Things to review:
make_timestamp
correct? (I think they are, but I need confirmation.)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.