summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
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
commitf6f9f1dd4a000d4e941436132bc42fb3a2669233 (patch)
treeba941e233c7aca75a22efba10e24e623172c9ec8 /llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
parent132bd622cf8917ffec03e985d8d184a0ae2efe33 (diff)
downloadbcm5719-llvm-f6f9f1dd4a000d4e941436132bc42fb3a2669233.tar.gz
bcm5719-llvm-f6f9f1dd4a000d4e941436132bc42fb3a2669233.zip
unittests: add ErrorStr to ExecutionEngine test
Makes failures more self-explanatory. llvm-svn: 145704
Diffstat (limited to 'llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp b/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
index 4dcef20c6e7..74a2ccdd066 100644
--- a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
+++ b/llvm/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;
};
OpenPOWER on IntegriCloud