Remove some tests using AST comparisons, fix other tests
This commit is contained in:
@@ -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))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user