Skip to content

Conversation

@goodlyrottenapple
Copy link
Contributor

No description provided.

@goodlyrottenapple goodlyrottenapple force-pushed the sam/monad_revision_test_test_db branch 2 times, most recently from d25f382 to 6162fdc Compare October 21, 2025 10:31
@goodlyrottenapple goodlyrottenapple marked this pull request as ready for review October 21, 2025 10:32
Copilot AI review requested due to automatic review settings October 21, 2025 10:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the test_db tests to use a traits-based testing approach, enabling parameterized testing across different Monad and EVM revisions. The changes introduce template-based fixture classes and leverage the TraitsTest infrastructure to run tests against multiple blockchain revision configurations.

Key changes:

  • Refactored traits_test.hpp to support customizable template parameters for revision type generation
  • Converted test fixtures to template-based TrieDbFixtureTraits that work with both Monad and EVM revisions
  • Migrated specific tests (call_frames_stress_test, assertion_exception, call_frames_refund) from DBTest to DBTraitsTest with revision-specific logic

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/unit/common/include/monad/test/traits_test.hpp Made revision type generators accept template parameters to support custom type wrappers
category/execution/ethereum/db/test/test_db.cpp Introduced traits-based test fixtures and converted three tests to support multiple revisions with revision-specific assertions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@goodlyrottenapple goodlyrottenapple force-pushed the sam/monad_revision_test_test_db branch 2 times, most recently from 342e740 to 33d6807 Compare October 21, 2025 13:02
Comment on lines +159 to +176
template <typename TDB>
struct DBTest : public TDB
{
};

using DBTypes = ::testing::Types<InMemoryTrieDbFixture, OnDiskTrieDbFixture>;
TYPED_TEST_SUITE(DBTest, DBTypes, RevisionTestNameGenerator);

template <typename TDB>
struct DBTraitsTest : public TDB
{
};

TYPED_TEST_SUITE(
DBTraitsTest, MonadEvmRevisionDBTypes, RevisionTestNameGenerator);
Copy link
Contributor Author

@goodlyrottenapple goodlyrottenapple Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goodlyrottenapple goodlyrottenapple force-pushed the sam/monad_revision_test_test_db branch from 33d6807 to 6a26907 Compare October 21, 2025 13:17
@goodlyrottenapple goodlyrottenapple force-pushed the sam/monad_revision_test_test_db branch 6 times, most recently from 4884476 to ef3873e Compare October 28, 2025 12:25
@goodlyrottenapple goodlyrottenapple force-pushed the sam/monad_revision_test_test_db branch from ef3873e to 52fa26c Compare October 28, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants