()
| 517 | |
| 518 | #[test] |
| 519 | fn round_function() { |
| 520 | let (expr, deps) = parse_ok("ROUND(price * (1 + tax_rate), 2)"); |
| 521 | assert_eq!(deps, vec!["price", "tax_rate"]); |
| 522 | let doc = Value::from(serde_json::json!({"price": 99.99, "tax_rate": 0.08})); |
| 523 | let result = expr.eval(&doc); |
| 524 | assert_eq!(result, Value::Float(107.99)); |
| 525 | } |
| 526 | |
| 527 | #[test] |
| 528 | fn concat_function() { |