c++ source code and tests