Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1587)

Unified Diff: Source/wtf/tests/RunAllTests.cpp

Issue 16066003: Add wtf_unittests target that links unit tests outside DLL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/wtf/tests/RunAllTests.cpp
diff --git a/Source/core/loader/UniqueIdentifier.cpp b/Source/wtf/tests/RunAllTests.cpp
similarity index 82%
copy from Source/core/loader/UniqueIdentifier.cpp
copy to Source/wtf/tests/RunAllTests.cpp
index 0ad56563e3e214a67acd8c53decb085ad4250cb9..b35160810475ffeaea6aeb76e7dcfebb968dce05 100644
--- a/Source/core/loader/UniqueIdentifier.cpp
+++ b/Source/wtf/tests/RunAllTests.cpp
@@ -28,17 +28,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "core/loader/UniqueIdentifier.h"
+#include "wtf/CurrentTime.h"
+#include "wtf/Threading.h"
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
-namespace WebCore {
-
-static unsigned long s_uniqueIdentifier = 0;
-
-unsigned long createUniqueIdentifier()
+static double CurrentTime()
{
- return ++s_uniqueIdentifier;
+ return 0.0;
darin (slow to review) 2013/05/25 22:56:00 Should there be an assertion that this is never ca
}
-} // namespace WebCore
-
+int main(int argc, char** argv)
+{
+ ::testing::InitGoogleMock(&argc, argv);
+ WTF::setCurrentTimeFunction(CurrentTime);
+ WTF::initializeThreading();
+ return RUN_ALL_TESTS();
+}

Powered by Google App Engine
This is Rietveld 408576698