MCPcopy Create free account
hub / github.com/Glyphack/enderpy / test_parse_assert_stmt

Function test_parse_assert_stmt

parser/src/parser/parser.rs:3491–3504  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3489
3490 #[test]
3491 fn test_parse_assert_stmt() {
3492 for test_case in &["assert a", "assert a, b", "assert True, 'fancy message'"] {
3493 let mut parser = Parser::new(test_case);
3494 let program = parser.parse().expect("parsing failed");
3495
3496 insta::with_settings!({
3497 description => test_case.to_string(), // the template source code
3498 snapshot_path => "../../test_data/output/",
3499 omit_expression => true // do not include the default expression
3500 }, {
3501 assert_debug_snapshot!(program);
3502 });
3503 }
3504 }
3505
3506 #[test]
3507 fn test_pass_stmt() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected