chore: Move lexical cast tests to gtest - #7873
Merged
bthomee merged 8 commits intoJul 29, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
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
beastmodule to thesrc/tests/libxrplgtest test-module list so its sources are compiled intoxrpl_tests. - Re-implement the
LexicalCasttest coverage using gtest (typed tests + targeted regression tests). - Remove the old Beast
unit_test-basedLexicalCast_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.
bthomee
reviewed
Jul 27, 2026
mathbunnyru
requested changes
Jul 28, 2026
mathbunnyru
approved these changes
Jul 29, 2026
bthomee
reviewed
Jul 29, 2026
godexsoft
requested review from
bthomee and
Copilot
and removed request for
Copilot
July 29, 2026 13:48
bthomee
approved these changes
Jul 29, 2026
bthomee
enabled auto-merge
July 29, 2026 17:51
bthomee
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.