()
| 362 | |
| 363 | #[test] |
| 364 | fn evaluate_bounds_not() { |
| 365 | let null = lit(ScalarValue::Null); |
| 366 | let zero = lit(0); |
| 367 | let one = lit(1); |
| 368 | let t = lit(true); |
| 369 | let f = lit(false); |
| 370 | let func = make_scalar_func_expr(); |
| 371 | |
| 372 | #[rustfmt::skip] |
| 373 | let cases = vec![ |
| 374 | (not(null.clone()), NullableInterval::UNKNOWN), |
| 375 | (not(one.clone()), NullableInterval::FALSE), |
| 376 | (not(zero.clone()), NullableInterval::TRUE), |
| 377 | (not(t.clone()), NullableInterval::FALSE), |
| 378 | (not(f.clone()), NullableInterval::TRUE), |
| 379 | (not(func.clone()), NullableInterval::ANY_TRUTH_VALUE), |
| 380 | ]; |
| 381 | |
| 382 | for case in cases { |
| 383 | assert_eq!( |
| 384 | eval_bounds(&case.0).unwrap(), |
| 385 | case.1, |
| 386 | "Failed for {}", |
| 387 | case.0 |
| 388 | ); |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | #[test] |
| 393 | fn evaluate_bounds_is() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…