| Index: Source/core/testing/UnionTypesTest.cpp
|
| diff --git a/Source/core/testing/UnionTypesTest.cpp b/Source/core/testing/UnionTypesTest.cpp
|
| index 5e34b96cf0ad2e699b7e18fd6d53499783c32285..a88763add977c898a968ac8b4d400ea6661acdbe 100644
|
| --- a/Source/core/testing/UnionTypesTest.cpp
|
| +++ b/Source/core/testing/UnionTypesTest.cpp
|
| @@ -50,4 +50,28 @@ String UnionTypesTest::doubleOrStringArg(DoubleOrString& doubleOrString)
|
| return String();
|
| }
|
|
|
| +String UnionTypesTest::doubleOrStringArrayArg(Vector<DoubleOrString>& array)
|
| +{
|
| + if (!array.size())
|
| + return "";
|
| +
|
| + StringBuilder builder;
|
| + for (DoubleOrString& doubleOrString : array) {
|
| + ASSERT(!doubleOrString.isNull());
|
| + 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);
|
| +}
|
| +
|
| +String UnionTypesTest::doubleOrStringSequenceArg(Vector<DoubleOrString>& sequence)
|
| +{
|
| + return doubleOrStringArrayArg(sequence);
|
| +}
|
| +
|
| }
|
|
|