Open
Conversation
- Doctest.cmake: create INTERFACE library with correct include root so both '#include <tut/tut.hpp>' and '#include "doctest/doctest.h"' resolve correctly from any test target - test/CMakeLists.txt: add CMAKE_CURRENT_SOURCE_DIR to lltest includes and link the doctest interface target - LLAddBuildTest.cmake: link doctest to unit and integration test targets Without these changes the compiler cannot find doctest/doctest.h or tut/tut.hpp, causing undefined-symbol errors at compile time. Fixes secondlife#4445
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
- lltut.h: rewritten to wrap doctest instead of tut - test.cpp: updated entry point using DOCTEST_CONFIG_IMPLEMENT - test.h: retain tut::sSourceDir declaration for compat - doctest/doctest.h: vendored single-header doctest library - tut/tut.hpp: compatibility shim that includes lltut.h
1ca516e to
5612f12
Compare
Author
|
recheck |
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.
Summary
Replaces the legacy
tuttesting framework with doctest — a lightweight, single-header C++ testing framework.Wallet: 2s37zauxhzbVM5SeLhLiryoGGaqcuv248ekRKU49rbWw
Changes
CMake infrastructure
indra/cmake/Doctest.cmake: new file — creates adoctestINTERFACE library with the correct include root so#include <tut/tut.hpp>and#include "doctest/doctest.h"both resolve from any test targetindra/cmake/LLAddBuildTest.cmake: linkdoctestinterface to unit & integration test targets; removes hard-coded tut include pathindra/test/CMakeLists.txt: addCMAKE_CURRENT_SOURCE_DIRtolltestinclude dirs; linkdoctestinterface targetTest framework files
indra/test/doctest/doctest.h: vendored doctest single-header (v2.4.11)indra/test/tut/tut.hpp: compatibility shim —#include <tut/tut.hpp>now silently redirects tolltut.hso all existing_tut.cppfiles compile without modificationindra/test/lltut.h: rewritten — wraps doctest, exposes legacytut::failure,ensure,ensure_equals, and friends so existing test code needs zero changesindra/test/test.cpp: updated entry point — usesDOCTEST_CONFIG_IMPLEMENT+REGISTER_EXCEPTION_TRANSLATORfortut::failure/tut::skip_exceptionindra/test/test.h: retainstut::sSourceDirdeclaration for compatibilityHow it works
tut::test_group/tut::factorycontinue to work through the shimTEST_CASE/SUBCASE/CHECK/REQUIREdirectlytut::failureis registered as a doctest exception translator so throw-based assertions map to proper doctest failuresCloses #4445