Skip to content

Commit

Permalink
chore: rename mock variable
Browse files Browse the repository at this point in the history
  • Loading branch information
heypoom committed Oct 5, 2023
1 parent 0bf0be0 commit 0f78fbd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ mod tests {

m.mem.load_code(vec![I::Push(h_addr), I::Print, I::Push(w_addr), I::Print]);

let mut print_m = MockPrinter::new();
print_m.expect_print().with(eq("hello, ")).times(1).return_const(());
print_m.expect_print().with(eq("world!")).times(1).return_const(());
let mut mock = MockPrinter::new();
mock.expect_print().with(eq("hello, ")).times(1).return_const(());
mock.expect_print().with(eq("world!")).times(1).return_const(());

let print = move |s: &_| print_m.print(s);
let print = move |s: &_| mock.print(s);
m.handlers.print.push(Box::new(print));

m.run();
Expand Down

0 comments on commit 0f78fbd

Please sign in to comment.