Closed
Bug 1111149
Opened 11 years ago
Closed 11 years ago
Move TestArray.cpp to gtest and enable it
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
Details
Attachments
(1 file)
|
8.91 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8535957 -
Flags: review?(nfroyd)
Comment 1•11 years ago
|
||
Comment on attachment 8535957 [details] [diff] [review]
Patch (v1)
Review of attachment 8535957 [details] [diff] [review]:
-----------------------------------------------------------------
::: xpcom/glue/tests/gtest/TestArray.cpp
@@ -70,5 @@
> -{
> - if (aValue1 == aValue2) {
> - return "OK";
> - }
> - if (kExitOnError) {
You should remove the kExitOnError variable, too.
@@ +152,5 @@
> array->RemoveLastElement(foo);
> int32_t removeResult4[9] = {0, 1, 2, 4, 3, 5, 7, 8, 9};
> + CheckArray(array, 9, removeResult4, 9);
> +
> + foo = nullptr;
Is this really necessary? The presence or absence of |foo| shouldn't affect the tests below, so can't we just let it autorelease at the end of the function?
Attachment #8535957 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #1)
> @@ +152,5 @@
> > array->RemoveLastElement(foo);
> > int32_t removeResult4[9] = {0, 1, 2, 4, 3, 5, 7, 8, 9};
> > + CheckArray(array, 9, removeResult4, 9);
> > +
> > + foo = nullptr;
>
> Is this really necessary? The presence or absence of |foo| shouldn't affect
> the tests below, so can't we just let it autorelease at the end of the
> function?
The number of refs is explicitly tested, so yes this is necessary. The old version of the test called Release() manually.
Comment 3•11 years ago
|
||
Ah, gCount, right. Carry on!
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•