blob: ee91492664799d71726f62ff64996cbed40d561a [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/test.gni")
visibility = [ "//sky/*" ]
component("wtf") {
sources = [
"ASCIICType.h",
"AddressSpaceRandomization.cpp",
"AddressSpaceRandomization.h",
"Alignment.h",
"ArrayBuffer.cpp",
"ArrayBuffer.h",
"ArrayBufferBuilder.cpp",
"ArrayBufferBuilder.h",
"ArrayBufferContents.cpp",
"ArrayBufferContents.h",
"ArrayBufferDeallocationObserver.h",
"ArrayBufferView.cpp",
"ArrayBufferView.h",
"ArrayPiece.cpp",
"ArrayPiece.h",
"Assertions.cpp",
"Assertions.h",
"Atomics.h",
"BitArray.h",
"BitVector.cpp",
"BitVector.h",
"BitwiseOperations.h",
"BloomFilter.h",
"ByteOrder.h",
"ByteSwap.h",
"CPU.h",
"CheckedArithmetic.h",
"Compiler.h",
"Complex.h",
"CryptographicallyRandomNumber.cpp",
"CryptographicallyRandomNumber.h",
"CurrentTime.cpp",
"CurrentTime.h",
"DataLog.cpp",
"DataLog.h",
"DateMath.cpp",
"DateMath.h",
"DefaultAllocator.cpp",
"DefaultAllocator.h",
"Deque.h",
"DoubleBufferedDeque.h",
"DoublyLinkedList.h",
"DynamicAnnotations.cpp",
"DynamicAnnotations.h",
"EnumClass.h",
"FastAllocBase.h",
"FastMalloc.cpp",
"FastMalloc.h",
"FilePrintStream.cpp",
"FilePrintStream.h",
"Float32Array.h",
"Float64Array.h",
"Forward.h",
"GetPtr.h",
"HashCountedSet.h",
"HashFunctions.h",
"HashIterators.h",
"HashMap.h",
"HashSet.h",
"HashTable.cpp",
"HashTable.h",
"HashTableDeletedValueType.h",
"HashTraits.h",
"HexNumber.h",
"InstanceCounter.cpp",
"InstanceCounter.h",
"Int16Array.h",
"Int32Array.h",
"Int8Array.h",
"IntegralTypedArrayBase.h",
"LeakAnnotations.h",
"LinkedHashSet.h",
"LinkedStack.h",
"ListHashSet.h",
"Locker.h",
"MainThread.cpp",
"MainThread.h",
"MallocZoneSupport.h",
"MathExtras.h",
"MessageQueue.h",
"NonCopyingSort.h",
"Noncopyable.h",
"NotFound.h",
"NullPtr.h",
"OperatingSystem.h",
"OwnPtr.h",
"OwnPtrCommon.h",
"PageAllocator.cpp",
"PageAllocator.h",
"PartitionAlloc.cpp",
"PartitionAlloc.h",
"PassOwnPtr.h",
"PassRefPtr.h",
"PassTraits.h",
"PrintStream.cpp",
"PrintStream.h",
"ProcessID.h",
"RawPtr.h",
"RefCounted.h",
"RefCountedLeakCounter.cpp",
"RefCountedLeakCounter.h",
"RefPtr.h",
"RefVector.h",
"SaturatedArithmetic.h",
"SizeLimits.cpp",
"SpinLock.h",
"StaticConstructors.h",
"StdLibExtras.h",
"StreamBuffer.h",
"StringExtras.h",
"StringHasher.h",
"TemporaryChange.h",
"TerminatedArray.h",
"TerminatedArrayBuilder.h",
"ThreadIdentifierDataPthreads.cpp",
"ThreadIdentifierDataPthreads.h",
"ThreadRestrictionVerifier.h",
"ThreadSafeRefCounted.h",
"ThreadSpecific.h",
"Threading.h",
"ThreadingPrimitives.h",
"ThreadingPthreads.cpp",
"TreeNode.h",
"TriState.h",
"TypeTraits.cpp",
"TypeTraits.h",
"TypedArrayBase.h",
"Uint16Array.h",
"Uint32Array.h",
"Uint8Array.h",
"Uint8ClampedArray.h",
"Vector.h",
"VectorTraits.h",
"WTF.cpp",
"WTF.h",
"WTFExport.h",
"WTFThreadData.cpp",
"WTFThreadData.h",
"WeakPtr.h",
"asm/SaturatedArithmeticARM.h",
"dtoa.cpp",
"dtoa.h",
"dtoa/bignum-dtoa.cc",
"dtoa/bignum-dtoa.h",
"dtoa/bignum.cc",
"dtoa/bignum.h",
"dtoa/cached-powers.cc",
"dtoa/cached-powers.h",
"dtoa/diy-fp.cc",
"dtoa/diy-fp.h",
"dtoa/double-conversion.cc",
"dtoa/double-conversion.h",
"dtoa/double.h",
"dtoa/fast-dtoa.cc",
"dtoa/fast-dtoa.h",
"dtoa/fixed-dtoa.cc",
"dtoa/fixed-dtoa.h",
"dtoa/strtod.cc",
"dtoa/strtod.h",
"dtoa/utils.h",
"text/ASCIIFastPath.h",
"text/AtomicString.cpp",
"text/AtomicString.h",
"text/AtomicStringHash.h",
"text/Base64.cpp",
"text/Base64.h",
"text/CString.cpp",
"text/CString.h",
"text/IntegerToStringConversion.h",
"text/StringBuffer.h",
"text/StringBuilder.cpp",
"text/StringBuilder.h",
"text/StringConcatenate.h",
"text/StringHash.h",
"text/StringImpl.cpp",
"text/StringImpl.h",
"text/StringOperators.h",
"text/StringStatics.cpp",
"text/StringStatics.h",
"text/StringUTF8Adaptor.h",
"text/StringView.h",
"text/TextCodec.cpp",
"text/TextCodec.h",
"text/TextCodecASCIIFastPath.h",
"text/TextCodecICU.cpp",
"text/TextCodecICU.h",
"text/TextCodecLatin1.cpp",
"text/TextCodecLatin1.h",
"text/TextCodecReplacement.cpp",
"text/TextCodecReplacement.h",
"text/TextCodecUTF16.cpp",
"text/TextCodecUTF16.h",
"text/TextCodecUTF8.cpp",
"text/TextCodecUTF8.h",
"text/TextCodecUserDefined.cpp",
"text/TextCodecUserDefined.h",
"text/TextEncoding.cpp",
"text/TextEncoding.h",
"text/TextEncodingRegistry.cpp",
"text/TextEncodingRegistry.h",
"text/TextPosition.cpp",
"text/TextPosition.h",
"text/WTFString.cpp",
"text/WTFString.h",
"unicode/CharacterNames.h",
"unicode/Collator.h",
"unicode/UTF8.cpp",
"unicode/UTF8.h",
"unicode/Unicode.h",
"unicode/icu/CollatorICU.cpp",
"unicode/icu/UnicodeIcu.h",
]
configs += [
"//sky/engine:config",
"//sky/engine:non_test_config",
]
defines = [ "WTF_IMPLEMENTATION=1" ]
direct_dependent_configs = [ "//sky/engine:features" ]
deps = [
"//base",
"//third_party/icu",
]
forward_dependent_configs_from = [ "//third_party/icu" ]
if (is_android) {
libs = [ "log" ]
}
}
test("unittests") {
output_name = "sky_wtf_unittests"
sources = [
"ArrayBufferBuilderTest.cpp",
"CheckedArithmeticTest.cpp",
"DequeTest.cpp",
"DoubleBufferedDequeTest.cpp",
"HashMapTest.cpp",
"HashSetTest.cpp",
"ListHashSetTest.cpp",
"MathExtrasTest.cpp",
"PartitionAllocTest.cpp",
"RefPtrTest.cpp",
"SaturatedArithmeticTest.cpp",
"StringExtrasTest.cpp",
"StringHasherTest.cpp",
"TemporaryChangeTest.cpp",
"TreeNodeTest.cpp",
"VectorTest.cpp",
"testing/RunAllTests.cpp",
"testing/WTFTestHelpersTest.cpp",
"text/AtomicStringTest.cpp",
"text/CStringTest.cpp",
"text/StringBufferTest.cpp",
"text/StringBuilderTest.cpp",
"text/StringImplTest.cpp",
"text/StringOperatorsTest.cpp",
"text/TextCodecReplacementTest.cpp",
"text/TextCodecUTF8Test.cpp",
"text/WTFStringTest.cpp",
]
configs += [ "//sky/engine:config" ]
deps = [
":test_support",
":wtf",
"//base",
"//base/allocator",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
component("test_support") {
output_name = "wtf_test_support"
sources = [
"testing/WTFTestHelpers.cpp",
"testing/WTFTestHelpers.h",
"testing/WTFUnitTestHelpersExport.h",
]
defines = [ "WTF_UNITTEST_HELPERS_IMPLEMENTATION=1" ]
configs += [
"//sky/engine:config",
"//sky/engine:non_test_config",
]
deps = [
":wtf",
]
}