This testing issue was identified during a Codex code review.
Add focused regression and contract tests for the uncovered cases found during the review:
- move construction and move assignment of a default
thread_pool_task;
- conversion of
unique_ptr2<Derived> to a base type without a virtual destructor, where appropriate as a documented contract test;
- stopping and destroying a thread pool from one of its worker threads, where testable without terminating the main test process;
- construction of
basic_thread_pool with zero threads;
- iteration, reverse iteration, and iterator subtraction for empty
buffer, buffer_view, and cbuffer_view;
- compile-time iterator-concept checks and representative standard algorithms;
- null function pointers, null member-function pointers, and empty
std::function targets in cl::function;
- lvalue and move-only callbacks passed to
multiple_timer;
periodic_timer with zero periods;
- all empty
buffer construction and copy paths;
- actual callback exception handling in
periodic_timer;
- direct behavioral tests for
event and spinlock.
The existing PeriodicTimer.CatchesExceptionInCallback test should also be corrected because it currently does not configure the callback to throw.
This testing issue was identified during a Codex code review.
Add focused regression and contract tests for the uncovered cases found during the review:
thread_pool_task;unique_ptr2<Derived>to a base type without a virtual destructor, where appropriate as a documented contract test;basic_thread_poolwith zero threads;buffer,buffer_view, andcbuffer_view;std::functiontargets incl::function;multiple_timer;periodic_timerwith zero periods;bufferconstruction and copy paths;periodic_timer;eventandspinlock.The existing
PeriodicTimer.CatchesExceptionInCallbacktest should also be corrected because it currently does not configure the callback to throw.