MCPcopy Create free account
hub / github.com/apache/datafusion / test_round_f32_one_input

Function test_round_f32_one_input

datafusion/functions/src/math/round.rs:797–810  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

795
796 #[test]
797 fn test_round_f32_one_input() {
798 let args: Vec<ArrayRef> = vec![
799 Arc::new(Float32Array::from(vec![125.2345, 12.345, 1.234, 0.1234])), // input
800 ];
801
802 let result = round_arrays(Arc::clone(&args[0]), None)
803 .expect("failed to initialize function round");
804 let floats =
805 as_float32_array(&result).expect("failed to initialize function round");
806
807 let expected = Float32Array::from(vec![125.0, 12.0, 1.0, 0.0]);
808
809 assert_eq!(floats, &expected);
810 }
811
812 #[test]
813 fn test_round_f64_one_input() {

Callers

nothing calls this directly

Calls 2

round_arraysFunction · 0.85
as_float32_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…