MCPcopy Create free account
hub / github.com/Open-Quant/openquant / test_value_error_raise

Function test_value_error_raise

crates/openquant/tests/sampling.rs:177–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176#[test]
177fn test_value_error_raise() {
178 let (_, t1) = setup_labels();
179 // create NaN-like by invalid bounds
180 let mut bad = t1.clone();
181 bad.push((9999, 1));
182 // should panic or error
183 let bar_index: Vec<usize> = (0..10).collect();
184 let res = std::panic::catch_unwind(|| get_ind_matrix(&bad, &bar_index));
185 assert!(res.is_err());
186}

Callers

nothing calls this directly

Calls 2

setup_labelsFunction · 0.85
get_ind_matrixFunction · 0.85

Tested by

no test coverage detected