There is an existing C++ unit test framework in there. Please see nupic/nta/engine/unittests for some examples. All of these tests I think get built into one binary, called "testeverything", by the build system.