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

Function test_comparison

parser/src/parser/parser.rs:3854–3879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3852
3853 #[test]
3854 fn test_comparison() {
3855 for test_case in &[
3856 "a == b",
3857 "a != b",
3858 "a > b",
3859 "a < b",
3860 "a >= b",
3861 "a <= b",
3862 "a is b",
3863 "a is not b",
3864 "a in b",
3865 "a not in b",
3866 "a < b < c",
3867 ] {
3868 let mut parser = Parser::new(test_case);
3869 let program = parser.parse().expect("parsing failed");
3870
3871 insta::with_settings!({
3872 description => test_case.to_string(), // the template source code
3873 snapshot_path => "../../test_data/output/",
3874 omit_expression => true // do not include the default expression
3875 }, {
3876 assert_debug_snapshot!(program);
3877 });
3878 }
3879 }
3880
3881 #[test]
3882 fn test_while_statement() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected