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

Function test_while_statement

parser/src/parser/parser.rs:3882–3904  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3880
3881 #[test]
3882 fn test_while_statement() {
3883 for test_case in &[
3884 "while a: pass",
3885 "while a:
3886 pass",
3887 "while a:
3888 a = 1
3889else:
3890 b = 1
3891",
3892 ] {
3893 let mut parser = Parser::new(test_case);
3894 let program = parser.parse().expect("parsing failed");
3895
3896 insta::with_settings!({
3897 description => test_case.to_string(), // the template source code
3898 snapshot_path => "../../test_data/output/",
3899 omit_expression => true // do not include the default expression
3900 }, {
3901 assert_debug_snapshot!(program);
3902 });
3903 }
3904 }
3905
3906 #[test]
3907 fn test_try_statement() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected