test(build): close package mutation gate

Exercise every generated form-control variant through public code generation and record all eight deterministic hemx-build shards clean: 1,304 mutants, 1,070 caught and 234 unviable.

req: form/004

req: codegen/005

req: test/021

req: test/022

req: test/023
This commit is contained in:
slhx agent
2026-07-17 12:26:43 +02:00
parent 1ba2d22f15
commit 8c79ea26bf
2 changed files with 20 additions and 2 deletions
+18
View File
@@ -3539,6 +3539,13 @@ mod tests {
<input name="count" type="number" min="1" max="10" step="1">
<select name="labels" multiple></select>
<input name="avatar" type="file">
<input name="token" type="hidden">
<input name="enabled" type="checkbox">
<input name="mode" type="radio">
<textarea name="notes"></textarea>
<input name="commit" type="submit">
<input name="birthday" type="date">
<button name="action" type="button">Preview</button>
</form>"#,
)
.unwrap();
@@ -3560,6 +3567,17 @@ mod tests {
assert!(generated.contains(
"::hemx::FormField { name: \"avatar\", kind: ::hemx::FormControlKind::File, required: false }"
));
for field in [
"::hemx::FormField { name: \"token\", kind: ::hemx::FormControlKind::Hidden, required: false }",
"::hemx::FormField { name: \"enabled\", kind: ::hemx::FormControlKind::Checkbox, required: false }",
"::hemx::FormField { name: \"mode\", kind: ::hemx::FormControlKind::Radio, required: false }",
"::hemx::FormField { name: \"notes\", kind: ::hemx::FormControlKind::TextArea, required: false }",
"::hemx::FormField { name: \"commit\", kind: ::hemx::FormControlKind::Submit, required: false }",
"::hemx::FormField { name: \"birthday\", kind: ::hemx::FormControlKind::Other { tag: \"input\", input_type: Some(\"date\") }, required: false }",
"::hemx::FormField { name: \"action\", kind: ::hemx::FormControlKind::Other { tag: \"button\", input_type: None }, required: false }",
] {
assert!(generated.contains(field), "missing form field metadata {field}");
}
let syms = std::fs::read_to_string(out.join("hemx.syms")).unwrap();
assert!(syms.contains("handle_form\tsave\tprofile\n"));