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

Function allows_array_index_place_access

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

Source from the content-addressed store, hash-verified

173
174#[test]
175fn allows_array_index_place_access() {
176 let source = r#"
177main: () -> i32 {
178 arr: i32[4] = []
179 arr[0] = 7
180 return arr[0]
181}
182"#;
183
184 let mut pipeline = CompilationPipeline::new();
185 pipeline.set_write_artifacts(false);
186 let result = pipeline.compile(source);
187 assert!(
188 result.is_ok(),
189 "expected `arr[0]` place access to compile successfully: {:?}",
190 result.err()
191 );
192}
193
194#[test]
195fn allows_stack_and_heap_arrays() {

Callers

nothing calls this directly

Calls 2

set_write_artifactsMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected