Skip to content

Commit 5c63109

Browse files
committed
add tests
1 parent adec9e9 commit 5c63109

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed

compiler/parser/src/parser.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,18 @@ class Foo(A, B):
218218
let parse_ast = parse_expression(&source, "<test>").unwrap();
219219
insta::assert_debug_snapshot!(parse_ast);
220220
}
221+
222+
#[test]
223+
fn test_parse_boolop_or() {
224+
let source = String::from("x or y");
225+
let parse_ast = parse_expression(&source, "<test>").unwrap();
226+
insta::assert_debug_snapshot!(parse_ast);
227+
}
228+
229+
#[test]
230+
fn test_parse_boolop_and() {
231+
let source = String::from("x and y");
232+
let parse_ast = parse_expression(&source, "<test>").unwrap();
233+
insta::assert_debug_snapshot!(parse_ast);
234+
}
221235
}

compiler/parser/src/snapshots/rustpython_parser__parser__tests__parse_boolop_and.snap

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/parser/src/snapshots/rustpython_parser__parser__tests__parse_boolop_or.snap

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)