Removed test_case from test_pow().

This commit is contained in:
PaddiM8 2020-06-05 16:20:50 +02:00
parent dab1006eb7
commit e7cbbc45c2

View File

@ -310,7 +310,6 @@ fn is_at_end(context: &mut Context) -> bool {
mod tests {
use super::*;
use crate::lexer::{Token, TokenKind::*};
use test_case::test_case;
fn parse_with_context(context: &mut Context, tokens: Vec<Token>) -> Result<Stmt, String> {
context.tokens = tokens;
@ -390,17 +389,17 @@ mod tests {
);
}
#[test_case(Star, Plus)]
fn test_pow(op1: TokenKind, op2: TokenKind) {
#[test]
fn test_pow() {
let tokens = vec![
token(Literal, "1"),
token(op1.clone(), ""),
token(Star, ""),
token(Literal, "2"),
token(Power, ""),
token(Literal, "3"),
token(Power, ""),
token(Literal, "4"),
token(op2, ""),
token(Plus, ""),
token(Literal, "5"),
];
@ -409,7 +408,7 @@ mod tests {
Stmt::Expr(binary(
binary(
literal("1"),
op1,
Star,
binary(
literal("2"),
Power,