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

Function allows_newline_separated_struct_fields

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

Source from the content-addressed store, hash-verified

384
385#[test]
386fn allows_newline_separated_struct_fields() {
387 // Newlines terminate statements, so struct fields may be separated by newlines.
388 let source = r#"
389struct Point {
390 x: f32
391 y: f32
392}
393
394main: () -> i32 {
395 return 0
396}
397"#;
398
399 let mut pipeline = CompilationPipeline::new();
400 pipeline.set_write_artifacts(false);
401 let result = pipeline.compile(source);
402 assert!(
403 result.is_ok(),
404 "expected newline-separated struct fields to compile: {:?}",
405 result.err()
406 );
407}
408
409#[test]
410fn allows_mixed_boolean_precedence() {

Callers

nothing calls this directly

Calls 2

set_write_artifactsMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected