MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_ceil_floor

Function test_ceil_floor

src/functions/math_functions.rs:467–484  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

465
466 #[test]
467 fn test_ceil_floor() {
468 let conn = Connection::open_in_memory().unwrap();
469 register_math_functions(&conn).unwrap();
470
471 let result: f64 = conn.query_row(
472 "SELECT ceil(3.2)",
473 [],
474 |row| row.get(0)
475 ).unwrap();
476 assert_eq!(result, 4.0);
477
478 let result: f64 = conn.query_row(
479 "SELECT floor(3.7)",
480 [],
481 |row| row.get(0)
482 ).unwrap();
483 assert_eq!(result, 3.0);
484 }
485
486 #[test]
487 fn test_sign() {

Callers

nothing calls this directly

Calls 2

register_math_functionsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected