C++ code and random test classes