tesseract v5.3.3.20231005
testing::internal::TypeParameterizedTestSuite< Fixture, Tests, Types > Class Template Reference

#include <gtest-internal.h>

Static Public Member Functions

static bool Register (const char *prefix, CodeLocation code_location, const TypedTestSuitePState *state, const char *case_name, const char *test_names, const std::vector< std::string > &type_names=GenerateNames< DefaultNameGenerator, Types >())
 

Detailed Description

template<GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
class testing::internal::TypeParameterizedTestSuite< Fixture, Tests, Types >

Definition at line 776 of file gtest-internal.h.

Member Function Documentation

◆ Register()

template<GTEST_TEMPLATE_ Fixture, typename Tests , typename Types >
static bool testing::internal::TypeParameterizedTestSuite< Fixture, Tests, Types >::Register ( const char *  prefix,
CodeLocation  code_location,
const TypedTestSuitePState *  state,
const char *  case_name,
const char *  test_names,
const std::vector< std::string > &  type_names = GenerateNames<DefaultNameGeneratorTypes>() 
)
inlinestatic

Definition at line 778 of file gtest-internal.h.

782 {
784 std::string test_name = StripTrailingSpaces(
785 GetPrefixUntilComma(test_names));
786 if (!state->TestExists(test_name)) {
787 fprintf(stderr, "Failed to get code location for test %s.%s at %s.",
788 case_name, test_name.c_str(),
789 FormatFileLocation(code_location.file.c_str(),
790 code_location.line).c_str());
791 fflush(stderr);
792 posix::Abort();
793 }
794 const CodeLocation& test_location = state->GetCodeLocation(test_name);
795
796 typedef typename Tests::Head Head;
797
798 // First, register the first test in 'Test' for each type in 'Types'.
800 prefix, test_location, case_name, test_names, 0, type_names);
801
802 // Next, recurses (at compile time) with the tail of the test list.
803 return TypeParameterizedTestSuite<Fixture, typename Tests::Tail,
804 Types>::Register(prefix, code_location,
805 state, case_name,
806 SkipComma(test_names),
807 type_names);
808 }
internal::ProxyTypeList< Ts... > Types
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
Definition: gtest-port.cc:1023
std::string GetPrefixUntilComma(const char *str)
GTEST_API_ void RegisterTypeParameterizedTestSuiteInstantiation(const char *case_name)
Definition: gtest.cc:518
std::string StripTrailingSpaces(std::string str)
Definition: gtest-port.h:1968
static bool Register(const char *prefix, const CodeLocation &code_location, const char *case_name, const char *test_names, int index, const std::vector< std::string > &type_names=GenerateNames< DefaultNameGenerator, Types >())
static bool Register(const char *prefix, CodeLocation code_location, const TypedTestSuitePState *state, const char *case_name, const char *test_names, const std::vector< std::string > &type_names=GenerateNames< DefaultNameGenerator, Types >())

The documentation for this class was generated from the following file: