From d36991a0b6c768ac0a166db80181c784cd938eb4 Mon Sep 17 00:00:00 2001 From: NotAFile Date: Thu, 3 Feb 2022 21:48:20 +0100 Subject: [PATCH] remove broken tests --- src/parser/mod.rs | 33 --------------------------------- src/parser/module.rs | 22 ---------------------- src/parser/proc.rs | 26 -------------------------- 3 files changed, 81 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index f221913..79d8343 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -28,36 +28,3 @@ use nom::combinator::all_consuming; pub fn parse(input: TokenSpan) -> IResult { all_consuming(module)(input) } - -#[cfg(test)] -mod test { - use super::*; - use nom::combinator::all_consuming; - - #[test] - fn test_operation() { - operation(" a | b ".into()).unwrap(); - operation(" a & b ".into()).unwrap(); - } - - #[test] - fn test_expression() { - expression(" a ".into()).unwrap(); - expression(" a | b ".into()).unwrap(); - expression(" a | b | c ".into()).unwrap(); - } - - #[test] - fn test_assignment() { - // TODO: make wrapper and use for all tests - all_consuming(assign_statement)(" a = b ".into()).unwrap(); - all_consuming(assign_statement)(" a = b | c ".into()).unwrap(); - } - - #[test] - fn test_call() { - call_item("thing ( )".into()).unwrap(); - call_item("thing ( a , b , c )".into()).unwrap(); - call_item("thing(a,b,c)".into()).unwrap(); - } -} diff --git a/src/parser/module.rs b/src/parser/module.rs index f25d22f..f04a1fd 100644 --- a/src/parser/module.rs +++ b/src/parser/module.rs @@ -57,25 +57,3 @@ pub fn module(input: TokenSpan) -> IResult { |items| Module { items }, )(input) } - -#[cfg(test)] -mod test { - use super::*; - use nom::combinator::all_consuming; - - #[test] - fn test_decl() { - declaration("reg abcd".into()).unwrap(); - } - - #[test] - fn test_assignment_item() { - all_consuming(assign_item)(" assign a = b ; ".into()).unwrap(); - all_consuming(assign_item)(" assign a = b | c ; ".into()).unwrap(); - } - - #[test] - fn test_module_item() { - all_consuming(module_item)(" assign a = b ;".into()).unwrap(); - } -} diff --git a/src/parser/proc.rs b/src/parser/proc.rs index dbfd7a0..7f52de4 100644 --- a/src/parser/proc.rs +++ b/src/parser/proc.rs @@ -91,29 +91,3 @@ pub fn proc_block(input: TokenSpan) -> IResult { ), )(input) } - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_statement() { - proc_statement(" abc = def ".into()).unwrap(); - } - - #[test] - fn test_match_arm() { - match_arm(" 1 => abc = def ".into()).unwrap(); - } - - #[test] - fn test_match_block() { - let input = " - match (asdf) { - 1 => a = 0, - 2 => c = ~d - } - "; - match_block(input.into()).unwrap(); - } -}