Title: [185285] trunk/Tools
Revision
185285
Author
[email protected]
Date
2015-06-05 21:40:18 -0700 (Fri, 05 Jun 2015)

Log Message

From r185273 on WTF::RefCounter exposes the actual refcount instead of a boolean value.

Reviewed by Dan Bernstein.

* TestWebKitAPI/Tests/WTF/RefCounter.cpp:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (185284 => 185285)


--- trunk/Tools/ChangeLog	2015-06-06 03:11:28 UTC (rev 185284)
+++ trunk/Tools/ChangeLog	2015-06-06 04:40:18 UTC (rev 185285)
@@ -1,3 +1,12 @@
+2015-06-05  Zalan Bujtas  <[email protected]>
+
+        From r185273 on WTF::RefCounter exposes the actual refcount instead of a boolean value.
+
+        Reviewed by Dan Bernstein.
+
+        * TestWebKitAPI/Tests/WTF/RefCounter.cpp:
+        (TestWebKitAPI::TEST):
+
 2015-06-05  Gyuyoung Kim  <[email protected]>
 
         [EFL] API test has been broken since r184357

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp (185284 => 185285)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp	2015-06-06 03:11:28 UTC (rev 185284)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefCounter.cpp	2015-06-06 04:40:18 UTC (rev 185285)
@@ -88,47 +88,47 @@
         });
         counterPtr = &counter;
         // Testing (4a) - after construction value() is 0.
-        EXPECT_EQ(false, static_cast<int>(counter.value()));
+        EXPECT_EQ(0, static_cast<int>(counter.value()));
 
         // Testing (3a) - ref with callback from 0 -> 1.
         callbackValue = CallbackExpected;
         TokenType incTo1(counter.token<CounterType>());
         // Testing (4b) & (4c) - values within & after callback.
         EXPECT_EQ(true, callbackValue);
-        EXPECT_EQ(true, static_cast<int>(counter.value()));
+        EXPECT_EQ(1, static_cast<int>(counter.value()));
 
         // Testing (3b) - ref with callback from 1 -> 2.
         TokenType incTo2(incTo1);
         // Testing (4b) & (4c) - values within & after callback.
-        EXPECT_EQ(true, static_cast<int>(counter.value()));
+        EXPECT_EQ(2, static_cast<int>(counter.value()));
 
         // Testing (3c) - deref with callback from >1 -> 1.
         incTo1 = nullptr;
         // Testing (4b) & (4c) - values within & after callback.
-        EXPECT_EQ(true, static_cast<int>(counter.value()));
+        EXPECT_EQ(1, static_cast<int>(counter.value()));
 
         {
             // Testing (3j) - ref using a Ref rather than a RefPtr.
             TokenType incTo2Again(counter.token<CounterType>());
             // Testing (4b) & (4c) - values within & after callback.
-            EXPECT_EQ(true, static_cast<int>(counter.value()));
+            EXPECT_EQ(2, static_cast<int>(counter.value()));
             // Testing (3k) - deref using a Ref rather than a RefPtr.
         }
-        EXPECT_EQ(true, static_cast<int>(counter.value()));
+        EXPECT_EQ(1, static_cast<int>(counter.value()));
         // Testing (4b) & (4c) - values within & after callback.
 
         // Testing (3d) - deref with callback from 1 -> 0.
         callbackValue = CallbackExpected;
         incTo2 = nullptr;
         // Testing (4b) & (4c) - values within & after callback.
-        EXPECT_EQ(false, callbackValue);
-        EXPECT_EQ(false, static_cast<int>(counter.value()));
+        EXPECT_EQ(0, callbackValue);
+        EXPECT_EQ(0, static_cast<int>(counter.value()));
 
         // Testing (2a) - Destruction where the RefCounter::Count has a non-zero reference count.
         callbackValue = CallbackExpected;
         incTo1Again = counter.token<CounterType>();
-        EXPECT_EQ(true, callbackValue);
-        EXPECT_EQ(true, static_cast<int>(counter.value()));
+        EXPECT_EQ(1, callbackValue);
+        EXPECT_EQ(1, static_cast<int>(counter.value()));
         callbackValue = CallbackNotExpected;
     }
 
@@ -142,15 +142,15 @@
     // Testing (1b) - Construction without a callback.
     RefCounter counter;
     // Testing (4a) - after construction value() is 0.
-    EXPECT_EQ(false, static_cast<int>(counter.value()));
+    EXPECT_EQ(0, static_cast<int>(counter.value()));
     // Testing (3h) - ref without callback
     TokenType incTo1(counter.token<CounterType>());
     // Testing (4c) - value as read after the ref.
-    EXPECT_EQ(true, static_cast<int>(counter.value()));
+    EXPECT_EQ(1, static_cast<int>(counter.value()));
     // Testing (3i) - deref without callback
     incTo1 = nullptr;
     // Testing (4c) - value as read after the deref.
-    EXPECT_EQ(false, static_cast<int>(counter.value()));
+    EXPECT_EQ(0, static_cast<int>(counter.value()));
     // Testing (2b) - Destruction where the RefCounter::Count has a zero reference count.
     // ... not a lot to test here! - we can at least ensure this code path is run & we don't crash!
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to