Stabilize joinir tests and env guards
This commit is contained in:
@ -615,15 +615,26 @@ fn joinir_stageb_funcscanner_structure_test() {
|
||||
mir_module.functions.len()
|
||||
);
|
||||
|
||||
// 構造チェック: MIR 関数数が JoinIR 関数数と一致
|
||||
assert_eq!(
|
||||
mir_module.functions.len(),
|
||||
join_module.functions.len(),
|
||||
"MIR function count should match JoinIR function count"
|
||||
// 構造チェック: JoinIR の関数名は MIR に存在すること
|
||||
let mut missing = Vec::new();
|
||||
for join_func in join_module.functions.values() {
|
||||
if !mir_module.functions.contains_key(&join_func.name) {
|
||||
missing.push(join_func.name.clone());
|
||||
}
|
||||
}
|
||||
assert!(
|
||||
missing.is_empty(),
|
||||
"MIR should contain all JoinIR function names, missing={:?}",
|
||||
missing
|
||||
);
|
||||
|
||||
// 各関数の Block 数をチェック
|
||||
for (name, func) in &mir_module.functions {
|
||||
// 各関数の Block 数をチェック(JoinIR の関数に対応するものだけ)
|
||||
for join_func in join_module.functions.values() {
|
||||
let name = &join_func.name;
|
||||
let func = mir_module
|
||||
.functions
|
||||
.get(name)
|
||||
.expect("JoinIR function should exist in MIR");
|
||||
let block_count = func.blocks.len();
|
||||
eprintln!(
|
||||
"[joinir/stageb_funcscanner] Function '{}': {} blocks",
|
||||
|
||||
Reference in New Issue
Block a user