source code of loki library and its corresponding cppunit tests