Closed Bug 1125559 Opened 6 years ago Closed 6 years ago

Move TestThreadPool.cpp to gtest and enable it

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: ehsan, Assigned: ehsan)

Details

Attachments

(1 file)

No description provided.
Attachment #8554210 - Flags: review?(nfroyd)
Comment on attachment 8554210 [details] [diff] [review]
Move TestThreadPool.cpp to gtest and enable it

Review of attachment 8554210 [details] [diff] [review]:
-----------------------------------------------------------------

Can you please make sure hg interprets this as a move in the actual commit, rather than an add/remove?  (It looks like this one does, whereas the TestTimeStamp one did not, though.)

::: xpcom/tests/gtest/TestThreadPool.cpp
@@ -42,4 @@
>  
>    for (int i = 0; i < 100; ++i) {
>      nsCOMPtr<nsIRunnable> task = new Task(i);
> -    NS_ENSURE_TRUE(task, NS_ERROR_OUT_OF_MEMORY);

Why not replace with EXPECT_TRUE(task)?
Attachment #8554210 - Flags: review?(nfroyd) → review+
(In reply to Nathan Froyd [:froydnj] [:nfroyd] from comment #2)
> ::: xpcom/tests/gtest/TestThreadPool.cpp
> @@ -42,4 @@
> >  
> >    for (int i = 0; i < 100; ++i) {
> >      nsCOMPtr<nsIRunnable> task = new Task(i);
> > -    NS_ENSURE_TRUE(task, NS_ERROR_OUT_OF_MEMORY);
> 
> Why not replace with EXPECT_TRUE(task)?

Because new is infallible.  But I will add this check.
(In reply to Wes Kocher (:KWierso) from comment #4)
> Backed out in
> https://hg.mozilla.org/integration/mozilla-inbound/rev/c2fd55873192 for
> checktest orange:
> 
> https://treeherder.mozilla.org/logviewer.html#?job_id=5928005&repo=mozilla-
> inbound

I don't think this failure is relevant to this patch.  Relanding:

https://hg.mozilla.org/integration/mozilla-inbound/rev/f5c6c57fc11a
Flags: needinfo?(ehsan)
https://hg.mozilla.org/mozilla-central/rev/f5c6c57fc11a
Assignee: nobody → ehsan
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.