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

Function count_instructions

tests/integration/ir_generation.rs:56–69  ·  view source on GitHub ↗
(source: &str, pred: F)

Source from the content-addressed store, hash-verified

54 .filter(|i| pred(i))
55 .count()
56}
57
58// -- Smoke tests ---------------------------------------------------------------
59
60#[test]
61fn compiles_minimal_valid_program() {
62 let mut pipeline = CompilationPipeline::new();
63 pipeline.set_write_artifacts(false);
64 pipeline.set_run_semantic_analysis(false);
65 assert!(pipeline.compile("main: () -> i32 { return 42 }").is_ok());
66}
67
68#[test]
69fn rejects_invalid_tokens() {
70 let result = CompilationPipeline::new().compile("@invalid_token!@#");
71 assert!(matches!(
72 result.unwrap_err(),

Callers

nothing calls this directly

Calls 1

compile_okFunction · 0.70

Tested by

no test coverage detected