Settings in the CPPUnit environment in VC6

xiaoxiao2021-03-06  65

CPPUnit is a C unit test framework that is evolved from the JUnit project. Junit is a masterpiece of the famous Kent and Gamma. As a framework for unit testing, CPPUnit is receiving more and more attention.

I use CPPUnit-1.9.0, using VC6CPPUNIT-1.9.0 / Examples Engineering files. Select Batch Build under Build in the VC environment. All compiled CPPUnit, you can start setting up the use environment of CPPUnit.

In the setting of Project: 1. Open tab C / C , select PreProcessor in the Category drop-down list, then fill in the CPPUnit's include directory cppunit-1.9.0 / include. 2, in the C / C tab, select C Language in the Category drop-down list to ensure that the following "Enable Run-Time Type Information (RTTI" is selected. 3. In the C / C tab, select Code Generator in the Category drop-down list and make sure that User Run-Time Library is "Multithreaded DLL". 4. Switch to the Link tab, add CPPUnit.lib and Testrunner.lib two library files in Object / Library Modules. 5. Since the library file is added, then it is to specify the location of the library file. Open "Option" under the "Tools" menu, pop up the "Options" dialog, select the Directories tab, add CPPUnit-1.9.0 / include in the include files. Add CPPUnit-1.9.0 / lib in LIB Files, add CPPUnit-1.9.0 / SRC / CPPUnit in Source Files.

Ok, let's write here, I am first studying CPPUnit, I hope to have more related articles in the future.

转载请注明原文地址:https://www.9cbs.com/read-118998.html

New Post(0)