Listing 3 USES CppUnit for such testing.
清单3使用CppUnit执行这些测试。
Download CppUnit: Get the latest version of CppUnit.
下载CppUnit:获取CppUnit的最新版本。
To compile a test that USES CppUnit, you must build sources.
要想编译使用CppUnit的测试,必须构建源代码。
Finally, pass the suite itself on to CppUnit: : TextTestRunner before an invocation of the run method.
最后,把套件本身传递给CppUnit:TextTestRunner,然后再调用run方法。
In frameworks such as CppUnit and CppTest, you need to write substantially more code to generate XML output.
在CppUnit和CppTest等框架中,需要编写很多代码才能生成XML输出。
CppUnit comes with a whole host of predefined classes that you'll make good use of while designing the tests.
CppUnit附带一整套预先定义的类,可以用它们方便地设计测试。
Listing 17 shows the code (from CppUnit sources) that illustrates how individual tests are called for each suite.
清单17中的代码(取自cppunit源代码)说明如何为每个套件调用测试。
To create a test suite without macros, instantiate CppUnit::TestSuite, and then add individual tests to the suite.
要想创建不使用宏的测试套件,应该实例化CppUnit::TestSuite,然后在套件中添加测试。
A fixture, or a TestFixture in the CppUnit context, is meant to provide clean setup and exit routines for individual tests.
在CppUnit上下文中,fixture或TestFixture用于为各个测试提供简洁的设置和退出例程。
Be sure to look into the CppUnit documentation for its class hierarchy and the examples that come with the installation for further details.
一定要查阅CppUnit文档来了解它的类层次结构,通过示例了解详细的安装信息。
Be sure to look into the CppUnit documentation for its class hierarchy and the examples that come with the installation for further details.
一定要查阅CppUnit文档来了解它的类层次结构,通过示例了解详细的安装信息。
应用推荐