-
Notifications
You must be signed in to change notification settings - Fork 36
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 integration testing for Ion 1.1 #673
Conversation
Codecov ReportAll modified lines are covered by tests ✅
... and 3 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
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.
👍
There are a few unrelated clippy warnings on the diff.
fn read_embedded_doc_as_sequence(elem: &Element) -> IonResult<Sequence> { | ||
match elem.value() { | ||
Value::String(text) => Element::read_all(text.text().as_bytes()), | ||
Value::Blob(bytes) => Element::read_all(bytes.as_ref()), | ||
_ => panic!("Expected embedded document to be an Ion String or Ion Blob"), |
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.
Nice!
tests/element_test_vectors.rs
Outdated
Self::read_group_embedded(&sequence, &group_assert)?; | ||
} | ||
(Value::List(group), false) | (Value::SExp(group), false) => { | ||
match group_container.value().to_owned() { |
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.
Is the to_owned()
needed? It looks like we're just iterating over whatever we get.
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.
A to_owned()
is necessary somewhere because I can't have the if
expression returning Sequence
from one branch and &Sequence
from another, but I was able to move the to_owned()
call so that it is used as late as possible.
Issue #, if available:
None
Description of changes:
iontestdata
->iontestdata_1_0
.ion_1_1
module toelement_test_vectors.rs
integration testing for the Ion 1.1 reader.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.