mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-09 15:08:11 +01:00
Removed test_case from test_pow().
This commit is contained in:
parent
dab1006eb7
commit
e7cbbc45c2
@ -310,7 +310,6 @@ fn is_at_end(context: &mut Context) -> bool {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::lexer::{Token, TokenKind::*};
|
use crate::lexer::{Token, TokenKind::*};
|
||||||
use test_case::test_case;
|
|
||||||
|
|
||||||
fn parse_with_context(context: &mut Context, tokens: Vec<Token>) -> Result<Stmt, String> {
|
fn parse_with_context(context: &mut Context, tokens: Vec<Token>) -> Result<Stmt, String> {
|
||||||
context.tokens = tokens;
|
context.tokens = tokens;
|
||||||
@ -390,17 +389,17 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test_case(Star, Plus)]
|
#[test]
|
||||||
fn test_pow(op1: TokenKind, op2: TokenKind) {
|
fn test_pow() {
|
||||||
let tokens = vec![
|
let tokens = vec![
|
||||||
token(Literal, "1"),
|
token(Literal, "1"),
|
||||||
token(op1.clone(), ""),
|
token(Star, ""),
|
||||||
token(Literal, "2"),
|
token(Literal, "2"),
|
||||||
token(Power, ""),
|
token(Power, ""),
|
||||||
token(Literal, "3"),
|
token(Literal, "3"),
|
||||||
token(Power, ""),
|
token(Power, ""),
|
||||||
token(Literal, "4"),
|
token(Literal, "4"),
|
||||||
token(op2, ""),
|
token(Plus, ""),
|
||||||
token(Literal, "5"),
|
token(Literal, "5"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -409,7 +408,7 @@ mod tests {
|
|||||||
Stmt::Expr(binary(
|
Stmt::Expr(binary(
|
||||||
binary(
|
binary(
|
||||||
literal("1"),
|
literal("1"),
|
||||||
op1,
|
Star,
|
||||||
binary(
|
binary(
|
||||||
literal("2"),
|
literal("2"),
|
||||||
Power,
|
Power,
|
||||||
|
Loading…
Reference in New Issue
Block a user