Verify schema 28 format round trips and rejection gates
This commit is contained in:
1 parent
4eeb5686b8
commit
091458d329
4 files changed
+10
-3
No files matched your search
@@ -246,7 +246,7 @@ fn genuine_fraction_primitives_and_retained_boxes_survive_format_roundtrip() {
|
||||
let envelope: serde_json::Value = serde_json::from_slice(&bytes).unwrap();
|
||||
let payload: serde_json::Value =
|
||||
serde_json::from_str(envelope["payload"].as_str().unwrap()).unwrap();
|
||||
assert_eq!(payload["schema"], 27);
|
||||
assert_eq!(payload["schema"], 28);
|
||||
let state = State::initex().with_etex();
|
||||
let loaded = FormatImage::decode(&bytes)
|
||||
.unwrap()
|
||||
|
||||
@@ -334,7 +334,7 @@ fn old_schema_and_missing_unicode_state_are_rejected_even_with_valid_checksums()
|
||||
let envelope: serde_json::Value = serde_json::from_slice(&encoded).unwrap();
|
||||
let original: serde_json::Value =
|
||||
serde_json::from_str(envelope["payload"].as_str().unwrap()).unwrap();
|
||||
assert_eq!(original["schema"], 27);
|
||||
assert_eq!(original["schema"], 28);
|
||||
for (schema, expected) in [
|
||||
(1, "incompatible native format"),
|
||||
(2, "incompatible native format"),
|
||||
@@ -363,6 +363,8 @@ fn old_schema_and_missing_unicode_state_are_rejected_even_with_valid_checksums()
|
||||
(25, "incompatible native format"),
|
||||
(26, "incompatible native format"),
|
||||
(27, "glyph_unicode"),
|
||||
(28, "glyph_unicode"),
|
||||
(29, "incompatible native format"),
|
||||
] {
|
||||
let mut payload = original.clone();
|
||||
payload["schema"] = schema.into();
|
||||
|
||||
@@ -164,7 +164,7 @@ fn new_format_owns_vcenter_and_boxed_math_without_reinjecting_old_meanings() {
|
||||
let envelope: serde_json::Value = serde_json::from_slice(&bytes).unwrap();
|
||||
let payload: serde_json::Value =
|
||||
serde_json::from_str(envelope["payload"].as_str().unwrap()).unwrap();
|
||||
assert_eq!(payload["schema"], 27);
|
||||
assert_eq!(payload["schema"], 28);
|
||||
let executor = FormatImage::decode(&bytes)
|
||||
.unwrap()
|
||||
.new_job(
|
||||
|
||||
Reference in new issue
Block a user