MTUT: A C++ Framework for Cross-Thread Unit Testing
It is often useful to model concurrent interactions for a single class or construct that supports concurrent or reentrant access as a multi-threaded sequence diagram. It would be very useful to be able to express the same sequential representation in a unit test, with the operations in different threads defined in the same flow. I present a framework for doing this. It ships lambda expressions to any number of locally initialized threads, synchronizing, or optionally randomizing, the start times of each thread's block of code, and providing mechanisms to check in an assertion (for example) whether two or more threads are deadlocked or livelocked, whether a point of execution was reached while it was expected to be protected, and other such violations of concurrency expectations. Mechanisms are also provided for looping and timing.
- Not Interested