MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / test_cases

Function test_cases

compiler/tests/lexer.rs:13–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12 #[test]
13 fn test_cases() {
14 let cases: Vec<Case> = serde_json::from_str(include_str!("cases/lexer.json")).expect("invalid JSON");
15
16 for case in cases {
17 // Debug-format tokens for snapshot comparison (test-only).
18 let (toks, _) = lex(&case.src);
19 let got: Vec<String> = toks.iter().map(|t| format!("{:?}", t.kind)).collect();
20 assert_eq!(got, case.tokens, "failed on: {:?}", case.src);
21 }
22 }
23}

Callers

nothing calls this directly

Calls 4

lexFunction · 0.85
collectMethod · 0.80
expectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected