[lexer] Add (failing) test for integers
This commit is contained in:
		
							parent
							
								
									04f2eb0937
								
							
						
					
					
						commit
						0f18569292
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -72,3 +72,11 @@ fn bool_with_spaces() { | |||
|     assert_eq!(lex.next(), Some(Ok(expected_lex))); | ||||
|     assert_eq!(lex.next(), None); | ||||
| } | ||||
| 
 | ||||
| #[test] | ||||
| fn integer() { | ||||
|     let expected_lex = Lex::new(Token::Num(23), "23", 0, 0); | ||||
|     let mut lex = Lexer::new("23".chars()); | ||||
|     assert_eq!(lex.next(), Some(Ok(expected_lex))); | ||||
|     assert_eq!(lex.next(), None); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue