about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-07-12 15:39:18 -0700
committerBrian Anderson <banderson@mozilla.com>2011-07-12 16:54:46 -0700
commited83f28076fd6a189b87405c6b4bf8844eea6f41 (patch)
treef24bdba5aad0e52abd01a9c6f0f4b2993bcb28e3 /src/comp
parentae7b757ac9e1a8501eadf2b05a81660a0cf13bf8 (diff)
downloadrust-ed83f28076fd6a189b87405c6b4bf8844eea6f41.tar.gz
rust-ed83f28076fd6a189b87405c6b4bf8844eea6f41.zip
Log the synthesized __test module. Issue #428
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/test.rs12
1 files 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;
 }