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

Unified Diff: third_party/WebKit/Source/core/testing/UnionTypesTest.cpp

Issue 2025503002: Revert of Expand WTF::StringView's API to be more like StringPiece. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/core/testing/UnionTypesTest.cpp
diff --git a/third_party/WebKit/Source/core/testing/UnionTypesTest.cpp b/third_party/WebKit/Source/core/testing/UnionTypesTest.cpp
index ebb3aabc6dc3325fc079a31673603518585f1427..3e134f78931103f0b586b1a33ea28b118603cc85 100644
--- a/third_party/WebKit/Source/core/testing/UnionTypesTest.cpp
+++ b/third_party/WebKit/Source/core/testing/UnionTypesTest.cpp
@@ -75,15 +75,12 @@
StringBuilder builder;
for (DoubleOrString& doubleOrString : array) {
ASSERT(!doubleOrString.isNull());
- if (doubleOrString.isDouble()) {
- builder.append("double: ");
- builder.append(String::numberToStringECMAScript(doubleOrString.getAsDouble()));
- } else if (doubleOrString.isString()) {
- builder.append("string: ");
- builder.append(doubleOrString.getAsString());
- } else {
+ if (doubleOrString.isDouble())
+ builder.append("double: " + String::numberToStringECMAScript(doubleOrString.getAsDouble()));
+ else if (doubleOrString.isString())
+ builder.append("string: " + doubleOrString.getAsString());
+ else
ASSERT_NOT_REACHED();
- }
builder.append(", ");
}
return builder.substring(0, builder.length() - 2);

Powered by Google App Engine
This is Rietveld 408576698