diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-05-07 14:52:28 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-05-07 14:52:28 +0800 |
commit | ec1dc3542bd5122db57f4459f63a6040f5e3ab20 (patch) | |
tree | 5b4733cf5f443f93a884e0782e685ad106c86579 | |
parent | ecc745aec490518b1264fece8b5ab9c1aab8fadf (diff) | |
download | mrust-ec1dc3542bd5122db57f4459f63a6040f5e3ab20.tar.gz |
Main - Load test crate when compiling a test
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index f06ee545..83fd5ac3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -314,6 +314,10 @@ int main(int argc, char *argv[]) // - `mrustc-main` lang item default crate.m_lang_items.insert(::std::make_pair( ::std::string("mrustc-main"), ::AST::Path("", {AST::PathNode("main")}) )); } + if( params.test_harness ) + { + crate.load_extern_crate(Span(), "test"); + } // Resolve names to be absolute names (include references to the relevant struct/global/function) // - This does name checking on types and free functions. |