From ed83f28076fd6a189b87405c6b4bf8844eea6f41 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 12 Jul 2011 15:39:18 -0700 Subject: [PATCH] Log the synthesized __test module. Issue #428 --- src/comp/front/test.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs index 4c5f53d4bc1..f2ffbce2ea0 100644 --- a/src/comp/front/test.rs +++ b/src/comp/front/test.rs @@ -4,6 +4,7 @@ import std::option; import std::ivec; import syntax::ast; import syntax::fold; +import syntax::print::pprust; import front::attr; export modify_for_testing; @@ -148,10 +149,13 @@ fn mk_test_module(&test_ctxt cx) -> @ast::item { items=~[mainfn, testsfn]); auto item_ = ast::item_mod(testmod); let ast::item item = rec(ident = "__test", - attrs = ~[], - id = cx.next_node_id(), - node = item_, - span = rec(lo=0u, hi=0u)); + attrs = ~[], + id = cx.next_node_id(), + node = item_, + span = rec(lo=0u, hi=0u)); + + log #fmt("Synthetic test module:\n%s\n", pprust::item_to_str(@item)); + ret @item; }