Catch是一个不错的单元测试框架,帮助刷Leetcode
github在此
使用也比较简单,最简单的方式就是直接下载Catch.hpp,做好引用。
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
#include <vector>
using namespace std;
unsigned int Factorial( unsigned int number ) {
return number > 1 ? Factorial(number-

本文介绍了C++单元测试框架Catch,它适用于LeetCode题目测试。通过下载Catch.hpp头文件并简单引用,即可进行单元测试。编译时可以使用g++并指定c++11标准。
最低0.47元/天 解锁文章
1114

被折叠的 条评论
为什么被折叠?



