Lines Matching refs:test_case
331 static bool TestCasePassed(const TestCase* test_case) {
332 return test_case->should_run() && test_case->Passed();
336 static bool TestCaseFailed(const TestCase* test_case) {
337 return test_case->should_run() && test_case->Failed();
340 // Returns true iff test_case contains at least one test that should
342 static bool ShouldRunTestCase(const TestCase* test_case) {
343 return test_case->should_run();
1947 const TestCase* const test_case = impl->current_test_case();
1950 const TestInfo* const first_test_info = test_case->test_info_list()[0];
2695 static void PrintTestName(const char * test_case, const char * test) {
2696 printf("%s.%s", test_case, test);
2704 virtual void OnTestCaseStart(const TestCase& test_case);
2708 virtual void OnTestCaseEnd(const TestCase& test_case);
2761 void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
2763 FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
2765 printf("%s from %s", counts.c_str(), test_case.name());
2766 if (test_case.type_param() == NULL) {
2769 printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param());
2812 void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {
2816 FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
2819 counts.c_str(), test_case.name(),
2820 internal::StreamableToString(test_case.elapsed_time()).c_str());
2839 const TestCase& test_case = *unit_test.GetTestCase(i);
2840 if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
2843 for (int j = 0; j < test_case.total_test_count(); ++j) {
2844 const TestInfo& test_info = *test_case.GetTestInfo(j);
2849 printf("%s.%s", test_case.name(), test_info.name());
2915 virtual void OnTestCaseStart(const TestCase& test_case);
2919 virtual void OnTestCaseEnd(const TestCase& test_case);
3066 const TestCase& test_case);
3330 const TestCase& test_case) {
3333 OutputXmlAttribute(stream, kTestsuite, "name", test_case.name());
3335 StreamableToString(test_case.reportable_test_count()));
3337 StreamableToString(test_case.failed_test_count()));
3340 StreamableToString(test_case.reportable_disabled_test_count()));
3343 FormatTimeInMillisAsSeconds(test_case.elapsed_time()));
3344 *stream << TestPropertiesAsXmlAttributes(test_case.ad_hoc_test_result())
3347 for (int i = 0; i < test_case.total_test_count(); ++i) {
3348 if (test_case.GetTestInfo(i)->is_reportable())
3349 OutputXmlTestInfo(stream, test_case.name(), *test_case.GetTestInfo(i));
4148 // Returns true iff the name of test_case matches name_.
4149 bool operator()(const TestCase* test_case) const {
4150 return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0;
4174 const std::vector<TestCase*>::const_iterator test_case =
4178 if (test_case != test_cases_.end())
4179 return *test_case;
4464 TestCase* const test_case = test_cases_[i];
4465 const std::string &test_case_name = test_case->name();
4466 test_case->set_should_run(false);
4468 for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
4469 TestInfo* const test_info = test_case->test_info_list()[j];
4498 test_case->set_should_run(test_case->should_run() || is_selected);
4532 const TestCase* const test_case = test_cases_[i];
4535 for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
4537 test_case->test_info_list()[j];
4541 printf("%s.", test_case->name());
4542 if (test_case->type_param() != NULL) {
4546 PrintOnOneLine(test_case->type_param(), kMaxParamLength);