MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_expr_rel_ops

Function test_expr_rel_ops

core/src/parser.rs:3058–3076  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3056
3057 #[test]
3058 fn test_expr_rel_ops() {
3059 use Expr::*;
3060 let span1 = Box::from(BinaryOpSpan {
3061 lhs: expr_integer(1, 1, 7),
3062 rhs: expr_integer(2, 1, 11),
3063 pos: lc(1, 9),
3064 });
3065 let span2 = Box::from(BinaryOpSpan {
3066 lhs: expr_integer(1, 1, 7),
3067 rhs: expr_integer(2, 1, 12),
3068 pos: lc(1, 9),
3069 });
3070 do_expr_ok_test("1 = 2", Equal(span1.clone()));
3071 do_expr_ok_test("1 <> 2", NotEqual(span2.clone()));
3072 do_expr_ok_test("1 < 2", Less(span1.clone()));
3073 do_expr_ok_test("1 <= 2", LessEqual(span2.clone()));
3074 do_expr_ok_test("1 > 2", Greater(span1));
3075 do_expr_ok_test("1 >= 2", GreaterEqual(span2));
3076 }
3077
3078 #[test]
3079 fn test_expr_logical_ops() {

Callers

nothing calls this directly

Calls 3

expr_integerFunction · 0.85
lcFunction · 0.85
do_expr_ok_testFunction · 0.85

Tested by

no test coverage detected