()
| 376 | |
| 377 | #[test] |
| 378 | fn apply_rejects_invalid_shape() { |
| 379 | let mut engine = MockEngine::new(); |
| 380 | engine.register_array("a", hlc(100)); |
| 381 | // Put op with no attrs is invalid. |
| 382 | let op = ArrayOp { |
| 383 | header: header("a", 50, 100), |
| 384 | kind: ArrayOpKind::Put, |
| 385 | coord: vec![CoordValue::Int64(1)], |
| 386 | attrs: None, |
| 387 | }; |
| 388 | let outcome = apply_op(&mut engine, &op).unwrap(); |
| 389 | assert!(matches!( |
| 390 | outcome, |
| 391 | ApplyOutcome::Rejected(ApplyRejection::ShapeInvalid { .. }) |
| 392 | )); |
| 393 | } |
| 394 | |
| 395 | #[test] |
| 396 | fn apply_wraps_engine_error_as_rejection() { |
nothing calls this directly
no test coverage detected