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

Function allows_generic_placeholder_arithmetic

tests/integration/spec_rules.rs:150–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149#[test]
150fn allows_generic_placeholder_arithmetic() {
151 let source = r#"
152struct Box<T> {
153 val: T,
154 ptr: T*
155}
156
157main: () -> i32 {
158 box1: Box<i32>* = new(Box<i32>)
159 box1.val = 42
160 return box1.val + 58
161}
162"#;
163
164 let mut pipeline = CompilationPipeline::new();
165 pipeline.set_write_artifacts(false);
166 let result = pipeline.compile(source);
167 assert!(
168 result.is_ok(),
169 "expected generic placeholder arithmetic to compile successfully: {:?}",
170 result.err()
171 );
172}
173
174#[test]
175fn allows_array_index_place_access() {

Callers

nothing calls this directly

Calls 2

set_write_artifactsMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected