Skip to content

Commit

Permalink
Skip Osaka tests, avoid generating eof validation tests without vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-dc committed May 29, 2024
1 parent 364a4c6 commit 3e89613
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 18 deletions.
3 changes: 0 additions & 3 deletions test/unittests/eof_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ void eof_validation::export_eof_validation_test()
}
}

if (jvectors.empty())
return;

std::ofstream{export_file_path} << std::setw(2) << j;
}
} // namespace evmone::test
1 change: 1 addition & 0 deletions test/unittests/eof_validation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ TEST_F(eof_validation, before_activation)
{
ASSERT_EQ(evmone::validate_eof(EVMC_CANCUN, bytes(eof_bytecode(OP_STOP))),
EOFValidationError::eof_version_unknown);
skip_generate_copier = true; // Avoid generating copier with no vectors
}

TEST_F(eof_validation, validate_empty_code)
Expand Down
16 changes: 6 additions & 10 deletions test/unittests/state_transition_block_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ TEST_F(state_transition, block_apply_withdrawal)
tx.to = To;
expect.post[withdrawal_address].balance = intx::uint256{3} * 1'000'000'000;

skip_generate_copier = true; // Skip ethereum test generation because the withdrawals are not
// available in retesteth.
skip_generate_copier = true; // withdrawals are not available in state tests.
}

TEST_F(state_transition, known_block_hash)
Expand All @@ -34,8 +33,7 @@ TEST_F(state_transition, known_block_hash)
expect.post[To].storage[0x01_bytes32] =
0x0000000000000000000000000000000000000000000000000000000000000111_bytes32;

skip_generate_copier = true; // Skip generating test because the block hash is not available in
// retesteth.
skip_generate_copier = true; // Block hash is not available in state tests.
}

TEST_F(state_transition, known_block_hash_fake)
Expand All @@ -48,8 +46,7 @@ TEST_F(state_transition, known_block_hash_fake)
expect.post[To].storage[0x01_bytes32] =
0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6_bytes32;

skip_generate_copier = true; // Skip generating test because evmone-t8n does not return the
// fake block hash
skip_generate_copier = true; // Block hash is not available in state tests.
}

TEST_F(state_transition, block_apply_ommers_reward)
Expand All @@ -69,8 +66,7 @@ TEST_F(state_transition, block_apply_ommers_reward)
// Two ommers +1/32 * block_reward for each. +21000 cost of the tx goes to coinbase.
expect.post[Coinbase].balance = 21000 + intx::uint256{block_reward} + block_reward / 16;

skip_generate_copier = true; // Skip ethereum test generation because the ommers are not
// available in ethereum state tests.
skip_generate_copier = true; // ommers are not available in state tests.
}

TEST_F(state_transition, eip7516_blob_base_fee)
Expand All @@ -83,6 +79,6 @@ TEST_F(state_transition, eip7516_blob_base_fee)

expect.post[To].storage[0x4a_bytes32] = 0xabcd_bytes32;

skip_generate_copier = true; // Skip ethereum test generation because the blob base fee is not
// available in retesteth.
skip_generate_copier = true; // blob base fee is not available in state
// tests.
}
5 changes: 0 additions & 5 deletions test/unittests/state_transition_eip663_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ TEST_F(state_transition, dupn)
});
expect.post[*tx.to].storage[0x00_bytes32] = 0x01_bytes32;
expect.post[*tx.to].storage[0x01_bytes32] = 0x02_bytes32;
skip_generate_copier = true;
}

TEST_F(state_transition, swapn)
Expand All @@ -33,8 +32,6 @@ TEST_F(state_transition, swapn)
});
expect.post[*tx.to].storage[0x00_bytes32] = 0x01_bytes32;
expect.post[*tx.to].storage[0x01_bytes32] = 0x02_bytes32;

skip_generate_copier = true;
}

TEST_F(state_transition, exchange)
Expand All @@ -49,6 +46,4 @@ TEST_F(state_transition, exchange)
expect.post[*tx.to].storage[0x00_bytes32] = 0x03_bytes32;
expect.post[*tx.to].storage[0x01_bytes32] = 0x01_bytes32;
expect.post[*tx.to].storage[0x02_bytes32] = 0x02_bytes32;

skip_generate_copier = true;
}
Loading

0 comments on commit 3e89613

Please sign in to comment.