serenity/Tests/AK/CMakeLists.txt
Nico Weber e4c36876d2 AK: Make Function a little bit constexpr
Just enough to make it possible to pass a lambda to a constexpr function
taking an AK::Function parameter and have that constexpr function call
the passed-in AK::Function.

The main thing is that bit_cast<>s of pointers aren't ok in constexpr
functions, and neither is placement new. So add a union with stronger
typing for the constexpr case.

The body of the `if (is_constexpr_evaluated())` in
`init_with_callable()` is identical to the `if constexpr` right
after it. But `if constexpr (is_constexpr_evaluated())` always
evaluates `is_constexpr_evaluated()` in a constexpr context, so
this can't just add ` || is_constexpr_evaluated()` to that
`if constexpr`.
2024-12-20 12:05:06 -05:00

104 lines
2.3 KiB
CMake

set(AK_TEST_SOURCES
TestAKMath.cpp
TestAllOf.cpp
TestAnyOf.cpp
TestArbitrarySizedEnum.cpp
TestArray.cpp
TestAtomic.cpp
TestBadge.cpp
TestBase64.cpp
TestBinaryHeap.cpp
TestBinarySearch.cpp
TestBitCast.cpp
TestBitmap.cpp
TestBitStream.cpp
TestBuiltinWrappers.cpp
TestByteBuffer.cpp
TestByteString.cpp
TestCharacterTypes.cpp
TestChecked.cpp
TestCircularBuffer.cpp
TestCircularDeque.cpp
TestCircularQueue.cpp
TestComplex.cpp
TestCoroutine.cpp
TestDisjointChunks.cpp
TestDistinctNumeric.cpp
TestDoublyLinkedList.cpp
TestEndian.cpp
TestEnumBits.cpp
TestEnumerate.cpp
TestFind.cpp
TestFixedArray.cpp
TestFixedPoint.cpp
TestFloatingPoint.cpp
TestFloatingPointParsing.cpp
TestFlyString.cpp
TestFormat.cpp
TestFunction.cpp
TestFuzzyMatch.cpp
TestGeneratorAK.cpp
TestGenericLexer.cpp
TestHashFunctions.cpp
TestHashMap.cpp
TestHashTable.cpp
TestHex.cpp
TestIPv4Address.cpp
TestIPv6Address.cpp
TestIndexSequence.cpp
TestInsertionSort.cpp
TestIntegerMath.cpp
TestIntrusiveList.cpp
TestIntrusiveRedBlackTree.cpp
TestJSON.cpp
TestLEB128.cpp
TestLexicalPath.cpp
TestMACAddress.cpp
TestMemory.cpp
TestMemoryStream.cpp
TestNeverDestroyed.cpp
TestNonnullOwnPtr.cpp
TestNonnullRefPtr.cpp
TestNumberFormat.cpp
TestOptional.cpp
TestOptionParser.cpp
TestOwnPtr.cpp
TestPrint.cpp
TestQueue.cpp
TestQuickSelect.cpp
TestQuickSort.cpp
TestRedBlackTree.cpp
TestRefPtr.cpp
TestSegmentedVector.cpp
TestSIMD.cpp
TestSIMDExtras.cpp
TestSinglyLinkedList.cpp
TestSlugify.cpp
TestSourceGenerator.cpp
TestSourceLocation.cpp
TestSpan.cpp
TestStack.cpp
TestStatistics.cpp
TestStdLibExtras.cpp
TestString.cpp
TestStringFloatingPointConversions.cpp
TestStringUtils.cpp
TestStringView.cpp
TestDuration.cpp
TestTrie.cpp
TestTuple.cpp
TestTypeTraits.cpp
TestTypedTransfer.cpp
TestUFixedBigInt.cpp
TestUtf16.cpp
TestUtf8.cpp
TestVariant.cpp
TestVector.cpp
TestWeakPtr.cpp
)
foreach(source IN LISTS AK_TEST_SOURCES)
serenity_test("${source}" AK)
endforeach()
target_link_libraries(TestString PRIVATE LibUnicode)