MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / match_mixed_payload_widths

Function match_mixed_payload_widths

tests/integration/hll_conformance.rs:1130–1154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1128 49,
1129 );
1130}
1131
1132#[test]
1133fn match_unit_variants_with_wildcard() {
1134 // Unit variants carry no payload; the wildcard covers the rest. Green is tag 1.
1135 assert_exit(
1136 r#"
1137enum Color {
1138 Red
1139 Green
1140 Blue
1141}
1142
1143main: () -> i32 {
1144 c: Color = Green
1145 match c {
1146 Red -> {
1147 return 1
1148 }
1149 Green -> {
1150 return 2
1151 }
1152 _ -> {
1153 return 99
1154 }
1155 }
1156 return -1
1157}

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected