Skip to content

Commit

Permalink
Fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeRoggenbuck committed Sep 5, 2024
1 parent fcc3f46 commit a6c2a33
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,16 @@ mod tests {

#[test]
fn parse_test() {
let mut local_memory = HashMap::new();

local_memory.insert(
"e".to_string(),
Token {
token_type: TokenType::NumericDecLiteral,
value: std::f64::consts::E.to_string(),
},
);

let input1 = vec![
Token {
token_type: TokenType::NumericIntLiteral,
Expand All @@ -479,7 +489,7 @@ mod tests {
},
];

let out1 = parse(input1);
let out1 = parse(input1, &mut local_memory);

assert_eq!(
out1,
Expand All @@ -504,7 +514,7 @@ mod tests {
},
];

let out2 = parse(input2);
let out2 = parse(input2, &mut local_memory);

assert_eq!(
out2,
Expand Down Expand Up @@ -537,7 +547,7 @@ mod tests {
},
];

let out3 = parse(input3);
let out3 = parse(input3, &mut local_memory);

assert_eq!(
out3,
Expand Down

0 comments on commit a6c2a33

Please sign in to comment.