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

Function rejects_invalid_pointer_arithmetic

tests/integration/ir_generation.rs:88–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 );
87}
88
89// -- Signed / unsigned arithmetic lowering ------------------------------------
90
91#[test]
92fn unsigned_division_emits_udiv() {
93 assert!(has_instruction(
94 r#"main: () -> i32 { a: u32 = 10 b: u32 = 2 c: u32 = a / b return c as i32 }"#,
95 |i| matches!(i, IrInstruction::Math { op, .. } if *op == IrMathOp::UDiv),
96 ));
97}
98
99#[test]
100fn signed_division_emits_sdiv() {

Callers

nothing calls this directly

Calls 1

assert_semantic_errorFunction · 0.85

Tested by

no test coverage detected