Index: Source/wtf/text/StringBuilderTest.cpp |
diff --git a/Source/wtf/text/StringBuilderTest.cpp b/Source/wtf/text/StringBuilderTest.cpp |
index cbeb4464e51daa4bb4aa2130a3ef74e668c35b8e..3856f35d4521484a03c65f9bb05ec9c8a10f23d5 100644 |
--- a/Source/wtf/text/StringBuilderTest.cpp |
+++ b/Source/wtf/text/StringBuilderTest.cpp |
@@ -35,6 +35,7 @@ |
#include "wtf/text/CString.h" |
#include "wtf/text/StringBuilder.h" |
#include "wtf/text/WTFString.h" |
+#include "wtf/unicode/CharacterNames.h" |
#include <gtest/gtest.h> |
namespace WTF { |
@@ -316,4 +317,16 @@ TEST(StringBuilderTest, Substring) |
} |
} |
+TEST(StringBuilderTest, AppendNumberDoubleUChar) |
+{ |
+ const double someNumber = 1.2345; |
+ StringBuilder reference; |
+ reference.append(replacementCharacter); // Make it UTF-16. |
+ reference.append(String::number(someNumber)); |
+ StringBuilder test; |
+ test.append(replacementCharacter); |
+ test.appendNumber(someNumber); |
+ ASSERT_EQ(reference, test); |
+} |
+ |
} // namespace |