use self::super::lexer::Lexer;
#[test]
fn parse_whitespace_multiple() {
let mut lexer = Lexer {source: " hello_there".chars().peekable()};
let end = lexer.parse_whitespace();
assert_eq!(lexer.peek(), end);
assert_eq!(lexer.peek(), end);
assert_eq!(lexer.next(), end);
}
#[test]
fn parse_whitespace_not_whitespace() {
let mut lexer = Lexer {source: " hello_there".chars().peekable()};
let end = lexer.parse_whitespace();
assert_ne!(end, Some(' ')); assert_ne!(end, Some('\n'));
assert_ne!(lexer.peek(), Some(' ')); assert_ne!(lexer.peek(), Some('\n'));
assert_ne!(lexer.next(), Some(' ')); assert_ne!(lexer.next(), Some('\n'));
}