**Progress: 1,178 → 57 test errors (95% reduction)** ## Status Summary - ✅ Production code: Compiles cleanly (0 errors) - ⚠️ Test code: 57 errors remain (massive improvement) - ⚙️ All services build successfully - 📊 Warning count: 253 (target: <20) - AGENTS WILL FIX ## Remaining Test Errors (57 total) ### Primary Issues: 1. 23× E0308 mismatched types 2. 17× E0433 undeclared Decimal 3. 15× E0433 compliance module not found 4. 6× E0624 private method access 5. Various import and type issues ## Next Phase: Wave 33-2 Launch 10+ parallel agents to: - Fix remaining 57 test compilation errors - Reduce 253 warnings to <20 - Achieve 95% test coverage - Ensure all tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.5 KiB
Rust
46 lines
1.5 KiB
Rust
//! Compilation test without database dependency
|
|
|
|
use crate::{
|
|
error::MarketDataResult,
|
|
models::{BookSide, IndicatorType, OrderBook, PriceRecord, TechnicalIndicator},
|
|
};
|
|
use chrono::Utc;
|
|
use rust_decimal::prelude::*;
|
|
|
|
#[allow(unused)]
|
|
pub fn test_models_compile() -> MarketDataResult<()> {
|
|
// Test Price model
|
|
let mut price = PriceRecord::new("EURUSD".to_string(), Utc::now());
|
|
price.bid = Some(Decimal::from_str("1.0850").unwrap());
|
|
price.ask = Some(Decimal::from_str("1.0852").unwrap());
|
|
let _mid = price.mid_price();
|
|
let _spread = price.spread();
|
|
|
|
// Test OrderBook model
|
|
let mut order_book = OrderBook::new("EURUSD".to_string(), Utc::now());
|
|
let _best_bid = order_book.best_bid();
|
|
let _best_ask = order_book.best_ask();
|
|
|
|
// Test TechnicalIndicator model
|
|
let _indicator = TechnicalIndicator::new(
|
|
"EURUSD".to_string(),
|
|
IndicatorType::Sma,
|
|
Utc::now(),
|
|
Decimal::from_str("1.0851").unwrap(),
|
|
serde_json::json!({"period": 20}),
|
|
);
|
|
|
|
// Test OrderSide enum is hashable
|
|
use std::collections::HashMap;
|
|
let mut side_map: HashMap<BookSide, i32> = HashMap::new();
|
|
side_map.insert(BookSide::Bid, 1);
|
|
side_map.insert(BookSide::Ask, 2);
|
|
|
|
// Test IndicatorType enum is hashable
|
|
let mut indicator_map: HashMap<IndicatorType, String> = HashMap::new();
|
|
indicator_map.insert(IndicatorType::Sma, "SMA".to_string());
|
|
indicator_map.insert(IndicatorType::Ema, "EMA".to_string());
|
|
|
|
Ok(())
|
|
}
|