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

Function all_launch_examples_compile

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

Source from the content-addressed store, hash-verified

315
316#[test]
317fn all_launch_examples_compile() {
318 // The catalog is the single source of truth for launchable examples; iterate
319 // it so a newly added example is covered without editing this test.
320 use full_stack::program_catalog::{ProgramCatalog, ProgramKind};
321 let catalog = ProgramCatalog::default();
322 let examples = catalog.get_programs_by_kind(ProgramKind::Example);
323 assert!(!examples.is_empty(), "catalog exposes no example programs");
324
325 let mut pipeline = CompilationPipeline::new();
326 pipeline.set_write_artifacts(false);
327 for program in examples {
328 pipeline.set_current_source_path(program.source_path.clone());
329 let result = pipeline.compile(&program.source);
330 assert!(
331 result.is_ok(),
332 "expected launch example `{}` to compile successfully: {:?}",
333 program.name,
334 result.err()
335 );
336 }
337 pipeline.set_current_source_path(None::<String>);
338}
339
340// The examples collectively must showcase every implemented HLL feature family;
341// each needle below is a representative token some example must demonstrate.

Callers

nothing calls this directly

Calls 5

get_programs_by_kindMethod · 0.80
set_write_artifactsMethod · 0.80
cloneMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected