MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / RegisterTest

Function RegisterTest

tests/gtest/gtest.h:14877–14897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14875//
14876template <int&... ExplicitParameterBarrier, typename Factory>
14877TestInfo* 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

Callers

nothing calls this directly

Calls 2

MakeAndRegisterTestInfoFunction · 0.85
CodeLocationClass · 0.85

Tested by

no test coverage detected