| 14875 | // |
| 14876 | template <int&... ExplicitParameterBarrier, typename Factory> |
| 14877 | TestInfo* RegisterTest(const char* test_suite_name, const char* test_name, |
| 14878 | const char* type_param, const char* value_param, |
| 14879 | const char* file, int line, Factory factory) { |
| 14880 | using TestT = typename std::remove_pointer<decltype(factory())>::type; |
| 14881 | |
| 14882 | class FactoryImpl : public internal::TestFactoryBase { |
| 14883 | public: |
| 14884 | explicit FactoryImpl(Factory f) : factory_(std::move(f)) {} |
| 14885 | Test* CreateTest() override { return factory_(); } |
| 14886 | |
| 14887 | private: |
| 14888 | Factory factory_; |
| 14889 | }; |
| 14890 | |
| 14891 | return internal::MakeAndRegisterTestInfo( |
| 14892 | test_suite_name, test_name, type_param, value_param, |
| 14893 | internal::CodeLocation(file, line), internal::GetTypeId<TestT>(), |
| 14894 | internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line), |
| 14895 | internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line), |
| 14896 | new FactoryImpl{std::move(factory)}); |
| 14897 | } |
| 14898 | |
| 14899 | } // namespace testing |
| 14900 |
nothing calls this directly
no test coverage detected