Add crash logger snapshot test - #62
Merged
Merged
Conversation
Add a crash logger test that stubs _exit, triggers the handler, and verifies the crash log snapshot.
Update the crash logger test to avoid std::filesystem so it builds under the C++11 standard, include the public utility headers before touching crash logger internals, and switch includes to the exported logit_cpp paths while using simple std::remove cleanup.
Adjust crash logger test to use exported include paths without duplicating the logit_cpp prefix.
Ensure the crash logger test pulls in configuration macros by including logit/config.hpp before other logit headers so compilation succeeds when the test is built on CI.
Move the LogIt entry header before the platform-specific block and rely on it to provide crash logger definitions while keeping the exit stub in place.
Include the platform exit headers before redefining _exit and give the stub C linkage so macOS and Windows builds use the correct symbol.
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
_exit, trigger the crash handler directly, and assert that the crash log captures the buffered messages and marker on each platformTesting
https://chatgpt.com/codex/tasks/task_e_68c8964781b8832cae81d47b9447d7eb