Skip to content

Commit

Permalink
fixup: find only AsmOp decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
paracetamolo committed Dec 16, 2024
1 parent 0fa6f96 commit 8bfdba5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions miden/tests/integration/cli/cli_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn cli_run() -> Result<(), Box<dyn std::error::Error>> {
}

use assembly::Library;
use vm_core::Decorator;

#[test]
fn cli_bundle_debug() {
Expand All @@ -52,12 +53,12 @@ fn cli_bundle_debug() {
cmd.assert().success();

let lib = Library::deserialize_from_file("./tests/integration/cli/data/out.masl").unwrap();
let found_one_decorator = lib
.mast_forest()
.nodes()
.iter()
.any(|node| node.decorators().peekable().peek().is_some());
assert!(found_one_decorator);
// If we find any AsmOp decorator in any node in the forest the bundle is in debug mode.
let found_one_asm_op = lib.mast_forest().nodes().iter().any(|node| {
node.decorators()
.any(|id| matches!(lib.mast_forest()[*id], Decorator::AsmOp(_)))
});
assert!(found_one_asm_op);
fs::remove_file("./tests/integration/cli/data/out.masl").unwrap();
}

Expand Down

0 comments on commit 8bfdba5

Please sign in to comment.