()
| 1471 | |
| 1472 | #[test] |
| 1473 | fn test_impossible_bounds_no_panic() -> ResultTest<()> { |
| 1474 | let db = TestDB::durable()?; |
| 1475 | |
| 1476 | let table_id = db |
| 1477 | .create_table_for_test("test", &[("x", AlgebraicType::I32)], &[ColId(0)]) |
| 1478 | .unwrap(); |
| 1479 | |
| 1480 | with_auto_commit(&db, |tx| { |
| 1481 | for i in 0..1000i32 { |
| 1482 | insert(&db, tx, table_id, &product!(i)).unwrap(); |
| 1483 | } |
| 1484 | Ok::<(), DBError>(()) |
| 1485 | }) |
| 1486 | .unwrap(); |
| 1487 | |
| 1488 | let result = run_for_testing(&db, "select * from test where x > 5 and x < 5").unwrap(); |
| 1489 | assert!(result.is_empty()); |
| 1490 | |
| 1491 | let result = run_for_testing(&db, "select * from test where x >= 5 and x < 4").unwrap(); |
| 1492 | assert!(result.is_empty(), "Expected no rows but found {result:#?}"); |
| 1493 | |
| 1494 | let result = run_for_testing(&db, "select * from test where x > 5 and x <= 4").unwrap(); |
| 1495 | assert!(result.is_empty()); |
| 1496 | Ok(()) |
| 1497 | } |
| 1498 | |
| 1499 | #[test] |
| 1500 | fn test_multi_column_two_ranges() -> ResultTest<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…