-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update symbolTablesUnknownText.ion #85
base: main
Are you sure you want to change the base?
Conversation
Updates the test to verify that imported with undefined text are not equivalent to: other imported symbols with undefined text and different SIds, local symbols with undefined text, or symbols with defined text. Before this change the differences in offset for the defined symbols alone was enough to cause it to pass.
version: 1, | ||
max_id: 2 } | ||
], | ||
symbols:[ "foo", 31 ] |
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.
From https://amazon-ion.github.io/ion-docs/docs/symbols.html#local-symbol-tables
The
symbols
field should be a list of strings. If the field is missing or has any other type, it is treated as if it were an empty list.Null elements in the symbols list declare unknown symbol text (“gaps”) for its SID within the sequence. Any element of the list that is not a string must be interpreted as if it were null. Any SIDs that refer to null slots in a local symbol table are equivalent to symbol zero.
What is this doing, why put a number here instead of an explicit null
? Why 31?
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 could be any non-string (or null), testing the case where"Any element of the list that is not a string must be interpreted as if it were null."
I'm sure we have tests elsewhere that ensure the implementation treats all non-strings as null slots.
@@ -1,25 +1,50 @@ | |||
// import declaration, with max_id > 0 | |||
// verifies that imported symbols with undefined text are not equivalent to: | |||
// - other imported symbols with undefined text with different SIds |
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.
// - other imported symbols with undefined text with different SIds | |
// - other imported symbols with undefined text with different SIDs |
The symbols documentation generally says "SID"
Updates the test to verify that imported with undefined text are not equivalent to: other imported symbols with undefined text and different SIds, local symbols with undefined text, or symbols with defined text.
Before this change the differences in offset for the defined symbols alone was enough to cause it to pass.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.