这个宏需要一个字符串作为测试套件的名称。
The macro expects a string that is the name of the test suite.
我们稍后研究这些宏及其内容,但是先看看使用这个测试套件的客户机代码(见 清单11)。
We'll examine these macros and their contents in a moment, but first, take a look at the client code in Listing 11, which uses this test suite.
注意,RUN_ALL_TESTS自动地探测并运行用test宏定义的所有测试。
Note that RUN_ALL_TESTS automatically detects and runs all the tests defined using the test macro.
只需调用预定义的run_all_tests宏,而不需要通过创建或驱动单独的运行器类来执行测试。
Just making a call to the predefined RUN_ALL_TESTS macro does the trick, as opposed to creating or deriving a separate runner class for test execution.
使用 BOOST_TEST_CASE宏创建的单元测试以函数指针作为输入参数。
The unit tests that are created using the BOOST_TEST_CASE macros accept function pointers as their input arguments.
创建不使用宏的测试套件。
Boost有一整套测试工具,基本上可以说它们是用于验证表达式的宏。
Boost has a whole host of test tools, which are basically macros used to validate expressions.
基本思想是使用Boost提供的宏来测试各个类特性。
The basic idea is to test individual class features using Boost-provided macros.
每个测试套件(比如清单17中的ts1)都是使用BOOST _ test_suite宏创建的。
Each test suite (for example, ts1 in Listing 17) is created by using the macro BOOST_TEST_SUITE.
要想创建不使用宏的测试套件,应该实例化CppUnit::TestSuite,然后在套件中添加测试。
To create a test suite without macros, instantiate CppUnit::TestSuite, and then add individual tests to the suite.
在HelperMacros . h中定义的CPPUNIT _ test_suite宏可以简化创建测试套件并在其中添加测试的流程。
The CPPUNIT_TEST_SUITE macro, defined in HelperMacros.h, simplifies creating a test suite and adding individual tests to it.
运行这个测试时,尽管使用的是作为标准库一部分提供的sqrt函数,boost_check宏仍然会失败。
On running this test, the BOOST_CHECK macro fails despite the fact that you're using the SQRT function provided as part of the standard library.
以下宏用于修改了本库的源代码后进行测试。
The following macros are useful for testing when changing the source code of the library.
对剃齿刀断口进行了宏、微观检验、化学成分分析、硬度测试和非金属夹杂物及显微组织检验。
Micro-analysis of the Internal Control Performance System of Capital Operation of State-owned Commercial Banks Based on Data Validation;
对剃齿刀断口进行了宏、微观检验、化学成分分析、硬度测试和非金属夹杂物及显微组织检验。
Micro-analysis of the Internal Control Performance System of Capital Operation of State-owned Commercial Banks Based on Data Validation;
应用推荐