22 #include <gtest/gtest.h> 
   27 #define private public 
   33 TEST(Property, OperatorAssignString) {
 
   39     std::string s1 = prop;
 
   40     std::string s2 = 
"string";
 
   42     ASSERT_EQ(s1.size(), s2.size()) << 
"Strings s1 and s2 are of unequal length";
 
   44     for (
size_t i = 0; i < s1.size(); ++i)
 
   45         EXPECT_EQ(s1[i], s2[i]) << 
"Strings s1 and s2 differ at index " << i;
 
   51 TEST(Property, OperatorAssignInt) {
 
   57     ASSERT_EQ(prop, 10) << 
"Property value not equal to value set(10)";
 
   65 TEST(Property, OperatorAssignDouble) {
 
   71     ASSERT_EQ(prop, 3.14) << 
"Property value not equal to value set(3.14)";
 
   76 int main(
int argc, 
char **argv) {
 
   77     testing::InitGoogleTest(&argc, argv);
 
   78     return RUN_ALL_TESTS();
 
Template class for storing properties. 
 
int main(int argc, char **argv)
 
TEST(Property, OperatorAssignString)
 
Contains declaration of the Property class.