mirror of
https://github.com/corda/corda.git
synced 2025-06-15 05:38:14 +00:00
improve c++ test harness
This commit is contained in:
committed by
Joshua Warner
parent
0dbe225049
commit
68bb65cb91
@ -62,35 +62,21 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class BasicAssemblerTest : public Test {
|
||||
public:
|
||||
BasicAssemblerTest():
|
||||
Test("BasicAssembler")
|
||||
{}
|
||||
TEST(BasicAssembler) {
|
||||
BasicEnv env;
|
||||
Asm a(env);
|
||||
}
|
||||
|
||||
virtual void run() {
|
||||
BasicEnv env;
|
||||
Asm a(env);
|
||||
TEST(ArchitecturePlan) {
|
||||
BasicEnv env;
|
||||
|
||||
for(int op = (int)lir::Call; op < (int)lir::AlignedJump; op++) {
|
||||
bool thunk;
|
||||
OperandMask mask;
|
||||
env.arch->plan((lir::UnaryOperation)op, vm::TargetBytesPerWord, mask, &thunk);
|
||||
assertFalse(thunk);
|
||||
assertNotEqual(static_cast<uint8_t>(0), mask.typeMask);
|
||||
assertNotEqual(static_cast<uint64_t>(0), mask.registerMask);
|
||||
}
|
||||
} basicAssemblerTest;
|
||||
|
||||
class ArchitecturePlanTest : public Test {
|
||||
public:
|
||||
ArchitecturePlanTest():
|
||||
Test("ArchitecturePlan")
|
||||
{}
|
||||
|
||||
virtual void run() {
|
||||
BasicEnv env;
|
||||
|
||||
for(int op = (int)lir::Call; op < (int)lir::AlignedJump; op++) {
|
||||
bool thunk;
|
||||
OperandMask mask;
|
||||
env.arch->plan((lir::UnaryOperation)op, vm::TargetBytesPerWord, mask, &thunk);
|
||||
assertFalse(thunk);
|
||||
assertNotEqual(static_cast<uint8_t>(0), mask.typeMask);
|
||||
assertNotEqual(static_cast<uint64_t>(0), mask.registerMask);
|
||||
}
|
||||
|
||||
}
|
||||
} architecturePlanTest;
|
||||
}
|
||||
|
Reference in New Issue
Block a user