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

Function result_err_arm_executes

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

Source from the content-addressed store, hash-verified

1449fn match_integer_literal_falls_to_catch_all() {
1450 assert_exit(
1451 r#"
1452main: () -> i32 {
1453 n: i32 = 7
1454 match n {
1455 1 -> {
1456 return 1
1457 }
1458 2 -> {
1459 return 2
1460 }
1461 _ -> {
1462 return 42
1463 }
1464 }
1465 return -1
1466}
1467"#,
1468 42,
1469 );
1470}
1471
1472#[test]
1473fn match_char_literal_dispatch() {
1474 // Char literals compare as their ascii byte; 'b' takes the second arm.
1475 assert_exit(
1476 r#"
1477main: () -> i32 {
1478 c: i32 = 'b'
1479 x: i32 = match c {

Callers

nothing calls this directly

Calls 1

assert_exitFunction · 0.85

Tested by

no test coverage detected