From e3acb341b2ff743e186c032326d24bfa8827bedc Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Wed, 27 Jun 2018 01:59:07 +0300 Subject: Remove some tests using AST comparisons, fix other tests --- src/libsyntax/parse/lexer/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/lexer') diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 92fcf865042..bf790e6143a 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1842,7 +1842,8 @@ mod tests { tok: token::Ident(id, false), sp: Span::new(BytePos(21), BytePos(23), NO_EXPANSION), }; - assert_eq!(tok1, tok2); + assert_eq!(tok1.tok, tok2.tok); + assert_eq!(tok1.sp, tok2.sp); assert_eq!(string_reader.next_token().tok, token::Whitespace); // the 'main' id is already read: assert_eq!(string_reader.pos.clone(), BytePos(28)); @@ -1852,7 +1853,8 @@ mod tests { tok: mk_ident("main"), sp: Span::new(BytePos(24), BytePos(28), NO_EXPANSION), }; - assert_eq!(tok3, tok4); + assert_eq!(tok3.tok, tok4.tok); + assert_eq!(tok3.sp, tok4.sp); // the lparen is already read: assert_eq!(string_reader.pos.clone(), BytePos(29)) }) -- cgit 1.4.1-3-g733a5