| Index: Source/wtf/text/AtomicStringTest.cpp
|
| diff --git a/Source/modules/speech/testing/InternalsSpeechSynthesis.cpp b/Source/wtf/text/AtomicStringTest.cpp
|
| similarity index 56%
|
| copy from Source/modules/speech/testing/InternalsSpeechSynthesis.cpp
|
| copy to Source/wtf/text/AtomicStringTest.cpp
|
| index d1e62296a3597b7bb336d1c6328aaab89c9fdb16..263fdc311711842d906ee153cda3e8d01c45748e 100644
|
| --- a/Source/modules/speech/testing/InternalsSpeechSynthesis.cpp
|
| +++ b/Source/wtf/text/AtomicStringTest.cpp
|
| @@ -29,25 +29,36 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "InternalsSpeechSynthesis.h"
|
| +#include "AtomicString.h"
|
|
|
| -#include "core/dom/Document.h"
|
| -#include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
|
| -#include "core/testing/Internals.h"
|
| -#include "modules/speech/DOMWindowSpeechSynthesis.h"
|
| -#include "modules/speech/SpeechSynthesis.h"
|
| +#include <gtest/gtest.h>
|
|
|
| -namespace WebCore {
|
| +namespace {
|
|
|
| -void InternalsSpeechSynthesis::enableMockSpeechSynthesizer(Internals* internals, Document* document)
|
| +TEST(AtomicStringTest, Number)
|
| {
|
| - ASSERT(internals && document && document->domWindow());
|
| -
|
| - SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(document->domWindow());
|
| - if (!synthesis)
|
| - return;
|
| -
|
| - synthesis->setPlatformSynthesizer(PlatformSpeechSynthesizerMock::create(synthesis));
|
| + int intValue = 1234;
|
| + ASSERT_EQ(AtomicString::number(intValue), "1234");
|
| + intValue = -1234;
|
| + ASSERT_EQ(AtomicString::number(intValue), "-1234");
|
| + unsigned unsignedValue = 1234u;
|
| + ASSERT_EQ(AtomicString::number(unsignedValue), "1234");
|
| + long longValue = 6553500;
|
| + ASSERT_EQ(AtomicString::number(longValue), "6553500");
|
| + longValue = -6553500;
|
| + ASSERT_EQ(AtomicString::number(longValue), "-6553500");
|
| + unsigned long unsignedLongValue = 4294967295u;
|
| + ASSERT_EQ(AtomicString::number(unsignedLongValue), "4294967295");
|
| + long long longlongValue = 9223372036854775807;
|
| + ASSERT_EQ(AtomicString::number(longlongValue), "9223372036854775807");
|
| + longlongValue = -9223372036854775807;
|
| + ASSERT_EQ(AtomicString::number(longlongValue), "-9223372036854775807");
|
| + unsigned long long unsignedLongLongValue = 18446744073709551615u;
|
| + ASSERT_EQ(AtomicString::number(unsignedLongLongValue), "18446744073709551615");
|
| + double doubleValue = 1234.56;
|
| + ASSERT_EQ(AtomicString::number(doubleValue), "1234.56");
|
| + doubleValue = 1234.56789;
|
| + ASSERT_EQ(AtomicString::number(doubleValue, 9), "1234.56789");
|
| }
|
|
|
| -} // namespace WebCore
|
| +} // namespace
|
|
|