Title: [155151] trunk/Tools
Revision
155151
Author
[email protected]
Date
2013-09-05 14:34:17 -0700 (Thu, 05 Sep 2013)

Log Message

Move all Vector tests into Vector.cpp
https://bugs.webkit.org/show_bug.cgi?id=120797

Reviewed by Andreas Kling.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/VectorBasic.cpp: Removed.
* TestWebKitAPI/Tests/WTF/VectorReverse.cpp: Removed.
* TestWebKitAPI/Tests/WTF/WTF.pro:

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (155150 => 155151)


--- trunk/Tools/ChangeLog	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/ChangeLog	2013-09-05 21:34:17 UTC (rev 155151)
@@ -1,3 +1,21 @@
+2013-09-05  Anders Carlsson  <[email protected]>
+
+        Move all Vector tests into Vector.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=120797
+
+        Reviewed by Andreas Kling.
+
+        * TestWebKitAPI/CMakeLists.txt:
+        * TestWebKitAPI/GNUmakefile.am:
+        * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
+        * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WTF/Vector.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WTF/VectorBasic.cpp: Removed.
+        * TestWebKitAPI/Tests/WTF/VectorReverse.cpp: Removed.
+        * TestWebKitAPI/Tests/WTF/WTF.pro:
+
 2013-09-05  Simon Fraser  <[email protected]>
 
         Expected result images are sometimes blank in WKTR

Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/CMakeLists.txt	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt	2013-09-05 21:34:17 UTC (rev 155151)
@@ -111,7 +111,6 @@
     ${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/TemporaryChange.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/Vector.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WTF/VectorBasic.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/VectorReverse.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WTF/WTFString.cpp
 )

Modified: trunk/Tools/TestWebKitAPI/GNUmakefile.am (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/GNUmakefile.am	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/GNUmakefile.am	2013-09-05 21:34:17 UTC (rev 155151)
@@ -73,8 +73,6 @@
 	Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp \
 	Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp \
 	Tools/TestWebKitAPI/Tests/WTF/Vector.cpp \
-	Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp \
-	Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp \
 	Tools/TestWebKitAPI/WTFStringUtilities.h
 
 Programs_TestWebKitAPI_TestJavaScriptCore_CPPFLAGS = \

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj	2013-09-05 21:34:17 UTC (rev 155151)
@@ -299,8 +299,6 @@
     <ClCompile Include="..\Tests\WTF\StringHasher.cpp" />
     <ClCompile Include="..\Tests\WTF\StringOperators.cpp" />
     <ClCompile Include="..\Tests\WTF\Vector.cpp" />
-    <ClCompile Include="..\Tests\WTF\VectorBasic.cpp" />
-    <ClCompile Include="..\Tests\WTF\VectorReverse.cpp" />
     <ClCompile Include="..\win\HostWindow.cpp" />
     <ClCompile Include="..\win\main.cpp" />
   </ItemGroup>

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters	2013-09-05 21:34:17 UTC (rev 155151)
@@ -78,12 +78,6 @@
     <ClCompile Include="..\Tests\WTF\Vector.cpp">
       <Filter>Tests\WTF</Filter>
     </ClCompile>
-    <ClCompile Include="..\Tests\WTF\VectorBasic.cpp">
-      <Filter>Tests\WTF</Filter>
-    </ClCompile>
-    <ClCompile Include="..\Tests\WTF\VectorReverse.cpp">
-      <Filter>Tests\WTF</Filter>
-    </ClCompile>
     <ClCompile Include="..\Tests\WTF\cf\RetainPtr.cpp">
       <Filter>Tests\WTF\cf</Filter>
     </ClCompile>

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2013-09-05 21:34:17 UTC (rev 155151)
@@ -60,7 +60,6 @@
 		33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33DC890E1419539300747EF7 /* simple-iframe.html */; };
 		33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */; };
 		33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */; };
-		37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37200B9113A16230007A4FAD /* VectorReverse.cpp */; };
 		3722C8691461E03E00C45D00 /* RenderedImageFromDOMRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */; };
 		3751AF7C169518F800764319 /* DOMNodeFromJSObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */; };
 		3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */; };
@@ -170,7 +169,6 @@
 		BC901E241492ADCE0074A667 /* WKConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC901E221492ADCE0074A667 /* WKConnection.cpp */; };
 		BC901E331492AF390074A667 /* WKConnection_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC901E311492AF390074A667 /* WKConnection_Bundle.cpp */; };
 		BC90955D125548AA00083756 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC90955C125548AA00083756 /* PlatformWebViewMac.mm */; };
-		BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC90964B125561BF00083756 /* VectorBasic.cpp */; };
 		BC90977A125571AB00083756 /* PageLoadBasic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC909779125571AB00083756 /* PageLoadBasic.cpp */; };
 		BC909784125571CF00083756 /* simple.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = BC909778125571AB00083756 /* simple.html */; };
 		BC90995E12567BC100083756 /* WKString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC90995D12567BC100083756 /* WKString.cpp */; };
@@ -367,7 +365,6 @@
 		33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadCanceledNoServerRedirectCallback.cpp; sourceTree = "<group>"; };
 		33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadCanceledNoServerRedirectCallback_Bundle.cpp; sourceTree = "<group>"; };
 		33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "mouse-move-listener.html"; sourceTree = "<group>"; };
-		37200B9113A16230007A4FAD /* VectorReverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorReverse.cpp; path = WTF/VectorReverse.cpp; sourceTree = "<group>"; };
 		3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMRange.mm; sourceTree = "<group>"; };
 		3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNodeFromJSObject.mm; sourceTree = "<group>"; };
 		3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorInDashboardRegions.mm; sourceTree = "<group>"; };
@@ -484,7 +481,6 @@
 		BC90957E12554CF900083756 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
 		BC90957F12554CF900083756 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
 		BC90958012554CF900083756 /* TestWebKitAPI.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = TestWebKitAPI.xcconfig; sourceTree = "<group>"; };
-		BC90964B125561BF00083756 /* VectorBasic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorBasic.cpp; path = WTF/VectorBasic.cpp; sourceTree = "<group>"; };
 		BC90964D1255620C00083756 /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = _javascript_Core.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		BC909778125571AB00083756 /* simple.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = simple.html; sourceTree = "<group>"; };
 		BC909779125571AB00083756 /* PageLoadBasic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageLoadBasic.cpp; sourceTree = "<group>"; };
@@ -821,8 +817,6 @@
 				C01363C713C3997300EF3964 /* StringOperators.cpp */,
 				0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */,
 				BC55F5F814AD78EE00484BE1 /* Vector.cpp */,
-				BC90964B125561BF00083756 /* VectorBasic.cpp */,
-				37200B9113A16230007A4FAD /* VectorReverse.cpp */,
 				265AF54F15D1E48A00B0CB4A /* WTFString.cpp */,
 			);
 			name = WTF;
@@ -1218,8 +1212,6 @@
 				1A7BFC0C171A0BDB00BC5F64 /* WillSendSubmitEvent.mm in Sources */,
 				BC22D31514DC689800FFB1DD /* UserMessage.cpp in Sources */,
 				BC55F5F914AD78EE00484BE1 /* Vector.cpp in Sources */,
-				BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */,
-				37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */,
 				290A9BB71735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm in Sources */,
 				FE217ECD1640A54A0052988B /* VMInspector.cpp in Sources */,
 				520BCF4D141EB09E00937EA8 /* WebArchive.cpp in Sources */,

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp	2013-09-05 21:34:17 UTC (rev 155151)
@@ -28,6 +28,14 @@
 
 namespace TestWebKitAPI {
 
+TEST(WTF_Vector, Basic)
+{
+    Vector<int> intVector;
+    EXPECT_TRUE(intVector.isEmpty());
+    EXPECT_EQ(0ul, intVector.size());
+    EXPECT_EQ(0ul, intVector.capacity());
+}
+
 TEST(WTF_Vector, Iterator)
 {
     Vector<int> intVector;
@@ -52,6 +60,30 @@
     EXPECT_TRUE(end == it);
 }
 
+TEST(WTF_Vector, Reverse)
+{
+    Vector<int> intVector;
+    intVector.append(10);
+    intVector.append(11);
+    intVector.append(12);
+    intVector.append(13);
+    intVector.reverse();
+
+    EXPECT_EQ(13, intVector[0]);
+    EXPECT_EQ(12, intVector[1]);
+    EXPECT_EQ(11, intVector[2]);
+    EXPECT_EQ(10, intVector[3]);
+
+    intVector.append(9);
+    intVector.reverse();
+
+    EXPECT_EQ(9, intVector[0]);
+    EXPECT_EQ(10, intVector[1]);
+    EXPECT_EQ(11, intVector[2]);
+    EXPECT_EQ(12, intVector[3]);
+    EXPECT_EQ(13, intVector[4]);
+}
+
 TEST(WTF_Vector, ReverseIterator)
 {
     Vector<int> intVector;

Deleted: trunk/Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp	2013-09-05 21:34:17 UTC (rev 155151)
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <wtf/Vector.h>
-
-namespace TestWebKitAPI {
-
-TEST(WTF, VectorBasic)
-{
-    Vector<int> intVector;
-    EXPECT_TRUE(intVector.isEmpty());
-    EXPECT_EQ(0ul, intVector.size());
-    EXPECT_EQ(0ul, intVector.capacity());
-}
-
-} // namespace TestWebKitAPI

Deleted: trunk/Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp	2013-09-05 21:34:17 UTC (rev 155151)
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <wtf/Vector.h>
-
-namespace TestWebKitAPI {
-
-TEST(WTF, VectorReverse)
-{
-    Vector<int> intVector;
-    intVector.append(10);
-    intVector.append(11);
-    intVector.append(12);
-    intVector.append(13);
-    intVector.reverse();
-
-    EXPECT_EQ(13, intVector[0]);
-    EXPECT_EQ(12, intVector[1]);
-    EXPECT_EQ(11, intVector[2]);
-    EXPECT_EQ(10, intVector[3]);
-
-    intVector.append(9);
-    intVector.reverse();
-
-    EXPECT_EQ(9, intVector[0]);
-    EXPECT_EQ(10, intVector[1]);
-    EXPECT_EQ(11, intVector[2]);
-    EXPECT_EQ(12, intVector[3]);
-    EXPECT_EQ(13, intVector[4]);
-}
-
-} // namespace TestWebKitAPI

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/WTF.pro (155150 => 155151)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/WTF.pro	2013-09-05 21:25:32 UTC (rev 155150)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/WTF.pro	2013-09-05 21:34:17 UTC (rev 155151)
@@ -22,8 +22,6 @@
     StringOperators.cpp \
     TemporaryChange.cpp \
     Vector.cpp \
-    VectorBasic.cpp \
-    VectorReverse.cpp \
     WTFString.cpp
 
 include(../../TestWebKitAPI.pri)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to