summaryrefslogtreecommitdiff
path: root/unittests/ExecutionEngine
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2011-12-02 20:53:53 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2011-12-02 20:53:53 +0000
commit35af1d7e2c32cf9743d39577d143110e92e1c8bb (patch)
tree0c83b0d4297c96c6731a5c193c05ae908855e21e /unittests/ExecutionEngine
parentb74c865841481074539bdf4de35024939854f2e6 (diff)
downloadllvm-35af1d7e2c32cf9743d39577d143110e92e1c8bb.tar.gz
llvm-35af1d7e2c32cf9743d39577d143110e92e1c8bb.tar.bz2
llvm-35af1d7e2c32cf9743d39577d143110e92e1c8bb.tar.xz
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')
-rw-r--r--unittests/ExecutionEngine/ExecutionEngineTest.cpp8
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;
};