test: green up after Phase 2 merge for #26\n\n- Fix AST tests (is_override)\n- Align MIR builder test with current If AST\n- Adjust ResultBox API usage in tests\n- Add len() helpers to ArrayBox/BufferBox for tests

This commit is contained in:
Moe Charm
2025-08-13 11:53:34 +09:00
parent c6f76505b5
commit 2eba31143a
107 changed files with 6435 additions and 13 deletions

View File

@ -48,6 +48,11 @@ impl ArrayBox {
pub fn length(&self) -> Box<dyn NyashBox> {
Box::new(IntegerBox::new(self.items.lock().unwrap().len() as i64))
}
/// Rust向けヘルパー: 要素数をusizeで取得テスト用
pub fn len(&self) -> usize {
self.items.lock().unwrap().len()
}
/// インデックスで要素を取得
pub fn get(&self, index: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
@ -302,4 +307,4 @@ impl NyashBox for ArrayBox {
BoolBox::new(false)
}
}
}
}