Lines Matching refs:stream

375     "This flag specifies the host name and the port number on which to stream "
1403 // stream.
1405 // adds. It also adds the hunk header before printint into the stream.
2059 ::std::stringstream stream;
2073 stream << CodePointToUtf8(unicode_code_point);
2075 return StringStreamToString(&stream);
3310 // We need to flush the stream buffers into the console before each
3906 static void PrintXmlTestsList(std::ostream* stream,
3943 static void OutputXmlAttribute(std::ostream* stream,
3949 static void OutputXmlCDataSection(::std::ostream* stream, const char* data);
3954 static void OutputXmlTestSuiteForTestResult(::std::ostream* stream,
3958 static void OutputXmlTestResult(::std::ostream* stream,
3962 static void OutputXmlTestInfo(::std::ostream* stream,
3967 static void PrintXmlTestSuite(::std::ostream* stream,
3970 // Prints an XML summary of unit_test to output stream out.
3971 static void PrintXmlUnitTest(::std::ostream* stream,
3982 static void OutputXmlTestProperties(std::ostream* stream,
4004 std::stringstream stream;
4005 PrintXmlUnitTest(&stream, unit_test);
4006 fprintf(xmlout, "%s", StringStreamToString(&stream).c_str());
4013 std::stringstream stream;
4014 PrintXmlTestsList(&stream, test_suites);
4015 fprintf(xmlout, "%s", StringStreamToString(&stream).c_str());
4153 void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream,
4156 *stream << "<![CDATA[";
4160 stream->write(segment,
4162 *stream << "]]>]]&gt;<![CDATA[";
4165 *stream << segment;
4169 *stream << "]]>";
4173 std::ostream* stream, const std::string& element_name,
4183 *stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\"";
4188 ::std::ostream* stream, const TestResult& result) {
4190 *stream << " <testsuite";
4191 OutputXmlAttribute(stream, "testsuite", "name", "NonTestSuiteFailure");
4192 OutputXmlAttribute(stream, "testsuite", "tests", "1");
4193 OutputXmlAttribute(stream, "testsuite", "failures", "1");
4194 OutputXmlAttribute(stream, "testsuite", "disabled", "0");
4195 OutputXmlAttribute(stream, "testsuite", "skipped", "0");
4196 OutputXmlAttribute(stream, "testsuite", "errors", "0");
4197 OutputXmlAttribute(stream, "testsuite", "time",
4200 stream, "testsuite", "timestamp",
4202 *stream << ">";
4205 *stream << " <testcase";
4206 OutputXmlAttribute(stream, "testcase", "name", "");
4207 OutputXmlAttribute(stream, "testcase", "status", "run");
4208 OutputXmlAttribute(stream, "testcase", "result", "completed");
4209 OutputXmlAttribute(stream, "testcase", "classname", "");
4210 OutputXmlAttribute(stream, "testcase", "time",
4213 stream, "testcase", "timestamp",
4217 OutputXmlTestResult(stream, result);
4220 *stream << " </testsuite>\n";
4224 void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
4234 *stream << " <testcase";
4235 OutputXmlAttribute(stream, kTestsuite, "name", test_info.name());
4238 OutputXmlAttribute(stream, kTestsuite, "value_param",
4242 OutputXmlAttribute(stream, kTestsuite, "type_param",
4246 OutputXmlAttribute(stream, kTestsuite, "file", test_info.file());
4247 OutputXmlAttribute(stream, kTestsuite, "line",
4250 *stream << " />\n";
4254 OutputXmlAttribute(stream, kTestsuite, "status",
4256 OutputXmlAttribute(stream, kTestsuite, "result",
4260 OutputXmlAttribute(stream, kTestsuite, "time",
4263 stream, kTestsuite, "timestamp",
4265 OutputXmlAttribute(stream, kTestsuite, "classname", test_suite_name);
4267 OutputXmlTestResult(stream, result);
4270 void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream,
4278 *stream << ">\n";
4284 *stream << " <failure message=\"" << EscapeXmlAttribute(summary)
4287 OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
4288 *stream << "</failure>\n";
4291 *stream << ">\n";
4297 *stream << " <skipped message=\""
4300 OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
4301 *stream << "</skipped>\n";
4306 *stream << " />\n";
4309 *stream << ">\n";
4311 OutputXmlTestProperties(stream, result);
4312 *stream << " </testcase>\n";
4317 void XmlUnitTestResultPrinter::PrintXmlTestSuite(std::ostream* stream,
4320 *stream << " <" << kTestsuite;
4321 OutputXmlAttribute(stream, kTestsuite, "name", test_suite.name());
4322 OutputXmlAttribute(stream, kTestsuite, "tests",
4325 OutputXmlAttribute(stream, kTestsuite, "failures",
4328 stream, kTestsuite, "disabled",
4330 OutputXmlAttribute(stream, kTestsuite, "skipped",
4333 OutputXmlAttribute(stream, kTestsuite, "errors", "0");
4335 OutputXmlAttribute(stream, kTestsuite, "time",
4338 stream, kTestsuite, "timestamp",
4340 *stream << TestPropertiesAsXmlAttributes(test_suite.ad_hoc_test_result());
4342 *stream << ">\n";
4345 OutputXmlTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i));
4347 *stream << " </" << kTestsuite << ">\n";
4350 // Prints an XML summary of unit_test to output stream out.
4351 void XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream,
4355 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
4356 *stream << "<" << kTestsuites;
4358 OutputXmlAttribute(stream, kTestsuites, "tests",
4360 OutputXmlAttribute(stream, kTestsuites, "failures",
4363 stream, kTestsuites, "disabled",
4365 OutputXmlAttribute(stream, kTestsuites, "errors", "0");
4366 OutputXmlAttribute(stream, kTestsuites, "time",
4369 stream, kTestsuites, "timestamp",
4373 OutputXmlAttribute(stream, kTestsuites, "random_seed",
4376 *stream << TestPropertiesAsXmlAttributes(unit_test.ad_hoc_test_result());
4378 OutputXmlAttribute(stream, kTestsuites, "name", "AllTests");
4379 *stream << ">\n";
4383 PrintXmlTestSuite(stream, *unit_test.GetTestSuite(i));
4389 OutputXmlTestSuiteForTestResult(stream, unit_test.ad_hoc_test_result());
4392 *stream << "</" << kTestsuites << ">\n";
4396 std::ostream* stream, const std::vector<TestSuite*>& test_suites) {
4399 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
4400 *stream << "<" << kTestsuites;
4406 OutputXmlAttribute(stream, kTestsuites, "tests",
4408 OutputXmlAttribute(stream, kTestsuites, "name", "AllTests");
4409 *stream << ">\n";
4412 PrintXmlTestSuite(stream, *test_suite);
4414 *stream << "</" << kTestsuites << ">\n";
4431 std::ostream* stream, const TestResult& result) {
4439 *stream << " <" << kProperties << ">\n";
4442 *stream << " <" << kProperty;
4443 *stream << " name=\"" << EscapeXmlAttribute(property.key()) << "\"";
4444 *stream << " value=\"" << EscapeXmlAttribute(property.value()) << "\"";
4445 *stream << "/>\n";
4447 *stream << " </" << kProperties << ">\n";
4462 static void PrintJsonTestList(::std::ostream* stream,
4471 static void OutputJsonKey(std::ostream* stream,
4475 static void OutputJsonKey(std::ostream* stream,
4483 static void OutputJsonTestSuiteForTestResult(::std::ostream* stream,
4487 static void OutputJsonTestResult(::std::ostream* stream,
4491 static void OutputJsonTestInfo(::std::ostream* stream,
4496 static void PrintJsonTestSuite(::std::ostream* stream,
4499 // Prints a JSON summary of unit_test to output stream out.
4500 static void PrintJsonUnitTest(::std::ostream* stream,
4527 std::stringstream stream;
4528 PrintJsonUnitTest(&stream, unit_test);
4529 fprintf(jsonout, "%s", StringStreamToString(&stream).c_str());
4602 void JsonUnitTestResultPrinter::OutputJsonKey(std::ostream* stream,
4616 *stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\"";
4617 if (comma) *stream << ",\n";
4621 std::ostream* stream, const std::string& element_name,
4631 *stream << indent << "\"" << name << "\": " << StreamableToString(value);
4632 if (comma) *stream << ",\n";
4637 ::std::ostream* stream, const TestResult& result) {
4639 *stream << Indent(4) << "{\n";
4640 OutputJsonKey(stream, "testsuite", "name", "NonTestSuiteFailure", Indent(6));
4641 OutputJsonKey(stream, "testsuite", "tests", 1, Indent(6));
4643 OutputJsonKey(stream, "testsuite", "failures", 1, Indent(6));
4644 OutputJsonKey(stream, "testsuite", "disabled", 0, Indent(6));
4645 OutputJsonKey(stream, "testsuite", "skipped", 0, Indent(6));
4646 OutputJsonKey(stream, "testsuite", "errors", 0, Indent(6));
4647 OutputJsonKey(stream, "testsuite", "time",
4650 OutputJsonKey(stream, "testsuite", "timestamp",
4654 *stream << Indent(6) << "\"testsuite\": [\n";
4657 *stream << Indent(8) << "{\n";
4658 OutputJsonKey(stream, "testcase", "name", "", Indent(10));
4659 OutputJsonKey(stream, "testcase", "status", "RUN", Indent(10));
4660 OutputJsonKey(stream, "testcase", "result", "COMPLETED", Indent(10));
4661 OutputJsonKey(stream, "testcase", "timestamp",
4664 OutputJsonKey(stream, "testcase", "time",
4667 OutputJsonKey(stream, "testcase", "classname", "", Indent(10), false);
4668 *stream << TestPropertiesAsJson(result, Indent(10));
4671 OutputJsonTestResult(stream, result);
4674 *stream << "\n" << Indent(6) << "]\n" << Indent(4) << "}";
4678 void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream,
4685 *stream << Indent(8) << "{\n";
4686 OutputJsonKey(stream, kTestsuite, "name", test_info.name(), kIndent);
4689 OutputJsonKey(stream, kTestsuite, "value_param", test_info.value_param(),
4693 OutputJsonKey(stream, kTestsuite, "type_param", test_info.type_param(),
4697 OutputJsonKey(stream, kTestsuite, "file", test_info.file(), kIndent);
4698 OutputJsonKey(stream, kTestsuite, "line", test_info.line(), kIndent, false);
4700 *stream << "\n" << Indent(8) << "}";
4703 *stream << ",\n";
4706 OutputJsonKey(stream, kTestsuite, "status",
4708 OutputJsonKey(stream, kTestsuite, "result",
4713 OutputJsonKey(stream, kTestsuite, "timestamp",
4716 OutputJsonKey(stream, kTestsuite, "time",
4718 OutputJsonKey(stream, kTestsuite, "classname", test_suite_name, kIndent,
4720 *stream << TestPropertiesAsJson(result, kIndent);
4722 OutputJsonTestResult(stream, result);
4725 void JsonUnitTestResultPrinter::OutputJsonTestResult(::std::ostream* stream,
4733 *stream << ",\n";
4735 *stream << kIndent << "\""
4743 *stream << kIndent << " {\n"
4750 if (failures > 0) *stream << "\n" << kIndent << "]";
4751 *stream << "\n" << Indent(8) << "}";
4756 std::ostream* stream, const TestSuite& test_suite) {
4760 *stream << Indent(4) << "{\n";
4761 OutputJsonKey(stream, kTestsuite, "name", test_suite.name(), kIndent);
4762 OutputJsonKey(stream, kTestsuite, "tests", test_suite.reportable_test_count(),
4765 OutputJsonKey(stream, kTestsuite, "failures",
4767 OutputJsonKey(stream, kTestsuite, "disabled",
4769 OutputJsonKey(stream, kTestsuite, "errors", 0, kIndent);
4771 stream, kTestsuite, "timestamp",
4774 OutputJsonKey(stream, kTestsuite, "time",
4777 *stream << TestPropertiesAsJson(test_suite.ad_hoc_test_result(), kIndent)
4781 *stream << kIndent << "\"" << kTestsuite << "\": [\n";
4787 *stream << ",\n";
4791 OutputJsonTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i));
4794 *stream << "\n" << kIndent << "]\n" << Indent(4) << "}";
4797 // Prints a JSON summary of unit_test to output stream out.
4798 void JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream* stream,
4802 *stream << "{\n";
4804 OutputJsonKey(stream, kTestsuites, "tests", unit_test.reportable_test_count(),
4806 OutputJsonKey(stream, kTestsuites, "failures", unit_test.failed_test_count(),
4808 OutputJsonKey(stream, kTestsuites, "disabled",
4810 OutputJsonKey(stream, kTestsuites, "errors", 0, kIndent);
4812 OutputJsonKey(stream, kTestsuites, "random_seed", unit_test.random_seed(),
4815 OutputJsonKey(stream, kTestsuites, "timestamp",
4818 OutputJsonKey(stream, kTestsuites, "time",
4822 *stream << TestPropertiesAsJson(unit_test.ad_hoc_test_result(), kIndent)
4825 OutputJsonKey(stream, kTestsuites, "name", "AllTests", kIndent);
4826 *stream << kIndent << "\"" << kTestsuites << "\": [\n";
4832 *stream << ",\n";
4836 PrintJsonTestSuite(stream, *unit_test.GetTestSuite(i));
4844 *stream << ",\n";
4846 OutputJsonTestSuiteForTestResult(stream, unit_test.ad_hoc_test_result());
4849 *stream << "\n"
4855 std::ostream* stream, const std::vector<TestSuite*>& test_suites) {
4858 *stream << "{\n";
4863 OutputJsonKey(stream, kTestsuites, "tests", total_tests, kIndent);
4865 OutputJsonKey(stream, kTestsuites, "name", "AllTests", kIndent);
4866 *stream << kIndent << "\"" << kTestsuites << "\": [\n";
4870 *stream << ",\n";
4872 PrintJsonTestSuite(stream, *test_suites[i]);
4875 *stream << "\n"
6207 std::stringstream stream;
6211 .PrintXmlTestsList(&stream, test_suites_);
6215 .PrintJsonTestList(&stream, test_suites_);
6217 fprintf(fileout, "%s", StringStreamToString(&stream).c_str());