()
| 445 | |
| 446 | #[test] |
| 447 | fn test_round_with_precision() { |
| 448 | let conn = Connection::open_in_memory().unwrap(); |
| 449 | register_math_functions(&conn).unwrap(); |
| 450 | |
| 451 | let result: f64 = conn.query_row( |
| 452 | "SELECT round(3.789, 2)", |
| 453 | [], |
| 454 | |row| row.get(0) |
| 455 | ).unwrap(); |
| 456 | assert_eq!(result, 3.79); |
| 457 | |
| 458 | let result: f64 = conn.query_row( |
| 459 | "SELECT round(3.784, 2)", |
| 460 | [], |
| 461 | |row| row.get(0) |
| 462 | ).unwrap(); |
| 463 | assert_eq!(result, 3.78); |
| 464 | } |
| 465 | |
| 466 | #[test] |
| 467 | fn test_ceil_floor() { |
nothing calls this directly
no test coverage detected