()
| 315 | |
| 316 | #[test] |
| 317 | fn 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. |
nothing calls this directly
no test coverage detected