From da27204a71cdf2d182370e7db0dfd7d63a0db29d Mon Sep 17 00:00:00 2001 From: boris Date: Tue, 8 Sep 2026 00:41:11 +0800 Subject: [PATCH] test: assert broker fill events for scoped buy denials --- crates/fidc-core/src/broker.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/fidc-core/src/broker.rs b/crates/fidc-core/src/broker.rs index 856e260..0350a8e 100644 --- a/crates/fidc-core/src/broker.rs +++ b/crates/fidc-core/src/broker.rs @@ -8251,13 +8251,13 @@ mod tests { symbol: "000001.SZ".to_string(), target_value: 3_000.0, reason: "topup".to_string(), }); let report = broker.execute(second, &mut portfolio, &data, &blocked).unwrap(); - assert!(report.fills.is_empty()); + assert!(report.fill_events.is_empty()); assert_eq!(portfolio.position("000001.SZ").unwrap().quantity, 100); assert!(broker.runtime_buy_denials.borrow().is_empty()); blocked.order_intents = next_open_sell_decision().order_intents; let report = broker.execute(second, &mut portfolio, &data, &blocked).unwrap(); - assert_eq!(report.fills.len(), 1); - assert_eq!(report.fills[0].side, OrderSide::Sell); + assert_eq!(report.fill_events.len(), 1); + assert_eq!(report.fill_events[0].side, OrderSide::Sell); assert!(broker.runtime_buy_denials.borrow().is_empty()); } @@ -8273,7 +8273,7 @@ mod tests { decision.buy_denials.insert("000001.SZ".to_string(), "strategy_buy_condition_false".to_string()); let mut portfolio = PortfolioState::new(100_000.0); let report = broker.execute(date, &mut portfolio, &data, &decision).unwrap(); - assert!(!report.fills.is_empty()); + assert!(!report.fill_events.is_empty()); assert!(broker.runtime_buy_denials.borrow().is_empty()); }