Skip to content

Commit

Permalink
Clippy did too much
Browse files Browse the repository at this point in the history
  • Loading branch information
3top1a committed Feb 10, 2025
1 parent 82d5f95 commit 7a17996
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/lir/tests.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
mod tests {
use crate::bf::optim::remove_nonbf;
use crate::lir::codegen::Codegen;



use crate::lir::lir::Instruction;
use crate::lir::lir::{BinaryOp, Instruction, Location, Value};
use crate::lir::lir::Instruction::{
Binary, Copy, Dup, Match, Pop, Print, Push, Read, Swap, While,
};
use crate::lir::lir::Location::{Stack, Variable};
use crate::lir::lir::Value::Immediate;

fn eq(code: String, b: &str) {
println!("{}", code);
Expand All @@ -25,7 +27,7 @@ mod tests {
Push(4),
Push(9),
Copy {
from: Value::Location(Location::Stack),
from: Value::Location(Stack),
to: Variable(0),
},
]);
Expand All @@ -36,7 +38,7 @@ mod tests {
let c = gen(vec![
Push(2),
Copy {
from: Value::Immediate(4),
from: Immediate(4),
to: Variable(0),
},
]);
Expand Down Expand Up @@ -65,8 +67,8 @@ mod tests {
Push(9),
Binary {
op: BinaryOp::Add,
modified: Location::Stack,
consumed: Value::Location(Location::Stack),
modified: Stack,
consumed: Value::Location(Stack),
},
],
">++++>+++++++++[-<+>]<",
Expand All @@ -80,8 +82,8 @@ mod tests {
Push(4),
Binary {
op: BinaryOp::Sub,
modified: Location::Stack,
consumed: Value::Location(Location::Stack),
modified: Stack,
consumed: Value::Location(Stack),
},
],
">+++++++++>++++[-<->]<",
Expand Down

0 comments on commit 7a17996

Please sign in to comment.