1 Star 0 Fork 1

ngtesting/ci_test_cppunit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
MathTest.h 647 Bytes
一键复制 编辑 原始数据 按行查看 历史
aaronchen2k 提交于 2020-03-18 13:13 +08:00 . init
#include "cppunit/extensions/HelperMacros.h"
//声明一个测试类
class MathTest : public CppUnit::TestFixture {
// 添加一个TestSuite
CPPUNIT_TEST_SUITE( MathTest );
// 添加测试用例到TestSuite, 定义新的测试用例需要在这儿声明一下
CPPUNIT_TEST( testAdd );
CPPUNIT_TEST( testSub );
// TestSuite添加完成
CPPUNIT_TEST_SUITE_END();
protected:
int x, y;
public:
MathTest() {}
// 初始化函数
void setUp ();
// 清理函数
void tearDown();
// 测试加法的测试函数
void testAdd ();
// 测试减法的测试函数
void testSub ();
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ngtesting/ci_test_cppunit.git
git@gitee.com:ngtesting/ci_test_cppunit.git
ngtesting
ci_test_cppunit
ci_test_cppunit
master

搜索帮助