Test case fixup (old one tested the old bad behavior).
This commit is contained in:
parent
fdf8543cf6
commit
b5ace4df45
1 changed files with 12 additions and 12 deletions
|
|
@ -312,18 +312,18 @@ mod test {
|
|||
@~"fn foo (x : int) { x; }",
|
||||
~[],
|
||||
new_parse_sess(None));
|
||||
check_equal(to_json_str(@tts as @Encodable<std::json::Encoder>),
|
||||
~"[[\"tt_tok\",[,[\"IDENT\",[\"fn\",false]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"foo\",false]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[,[\"LPAREN\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[,[\"COLON\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"int\",false]]]],\
|
||||
[\"tt_tok\",[,[\"RPAREN\",[]]]]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[,[\"LBRACE\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[,[\"SEMI\",[]]]],\
|
||||
[\"tt_tok\",[,[\"RBRACE\",[]]]]]]]]"
|
||||
check_equal(to_json_str(@tts as Encodable::<std::json::Encoder>),
|
||||
~"[[\"tt_tok\",[null,[\"IDENT\",[\"fn\",false]]]],\
|
||||
[\"tt_tok\",[null,[\"IDENT\",[\"foo\",false]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[null,[\"LPAREN\",[]]]],\
|
||||
[\"tt_tok\",[null,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[null,[\"COLON\",[]]]],\
|
||||
[\"tt_tok\",[null,[\"IDENT\",[\"int\",false]]]],\
|
||||
[\"tt_tok\",[null,[\"RPAREN\",[]]]]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[null,[\"LBRACE\",[]]]],\
|
||||
[\"tt_tok\",[null,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[null,[\"SEMI\",[]]]],\
|
||||
[\"tt_tok\",[null,[\"RBRACE\",[]]]]]]]]"
|
||||
);
|
||||
let ast1 = new_parser_from_tts(new_parse_sess(None),~[],tts)
|
||||
.parse_item(~[]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue