540 {
541 for (typename TestInfoContainer::iterator test_it = tests_.begin();
542 test_it != tests_.end(); ++test_it) {
543 linked_ptr<TestInfo> test_info = *test_it;
544 for (typename InstantiationContainer::iterator gen_it =
545 instantiations_.begin(); gen_it != instantiations_.end();
546 ++gen_it) {
547 const std::string& instantiation_name = gen_it->name;
550 const char* file = gen_it->file;
551 int line = gen_it->line;
552
553 std::string test_case_name;
554 if ( !instantiation_name.empty() )
555 test_case_name = instantiation_name + "/";
556 test_case_name += test_info->test_case_base_name;
557
558 size_t i = 0;
559 std::set<std::string> test_param_names;
561 generator.begin();
562 param_it != generator.end(); ++param_it, ++i) {
563 Message test_name_stream;
564
565 std::string param_name = name_func(
566 TestParamInfo<ParamType>(*param_it, i));
567
569 << "Parameterized test name '" << param_name
570 << "' is invalid, in " << file
571 << " line " << line << std::endl;
572
574 << "Duplicate parameterized test name '" << param_name
575 << "', in " << file << " line " << line << std::endl;
576
577 test_param_names.insert(param_name);
578
579 test_name_stream << test_info->test_base_name << "/" << param_name;
581 test_case_name.c_str(),
582 test_name_stream.GetString().c_str(),
583 NULL,
584 PrintToString(*param_it).c_str(),
585 code_location_,
587 TestCase::SetUpTestCase,
588 TestCase::TearDownTestCase,
589 test_info->test_meta_factory->CreateTestFactory(*param_it));
590 }
591 }
592 }
593 }
ParamIterator< T > iterator
virtual TypeId GetTestCaseTypeId() const
typedef ParamGenerator(GeneratorCreationFunc)()
ParamNameGenFunc< ParamType >::Type ParamNameGeneratorFunc
#define GTEST_CHECK_(condition)
GTEST_API_ TestInfo * MakeAndRegisterTestInfo(const char *test_case_name, const char *name, const char *type_param, const char *value_param, CodeLocation code_location, TypeId fixture_class_id, SetUpTestCaseFunc set_up_tc, TearDownTestCaseFunc tear_down_tc, TestFactoryBase *factory)