Extend EventValue with std::string and double payload types - #6
Merged
Conversation
Add std::string and double as EventValue alternatives alongside bool and int32_t. Add representative Catch2 coverage for each new type (initial image/snapshot, debounce send-vs-suppress, heartbeat resend, equality-driven suppression), plus a CTest death test proving the documented std::get<TValue> -> std::terminate() crash contract still holds on a genuine type mismatch. WILL_FAIL/PASS_REGULAR_EXPRESSION can't detect a signal-killed subprocess, so the death test runs through run_death_test.sh, which absorbs the signal and reports pass/fail via a normal exit code (POSIX-only, gated by if(UNIX)). Update AGENTS.md and doc/developer-guide.md to reflect the extended variant.
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
EventValue(include/tickguard/EventValue.hpp) tostd::variant<bool, std::int32_t, double, std::string>tests/EventDescriptorTests.cpp: initial image/snapshot, debounce send-vs-suppress, heartbeat resend, equality-driven suppressiontests/EventDescriptorTypeMismatchDeathTest.cpp— a CTest death test proving the documentedstd::get<TValue>→std::terminate()crash contract still holds on a genuine type mismatch (EventDescriptor<bool>fed astd::string)WILL_FAIL/PASS_REGULAR_EXPRESSIONcan't detect a signal-killed subprocess (CTest reports it as an unconditional "Exception"), so the test runs throughtests/run_death_test.sh, which absorbs the signal itself and reports pass/fail via a normal exit code. POSIX-only, gated byif(UNIX)intests/CMakeLists.txt.AGENTS.mdanddoc/developer-guide.mdto reflect the extended variantTest plan
cmake --build buildsucceedsctest --test-dir build --output-on-failure— 26/26 tests pass (was 17 before this branch of work)clang-format --dry-run --Werrorcleanclang-tidyclean oninclude/tickguard/EventValue.hpp