-1
我正在将一些在Xcode中编写的目标C中的测试转换为C++,以便与Google测试一起使用。从Xcode转换Objective C测试到C++的Google测试
我知道XCTAssertTrue(variable == 1);
在目标C中更改为EXPECT_EQ(variable, 1)
用于谷歌测试的C++。
我不确定的是如何将XCTAssertTrue(EQUALS(variable.length, 1));
转换为适用于Google测试的C++。任何帮助将不胜感激。谢谢!
在C/C++中有'assert'(和'static_assert',因为C11/C++ 11),主要区别是:'assert'在运行时工作,'static_assert'在编译时。 –