| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,15 +48,15 @@ template <typename T> | |||
| 48 | 48 | class FooTest : public testing::Test { | |
| 49 | 49 | public: | |
| 50 | 50 | ... | |
| 51 | - typedef std::list<T> List; | ||
| 51 | + using List = ::std::list<T>; | ||
| 52 | 52 | static T shared_; | |
| 53 | 53 | T value_; | |
| 54 | 54 | }; | |
| 55 | 55 | ||
| 56 | 56 | // Next, associate a list of types with the test suite, which will be | |
| 57 | - // repeated for each type in the list. The typedef is necessary for | ||
| 57 | + // repeated for each type in the list. The using-declaration is necessary for | ||
| 58 | 58 | // the macro to parse correctly. | |
| 59 | - typedef testing::Types<char, int, unsigned int> MyTypes; | ||
| 59 | + using MyTypes = ::testing::Types<char, int, unsigned int>; | ||
| 60 | 60 | TYPED_TEST_SUITE(FooTest, MyTypes); | |
| 61 | 61 | ||
| 62 | 62 | // If the type list contains only one type, you can write that type | |
@@ -157,7 +157,7 @@ REGISTER_TYPED_TEST_SUITE_P(FooTest, | |||
| 157 | 157 | // argument to the INSTANTIATE_* macro is a prefix that will be added | |
| 158 | 158 | // to the actual test suite name. Remember to pick unique prefixes for | |
| 159 | 159 | // different instances. | |
| 160 | - typedef testing::Types<char, int, unsigned int> MyTypes; | ||
| 160 | + using MyTypes = ::testing::Types<char, int, unsigned int>; | ||
| 161 | 161 | INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); | |
| 162 | 162 | ||
| 163 | 163 | // If the type list contains only one type, you can write that type | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1610,6 +1610,8 @@ GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1, | |||
| 1610 | 1610 | double val1, double val2, | |
| 1611 | 1611 | double abs_error); | |
| 1612 | 1612 | ||
| 1613 | + using GoogleTest_NotSupported_OnFunctionReturningNonVoid = void; | ||
| 1614 | + | ||
| 1613 | 1615 | // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. | |
| 1614 | 1616 | // A class that enables one to stream messages to assertion macros | |
| 1615 | 1617 | class GTEST_API_ AssertHelper { | |
@@ -1621,7 +1623,8 @@ class GTEST_API_ AssertHelper { | |||
| 1621 | 1623 | ||
| 1622 | 1624 | // Message assignment is a semantic trick to enable assertion | |
| 1623 | 1625 | // streaming; see the GTEST_MESSAGE_ macro below. | |
| 1624 | - void operator=(const Message& message) const; | ||
| 1626 | + GoogleTest_NotSupported_OnFunctionReturningNonVoid operator=( | ||
| 1627 | + const Message& message) const; | ||
| 1625 | 1628 | ||
| 1626 | 1629 | private: | |
| 1627 | 1630 | // We put our data in a struct so that the size of the AssertHelper class can | |
| Back | FazBrowse Home | New Git URL |
0 commit comments