diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-12-02 20:53:53 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-12-02 20:53:53 +0000 |
commit | 35af1d7e2c32cf9743d39577d143110e92e1c8bb (patch) | |
tree | 0c83b0d4297c96c6731a5c193c05ae908855e21e /unittests/ExecutionEngine/ExecutionEngineTest.cpp | |
parent | b74c865841481074539bdf4de35024939854f2e6 (diff) |
unittests: add ErrorStr to ExecutionEngine test
Makes failures more self-explanatory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine/ExecutionEngineTest.cpp')
-rw-r--r-- | unittests/ExecutionEngine/ExecutionEngineTest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unittests/ExecutionEngine/ExecutionEngineTest.cpp b/unittests/ExecutionEngine/ExecutionEngineTest.cpp index 4dcef20c6e..74a2ccdd06 100644 --- a/unittests/ExecutionEngine/ExecutionEngineTest.cpp +++ b/unittests/ExecutionEngine/ExecutionEngineTest.cpp @@ -22,12 +22,13 @@ namespace { class ExecutionEngineTest : public testing::Test { protected: ExecutionEngineTest() - : M(new Module("<main>", getGlobalContext())), - Engine(EngineBuilder(M).create()) { + : M(new Module("<main>", getGlobalContext())), Error(""), + Engine(EngineBuilder(M).setErrorStr(&Error).create()) { } virtual void SetUp() { - ASSERT_TRUE(Engine.get() != NULL); + ASSERT_TRUE(Engine.get() != NULL) << "EngineBuilder returned error: '" + << Error << "'"; } GlobalVariable *NewExtGlobal(Type *T, const Twine &Name) { @@ -36,6 +37,7 @@ protected: } Module *const M; + std::string Error; const OwningPtr<ExecutionEngine> Engine; }; |