()
| 1322 | |
| 1323 | #[test] |
| 1324 | fn test_int() { |
| 1325 | check_expr_ok(0, "INT(0.1)"); |
| 1326 | check_expr_ok(-1, "INT(-0.1)"); |
| 1327 | check_expr_ok(0, "INT(0.9)"); |
| 1328 | check_expr_ok(-1, "INT(-0.9)"); |
| 1329 | |
| 1330 | check_expr_ok_with_vars(0, "INT(d)", [("d", 0.9f64.into())]); |
| 1331 | |
| 1332 | check_expr_compilation_error("1:10: INT expected expr#", "INT()"); |
| 1333 | check_expr_compilation_error("1:14: BOOLEAN is not a number", "INT(FALSE)"); |
| 1334 | check_expr_compilation_error("1:10: INT expected expr#", "INT(3.0, 4)"); |
| 1335 | |
| 1336 | check_expr_error( |
| 1337 | "1:14: Cannot cast -1234567890123456 to integer due to overflow", |
| 1338 | "INT(-1234567890123456.0)", |
| 1339 | ); |
| 1340 | } |
| 1341 | |
| 1342 | #[test] |
| 1343 | fn test_log() { |
nothing calls this directly
no test coverage detected