Skip to content

Commit

Permalink
test(vm): test conditional without a block evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
taizu-jin committed Sep 22, 2023
1 parent 3d7f068 commit 419fe42
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,4 +605,18 @@ mod tests {

run_vm_tests(tests)
}

#[test]
fn test_conditionals_without_bock() -> Result<()> {
let tests = def_case_bool!(
"IF rbap_false. 10. ENDIF.",
false,
"IF rbap_true. ELSE. 20. ENDIF.",
true,
"IF rbap_true. ELSE. ENDIF.",
true
);

run_vm_tests(tests)
}
}

0 comments on commit 419fe42

Please sign in to comment.