Skip to content

chore: Move lexical cast tests to gtest - #7873

Merged
bthomee merged 8 commits into
XRPLF:developfrom
godexsoft:chore/gtest-migrate-lexical-cast
Jul 29, 2026
Merged

chore: Move lexical cast tests to gtest#7873
bthomee merged 8 commits into
XRPLF:developfrom
godexsoft:chore/gtest-migrate-lexical-cast

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR migrates lexical cast tests from beast to gtest.

Context of Change

Migration to gtest.

API Impact

No impact.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 migrates the LexicalCast unit tests from the legacy Beast unit_test::Suite harness (src/test/...) to the gtest-based xrpl_tests binary (src/tests/libxrpl/...), aligning Beast component coverage with the newer test infrastructure.

Changes:

  • Add the beast module to the src/tests/libxrpl gtest test-module list so its sources are compiled into xrpl_tests.
  • Re-implement the LexicalCast test coverage using gtest (typed tests + targeted regression tests).
  • Remove the old Beast unit_test-based LexicalCast_test.cpp.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/tests/libxrpl/CMakeLists.txt Registers the new beast gtest module so its tests are built into xrpl_tests.
src/tests/libxrpl/beast/LexicalCast.cpp Adds gtest-based LexicalCast coverage (round-trip, boundaries, overflow/underflow, throw variants, UTF-8 digits).
src/test/beast/LexicalCast_test.cpp Removes the legacy Beast unit_test suite version of these tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/test/beast/LexicalCast_test.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread src/tests/libxrpl/CMakeLists.txt
Comment thread src/tests/libxrpl/beast/LexicalCast.cpp Outdated
Comment thread src/tests/libxrpl/beast/LexicalCast.cpp
Comment thread src/tests/libxrpl/beast/LexicalCast.cpp Outdated
@godexsoft
godexsoft requested a review from mathbunnyru July 28, 2026 18:57
Comment thread include/xrpl/beast/core/LexicalCast.h
Comment thread src/tests/libxrpl/beast/LexicalCast.cpp
Comment thread include/xrpl/beast/core/LexicalCast.h
@godexsoft
godexsoft requested review from bthomee and Copilot and removed request for Copilot July 29, 2026 13:48
@godexsoft godexsoft added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jul 29, 2026
@bthomee
bthomee enabled auto-merge July 29, 2026 17:51
@bthomee
bthomee added this pull request to the merge queue Jul 29, 2026
Merged via the queue into XRPLF:develop with commit 6ddad54 Jul 29, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants