floats iter 1.1: Literal::Float variant + canonical hex serde + drift-test anchors

This commit is contained in:
2026-05-10 14:36:08 +02:00
parent cdc9d64169
commit ec2811194b
12 changed files with 83 additions and 2 deletions
@@ -219,6 +219,7 @@ fn design_md_anchors_every_literal_variant() {
(r#""kind": "bool""#, Literal::Bool { value: true }),
(r#""kind": "str""#, Literal::Str { value: "x".into() }),
(r#""kind": "unit""#, Literal::Unit),
(r#""kind": "float""#, Literal::Float { bits: 0 }),
];
for (anchor, lit) in exemplars {
@@ -227,6 +228,7 @@ fn design_md_anchors_every_literal_variant() {
Literal::Bool { .. } => "bool",
Literal::Str { .. } => "str",
Literal::Unit => "unit",
Literal::Float { .. } => "float",
};
assert!(
DESIGN_MD.contains(anchor),
+2
View File
@@ -219,6 +219,7 @@ fn spec_mentions_every_literal_variant() {
("`true`, `false`", Literal::Bool { value: true }),
("`STRING`", Literal::Str { value: "x".into() }),
("(lit-unit)", Literal::Unit),
("`FLOAT`", Literal::Float { bits: 0 }),
];
for (anchor, lit) in exemplars {
@@ -227,6 +228,7 @@ fn spec_mentions_every_literal_variant() {
Literal::Bool { .. } => "bool",
Literal::Str { .. } => "str",
Literal::Unit => "unit",
Literal::Float { .. } => "float",
};
assert!(
FORM_A_SPEC.contains(anchor),