Skip to content

Commit

Permalink
Rename bytes fragment to binary
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Dec 12, 2024
1 parent 6793449 commit ca62431
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/conformance_dsl/clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub(crate) enum ClauseType {
Text,
/// Provide a sequence of bytes that is interpreted as binary ion, that will be inserted into
/// the document.
Bytes,
Binary,
/// Provide a major and minor version that will be emitted into the document as an IVM.
Ivm,
/// Specify a ion data to be inserted into the document, using inline ion syntax.
Expand Down Expand Up @@ -72,7 +72,7 @@ impl FromStr for ClauseType {
"produces" => Ok(Produces),
"denotes" => Ok(Denotes),
"text" => Ok(Text),
"bytes" => Ok(Bytes),
"binary" => Ok(Binary),
"and" => Ok(And),
"not" => Ok(Not),
"then" => Ok(Then),
Expand All @@ -91,7 +91,7 @@ impl ClauseType {
/// Utility function to test if the Clause is a fragment node.
pub fn is_fragment(&self) -> bool {
use ClauseType::*;
matches!(self, Text | Bytes | Ivm | TopLevel | Encoding | MacTab)
matches!(self, Text | Binary | Ivm | TopLevel | Encoding | MacTab)
}

/// Utility function to test if the Clause is an expectation node.
Expand Down
2 changes: 1 addition & 1 deletion tests/conformance_dsl/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl TryFrom<Clause> for Fragment {
}
Fragment::Text(text)
}
ClauseType::Bytes => Fragment::Binary(parse_bytes_exp(other.body.iter())?),
ClauseType::Binary => Fragment::Binary(parse_bytes_exp(other.body.iter())?),
ClauseType::Ivm => {
// IVM: (ivm <int> <int>)
let maj = other
Expand Down
8 changes: 4 additions & 4 deletions tests/conformance_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ mod implementation {
"(ion_1_1 (produces ))",
"(document (and (produces ) (produces )))",
"(document (text \"a\") (not (and (produces b) (produces c))))",
"(ion_1_1 (bytes 0x60 0x61 0x01 0xEB 0x01) (produces 0 1 null.int))",
"(ion_1_1 (binary 0x60 0x61 0x01 0xEB 0x01) (produces 0 1 null.int))",
r#"(ion_1_0 (then (text "a") (produces a)))"#,
r#"(ion_1_1 (text "a") (text "b") (text "c") (produces a b c))"#,
r#"(ion_1_1 (text "\"Hello\" null.int false") (denotes (String "Hello") (Null int) (Bool false)))"#,
r#"(ion_1_1 (each
(text "0")
(bytes 0x60)
(binary 0x60)
(denotes (Int 0)))
)"#,
r#"(document (ivm 1 2) (signals "Invalid Version"))"#,
Expand All @@ -107,8 +107,8 @@ mod implementation {
mod ion_tests {
use super::*;

#[test_resources("ion-tests/conformance/null.ion")]
#[test_resources("ion-tests/conformance/core/typed_null.ion")]
#[test_resources("ion-tests/conformance/data_model/null.ion")]
// #[test_resources("ion-tests/conformance/core/typed_null.ion")]
#[test_resources("ion-tests/conformance/core/string_symbol.ion")]
#[test_resources("ion-tests/conformance/core/empty_document.ion")]
#[test_resources("ion-tests/conformance/core/toplevel_produces.ion")]
Expand Down

0 comments on commit ca62431

Please sign in to comment.