Roger Cigol 103 Posted March 25, 2022 I have now added my further blog that explains how I am actually using googleTests on a working (or at least on going development) clang 64 VCL C++ Builder project (using RAD Studio 11.1) https://cigolblog.wordpress.com/2022/03/25/tips-for-using-googletests-with-embarcadero-clang64-for-windows-vcl-projects-2/ Share this post Link to post
Roger Cigol 103 Posted April 11, 2022 GoogleTests has lots of ASSERT_xxxx type functions to cover most common (and indeed uncommon) C++ types. But it doesn’t know about the Embarcadero String type. To make it easy and consistent to do Embarcadero String types I have made a simple C++ unit which I have called ASSERT_STRING_EQ. I simply include ASSERT_STRING_EQ.h at the top of googletest files that require comparisons of String types and make sure ASSERT_STRING_EQ.cpp is added to the project file. The contents of ASSERT_STRING_EQ.cpp is as follows: void ASSERT_STRING_EQ(String A, String B) { ASSERT_STREQ(A.c_str(), B.c_str()); } void ASSERT_STRING_NE(String A, String B) { ASSERT_STRNE(A.c_str(), B.c_str()); } Share this post Link to post