From 0efbcf302cb43005668325b86a7e4a2b30177eee Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Tue, 27 Aug 2019 14:00:02 +0200 Subject: [PATCH] Fix roundtrip test to ignore ListInternal --- test/aeso_parser_tests.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/aeso_parser_tests.erl b/test/aeso_parser_tests.erl index 9b54d94..4c75854 100644 --- a/test/aeso_parser_tests.erl +++ b/test/aeso_parser_tests.erl @@ -86,12 +86,16 @@ parse_expr(Text) -> round_trip(Text) -> Contract = parse_string(Text, [no_implicit_stdlib]), - Text1 = prettypr:format(aeso_pretty:decls(Contract)), + Text1 = prettypr:format(aeso_pretty:decls(strip_stdlib(Contract))), Contract1 = parse_string(Text1, [no_implicit_stdlib]), NoSrcLoc = remove_line_numbers(Contract), NoSrcLoc1 = remove_line_numbers(Contract1), ?assertMatch(NoSrcLoc, diff(NoSrcLoc, NoSrcLoc1)). +strip_stdlib([{namespace, _, {con, _, "ListInternal"}, _} | Decls]) -> + strip_stdlib(Decls); +strip_stdlib(Decls) -> Decls. + remove_line_numbers({line, _L}) -> {line, 0}; remove_line_numbers({col, _C}) -> {col, 0}; remove_line_numbers([H|T]) ->