Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
diff --git a/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp b/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
index 4737afcf713517c113c438c90a592b149a7a7d19..55e51f82e841c229d36d67b0706ea709f385eedb 100644
--- a/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
+++ b/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
@@ -30,56 +30,54 @@
#include "wtf/text/AtomicString.h"
#include "wtf/text/WTFString.h"
-#include <ostream> // NOLINT
+#include <ostream> // NOLINT
namespace WTF {
-std::ostream& operator<<(std::ostream& out, const String& string)
-{
- if (string.isNull())
- return out << "<null>";
+std::ostream& operator<<(std::ostream& out, const String& string) {
+ if (string.isNull())
+ return out << "<null>";
- out << '"';
- for (unsigned index = 0; index < string.length(); ++index) {
- // Print shorthands for select cases.
- UChar character = string[index];
- switch (character) {
- case '\t':
- out << "\\t";
- break;
- case '\n':
- out << "\\n";
- break;
- case '\r':
- out << "\\r";
- break;
- case '"':
- out << "\\\"";
- break;
- case '\\':
- out << "\\\\";
- break;
- default:
- if (character >= 0x20 && character < 0x7F) {
- out << static_cast<char>(character);
- } else {
- // Print "\uXXXX" for control or non-ASCII characters.
- out << "\\u";
- out.width(4);
- out.fill('0');
- out.setf(std::ios_base::hex, std::ios_base::basefield);
- out.setf(std::ios::uppercase);
- out << character;
- }
- break;
+ out << '"';
+ for (unsigned index = 0; index < string.length(); ++index) {
+ // Print shorthands for select cases.
+ UChar character = string[index];
+ switch (character) {
+ case '\t':
+ out << "\\t";
+ break;
+ case '\n':
+ out << "\\n";
+ break;
+ case '\r':
+ out << "\\r";
+ break;
+ case '"':
+ out << "\\\"";
+ break;
+ case '\\':
+ out << "\\\\";
+ break;
+ default:
+ if (character >= 0x20 && character < 0x7F) {
+ out << static_cast<char>(character);
+ } else {
+ // Print "\uXXXX" for control or non-ASCII characters.
+ out << "\\u";
+ out.width(4);
+ out.fill('0');
+ out.setf(std::ios_base::hex, std::ios_base::basefield);
+ out.setf(std::ios::uppercase);
+ out << character;
}
+ break;
}
- return out << '"';
+ }
+ return out << '"';
}
-std::ostream& operator<<(std::ostream& out, const AtomicString& s)
-{
- return out << s.string();
+std::ostream& operator<<(std::ostream& out, const AtomicString& s) {
+ return out << s.string();
}
-} // namespace WTF
+} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/testing/RunAllTests.cpp ('k') | third_party/WebKit/Source/wtf/testing/WTFTestPrintersTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698