Add tests for NeverDestroyed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 19:04:47 +0000 (19:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 19:04:47 +0000 (19:04 +0000)
commit2c060f960215ca8f9ffc8b1fdc22722264355133
tree6c8c7a7d9d931342a58c73001497baa9628a4fb6
parentb94352e122ca059b5cd5be968ce710a8b924900a
Add tests for NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=175146

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-08-04
Reviewed by Darin Adler.

* CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
New files and sort.

* TestWebKitAPI/Tests/WTF/Logger.h:
* TestWebKitAPI/Tests/WTF/Logger.cpp:
(TestWebKitAPI::log):
(TestWebKitAPI::takeLogStr):
* TestWebKitAPI/Tests/WTF/RefLogger.h:
* TestWebKitAPI/Tests/WTF/RefLogger.cpp:
(TestWebKitAPI::log): Deleted.
(TestWebKitAPI::takeLogStr): Deleted.
Extract log() / takeLogStr() from RefLogger to a general Logger.h/cpp.

* TestWebKitAPI/Tests/WTF/LifecycleLogger.h:
* TestWebKitAPI/Tests/WTF/LifecycleLogger.cpp: Added.
(TestWebKitAPI::LifecycleLogger::LifecycleLogger):
(TestWebKitAPI::LifecycleLogger::operator=):
(TestWebKitAPI::LifecycleLogger::~LifecycleLogger):
(TestWebKitAPI::LifecycleLogger::setName):
(TestWebKitAPI::TEST):
Add a class that logs construction / assignment / modifications.

* TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::list):
Test construction behavior is as expected both directly and using makeNeverDestroyed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WTF/LifecycleLogger.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WTF/LifecycleLogger.h [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WTF/Logger.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WTF/Logger.h [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WTF/RefLogger.cpp
Tools/TestWebKitAPI/Tests/WTF/RefLogger.h