[llvm-commits] [llvm] r145704 - /llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp
Dylan Noblesmith
nobled at dreamwidth.org
Fri Dec 2 12:53:53 PST 2011
Author: nobled
Date: Fri Dec 2 14:53:53 2011
New Revision: 145704
URL: http://llvm.org/viewvc/llvm-project?rev=145704&view=rev
Log:
unittests: add ErrorStr to ExecutionEngine test
Makes failures more self-explanatory.
Modified:
llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp?rev=145704&r1=145703&r2=145704&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/ExecutionEngineTest.cpp Fri Dec 2 14:53:53 2011
@@ -22,12 +22,13 @@
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 @@
}
Module *const M;
+ std::string Error;
const OwningPtr<ExecutionEngine> Engine;
};
More information about the llvm-commits
mailing list