摘要:
参数化测试or数据驱动可以利用大量的数据跑一个具体的Case,有利于发现问题。至于Google test如何写数据驱动,请参考google的文档。先介绍求Prime素数的类:// The prime table interface.class PrimeTable { public: virtual ~PrimeTable() {} // Returns true iff n is a prime number. virtual bool IsPrime(int n) const = 0; // Returns the smallest prime number greater tha... 阅读全文