OLD | NEW |
1 // Copyright 2005, Google Inc. | 1 // Copyright 2005, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // a pointer to be safe. | 244 // a pointer to be safe. |
245 #define GTEST_FORMAT_CHAR_PTR_IMPL_(CharType) \ | 245 #define GTEST_FORMAT_CHAR_PTR_IMPL_(CharType) \ |
246 template <typename T> \ | 246 template <typename T> \ |
247 String FormatForComparisonFailureMessage(CharType* GTEST_CREF_WORKAROUND_ p, \ | 247 String FormatForComparisonFailureMessage(CharType* GTEST_CREF_WORKAROUND_ p, \ |
248 const T&) { \ | 248 const T&) { \ |
249 return PrintToString(static_cast<const void*>(p)); \ | 249 return PrintToString(static_cast<const void*>(p)); \ |
250 } | 250 } |
251 | 251 |
252 GTEST_FORMAT_CHAR_PTR_IMPL_(char) | 252 GTEST_FORMAT_CHAR_PTR_IMPL_(char) |
253 GTEST_FORMAT_CHAR_PTR_IMPL_(const char) | 253 GTEST_FORMAT_CHAR_PTR_IMPL_(const char) |
| 254 #if GTEST_HAS_WCHAR |
254 GTEST_FORMAT_CHAR_PTR_IMPL_(wchar_t) | 255 GTEST_FORMAT_CHAR_PTR_IMPL_(wchar_t) |
255 GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t) | 256 GTEST_FORMAT_CHAR_PTR_IMPL_(const wchar_t) |
| 257 #endif |
256 | 258 |
257 #undef GTEST_FORMAT_CHAR_PTR_IMPL_ | 259 #undef GTEST_FORMAT_CHAR_PTR_IMPL_ |
258 | 260 |
259 // Constructs and returns the message for an equality assertion | 261 // Constructs and returns the message for an equality assertion |
260 // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. | 262 // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. |
261 // | 263 // |
262 // The first four parameters are the expressions used in the assertion | 264 // The first four parameters are the expressions used in the assertion |
263 // and their values, as strings. For example, for ASSERT_EQ(foo, bar) | 265 // and their values, as strings. For example, for ASSERT_EQ(foo, bar) |
264 // where foo is 5 and bar is 6, we have: | 266 // where foo is 5 and bar is 6, we have: |
265 // | 267 // |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 ::testing::internal::MakeAndRegisterTestInfo(\ | 1225 ::testing::internal::MakeAndRegisterTestInfo(\ |
1224 #test_case_name, #test_name, NULL, NULL, \ | 1226 #test_case_name, #test_name, NULL, NULL, \ |
1225 (parent_id), \ | 1227 (parent_id), \ |
1226 parent_class::SetUpTestCase, \ | 1228 parent_class::SetUpTestCase, \ |
1227 parent_class::TearDownTestCase, \ | 1229 parent_class::TearDownTestCase, \ |
1228 new ::testing::internal::TestFactoryImpl<\ | 1230 new ::testing::internal::TestFactoryImpl<\ |
1229 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 1231 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ |
1230 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() | 1232 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() |
1231 | 1233 |
1232 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ | 1234 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ |
OLD | NEW |