Title: [213555] trunk/Tools
Revision
213555
Author
[email protected]
Date
2017-03-07 17:03:38 -0800 (Tue, 07 Mar 2017)

Log Message

Fix the TestWebKitAPI build

Rubber-stamped by Anders Carlsson.

* TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
(TestWebKitAPI::TEST_F):
Fix a new warning about default argument promotion and va_start by
making this a enum class.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (213554 => 213555)


--- trunk/Tools/ChangeLog	2017-03-08 00:59:46 UTC (rev 213554)
+++ trunk/Tools/ChangeLog	2017-03-08 01:03:38 UTC (rev 213555)
@@ -1,3 +1,14 @@
+2017-03-07  Tim Horton  <[email protected]>
+
+        Fix the TestWebKitAPI build
+
+        Rubber-stamped by Anders Carlsson.
+
+        * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
+        (TestWebKitAPI::TEST_F):
+        Fix a new warning about default argument promotion and va_start by
+        making this a enum class.
+
 2017-03-07  Dean Jackson  <[email protected]>
 
         Some platforms won't be able to create a GPUDevice

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp (213554 => 213555)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp	2017-03-08 00:59:46 UTC (rev 213554)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp	2017-03-08 01:03:38 UTC (rev 213555)
@@ -392,7 +392,7 @@
         free(thirdHandle);
     }
     
-    enum TestFIFOAllocMode { FillAtEnd, EagerFill };
+    enum class TestFIFOAllocMode { FillAtEnd, EagerFill };
     void testFIFOAlloc(TestFIFOAllocMode mode, ...)
     {
         // This will test the simple case of no-coalesce (freeing the left-most
@@ -426,7 +426,7 @@
         for (unsigned index = 0; index < handles.size(); ++index) {
             sizeSoFar += handles.at(index)->sizeInBytes();
             free(handles.at(index));
-            if (mode == EagerFill) {
+            if (mode == TestFIFOAllocMode::EagerFill) {
                 MetaAllocatorHandle* handle = allocate(sizeSoFar);
                 EXPECT_EQ(handle->start(), reinterpret_cast<void*>(basePage * pageSize()));
                 EXPECT_EQ(handle->sizeInBytes(), sizeSoFar);
@@ -447,7 +447,7 @@
         
         confirm(basePage * pageSize(), (basePage + defaultPagesInHeap) * pageSize(), false);
         
-        if (mode == FillAtEnd) {
+        if (mode == TestFIFOAllocMode::FillAtEnd) {
             MetaAllocatorHandle* finalHandle = allocate(totalSize);
             EXPECT_EQ(finalHandle->start(), reinterpret_cast<void*>(basePage * pageSize()));
             EXPECT_EQ(finalHandle->sizeInBytes(), totalSize);
@@ -791,42 +791,42 @@
 
 TEST_F(MetaAllocatorTest, FIFOAllocFillAtEnd32Twice)
 {
-    testFIFOAlloc(FillAtEnd, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::FillAtEnd, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocFillAtEnd32Thrice)
 {
-    testFIFOAlloc(FillAtEnd, 32, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::FillAtEnd, 32, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocFillAtEnd32FourTimes)
 {
-    testFIFOAlloc(FillAtEnd, 32, 32, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::FillAtEnd, 32, 32, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocFillAtEndPageLess32Then32ThenPageLess64Then64)
 {
-    testFIFOAlloc(FillAtEnd, static_cast<int>(pageSize() - 32), 32, static_cast<int>(pageSize() - 64), 64, 0);
+    testFIFOAlloc(TestFIFOAllocMode::FillAtEnd, static_cast<int>(pageSize() - 32), 32, static_cast<int>(pageSize() - 64), 64, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocEagerFill32Twice)
 {
-    testFIFOAlloc(EagerFill, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::EagerFill, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocEagerFill32Thrice)
 {
-    testFIFOAlloc(EagerFill, 32, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::EagerFill, 32, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocEagerFill32FourTimes)
 {
-    testFIFOAlloc(EagerFill, 32, 32, 32, 32, 0);
+    testFIFOAlloc(TestFIFOAllocMode::EagerFill, 32, 32, 32, 32, 0);
 }
 
 TEST_F(MetaAllocatorTest, FIFOAllocEagerFillPageLess32Then32ThenPageLess64Then64)
 {
-    testFIFOAlloc(EagerFill, static_cast<int>(pageSize() - 32), 32, static_cast<int>(pageSize() - 64), 64, 0);
+    testFIFOAlloc(TestFIFOAllocMode::EagerFill, static_cast<int>(pageSize() - 32), 32, static_cast<int>(pageSize() - 64), 64, 0);
 }
 
 TEST_F(MetaAllocatorTest, FillHeap32)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to