Skip to content

Commit

Permalink
ah, actually assert on the result
Browse files Browse the repository at this point in the history
  • Loading branch information
froydnj committed Aug 22, 2023
1 parent 914c03a commit c76afd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/yarp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ mod tests {

let node = result.node();
let upcast_node = node.as_program_node().unwrap().as_node();
matches!(upcast_node, Node::ProgramNode { .. });
assert!(matches!(upcast_node, Node::ProgramNode { .. }));

let node = node.as_program_node().unwrap().statements().body().iter().next().unwrap();
let upcast_node = node.as_module_node().unwrap().as_node();
matches!(upcast_node, Node::ModuleNode { .. });
assert!(matches!(upcast_node, Node::ModuleNode { .. }));
}
}

0 comments on commit c76afd8

Please sign in to comment.