about summary refs log tree commit diff
path: root/src/comp/front
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-01-05 18:16:42 -0800
committerBrian Anderson <banderson@mozilla.com>2012-01-05 18:16:56 -0800
commit51e6df689cf292e10e99bc011baae6d82a1d4b71 (patch)
tree89713dc098d8b184b76ebd8e5498ec43dafc44ad /src/comp/front
parentd2218d9c9cb4cbd28e3de44c152f1b270f185e58 (diff)
rustc: Allow the test runner to run unexported tests
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/test.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs
index 46293c80310..bb2e5426938 100644
--- a/src/comp/front/test.rs
+++ b/src/comp/front/test.rs
@@ -187,9 +187,12 @@ fn mk_test_module(cx: test_ctxt) -> @ast::item {
     let mainfn = mk_main(cx);
     let testmod: ast::_mod = {view_items: [], items: [mainfn, testsfn]};
     let item_ = ast::item_mod(testmod);
+    // This attribute tells resolve to let us call unexported functions
+    let resolve_unexported_attr =
+        attr::mk_attr(attr::mk_word_item("!resolve_unexported"));
     let item: ast::item =
         {ident: "__test",
-         attrs: [],
+         attrs: [resolve_unexported_attr],
          id: cx.sess.next_node_id(),
          node: item_,
          span: dummy_sp()};