diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-23 16:47:47 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-28 09:49:20 -0700 |
| commit | 28b285764cd6d9b184584756177199d0f1c32ce3 (patch) | |
| tree | 148a73d40d20814a333da557ba60cac3dae5bcf0 /src/libsyntax/parse/mod.rs | |
| parent | 50a7f5483b4f474d7469ea7709aed8e370eab5ba (diff) | |
| download | rust-28b285764cd6d9b184584756177199d0f1c32ce3.tar.gz rust-28b285764cd6d9b184584756177199d0f1c32ce3.zip | |
comments, helper function for tests, more informative error message
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 0063c7ea876..9381358e161 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -354,6 +354,7 @@ mod test { use core::option::None; use core::int; use core::num::NumCast; + use core::path::Path; use codemap::{dummy_sp, CodeMap, span, BytePos, spanned}; use opt_vec; use ast; @@ -546,6 +547,10 @@ mod test { } + fn parser_done(p: Parser){ + assert_eq!(*p.token,token::EOF); + } + #[test] fn parse_ident_pat () { let parser = string_to_parser(@~"b"); assert_eq!(parser.parse_pat(false), @@ -560,7 +565,7 @@ mod test { None // no idea ), span: sp(0,1)}); - assert_eq!(*parser.token,token::EOF); + parser_done(parser); } #[test] fn parse_arg () { |
