()
| 303 | |
| 304 | #[test] |
| 305 | fn train_with_empty_samples_fails() { |
| 306 | let mut codec = BbqRerank::new(DIM, DEFAULT_OVERSAMPLE); |
| 307 | let err = codec.train(&[]).unwrap_err(); |
| 308 | let msg = format!("{err}"); |
| 309 | assert!( |
| 310 | msg.contains("bad input") || msg.contains("empty"), |
| 311 | "expected bad input error, got: {msg}" |
| 312 | ); |
| 313 | } |
| 314 | |
| 315 | #[test] |
| 316 | fn train_with_dim_mismatch_fails() { |