mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
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
This commit is contained in:
parent
b74c865841
commit
35af1d7e2c
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user