下载google test 下载地址:https://github.com/google/googletest/tree/v1.10.x (我用的是1.10.x版本) main.cc #include #include “gtest/gtest.h” int Add(int a, int b) { return a + b; } int Sub(int a, int b){ return a - b; } TEST(testCase, test0){ EXPECT_EQ(14, Add(4, 10)); } TEST(testCase, test1){ ASSE