instructions: Add tests for Istanbul

This commit is contained in:
Paweł Bylica 2019-07-23 12:27:21 +02:00
parent 7e2fdd5dc1
commit 6a92cb8b38
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 14 additions and 0 deletions

View File

@ -241,3 +241,17 @@ TEST(instructions, petersburg_hard_fork)
EXPECT_STREQ(pn[op], cn[op]) << op;
}
}
TEST(instructions, istanbul_hard_fork)
{
const auto i = evmc_get_instruction_metrics_table(EVMC_ISTANBUL);
const auto p = evmc_get_instruction_metrics_table(EVMC_PETERSBURG);
const auto in = evmc_get_instruction_names_table(EVMC_ISTANBUL);
const auto pn = evmc_get_instruction_names_table(EVMC_PETERSBURG);
for (int op{OP_STOP}; op <= OP_SELFDESTRUCT; ++op)
{
EXPECT_EQ(i[op], p[op]) << op;
EXPECT_STREQ(in[op], pn[op]) << op;
}
}