git.delta.rocks / jrsonnet / refs/commits / 2711ddb28fc9

difftreelog

test(parser) add `basic_math_with_indents` test

progrm_jarvis2020-05-16parent: #4452d85.patch.diff
in: master

1 file changed

modifiedcrates/jsonnet-parser/src/lib.rsdiffbeforeafterboth
209 );209 );
210 }210 }
211
212 #[test]
213 fn basic_math_with_indents() {
214 assert_eq!(
215 parse("2 + 2 * 2 ").unwrap(),
216 Expr::BinaryOp(
217 Box::new(Expr::Num(2.0)),
218 BinaryOp::Add,
219 Box::new(Expr::BinaryOp(
220 Box::new(Expr::Num(2.0)),
221 BinaryOp::Mul,
222 Box::new(Expr::Num(2.0)),
223 )),
224 )
225 );
226 }
211}227}
212228