Convert XPCOM test TestAutoPtr to a gtest

RESOLVED FIXED in Firefox 52

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: erahm, Assigned: erahm)

Tracking

unspecified
mozilla52
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(4 attachments)

Convert xpcom/tests/TestAutoPtr.cpp to a gtest and move to xpcom/tests/gtest/.
Created attachment 8805366 [details] [diff] [review]
Part 1: Remove RefPtr tests from TestAutoPtr

This is a test for nsAutoPtr, we shouldn't be testing RefPtr here.

MozReview-Commit-ID: IqwgINAuYar
Attachment #8805366 - Flags: review?(nfroyd)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Created attachment 8805367 [details] [diff] [review]
Part 2: Move tests into individual functions

This just moves code into separate functions. No logic changes were made.

MozReview-Commit-ID: 98NqhCb4T67
Attachment #8805367 - Flags: review?(nfroyd)
Created attachment 8805368 [details] [diff] [review]
Part 3: Cleanup the formatting of the rest of the file

MozReview-Commit-ID: AfMDPcBjf3Y
Attachment #8805368 - Flags: review?(nfroyd)
Created attachment 8805369 [details] [diff] [review]
Part 4: Convert TestAutoPtr to a gtest

MozReview-Commit-ID: EOKHAQyZ4fZ
Attachment #8805369 - Flags: review?(nfroyd)
Attachment #8805366 - Flags: review?(nfroyd) → review+
Attachment #8805367 - Flags: review?(nfroyd) → review+
Attachment #8805368 - Flags: review?(nfroyd) → review+
Comment on attachment 8805369 [details] [diff] [review]
Part 4: Convert TestAutoPtr to a gtest

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

r=me with changes below.

::: xpcom/tests/gtest/TestAutoPtr.cpp
@@ +7,5 @@
>  #include "nsAutoPtr.h"
> +#include "gtest/gtest.h"
> +//#include <stdio.h>
> +//#include "nscore.h"
> +//#include "mozilla/Attributes.h"

Might as well just delete these while you're at it, rather than commenting them out?

::: xpcom/tests/moz.build
@@ -45,5 @@
>  
>  XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
>  
>  GeckoCppUnitTests([
> -    'TestAutoPtr',

You need to remove this from testing/cppunittest.ini as well.
Attachment #8805369 - Flags: review?(nfroyd) → review+

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7abe65a85676
https://hg.mozilla.org/mozilla-central/rev/2d1eb2bddef9
https://hg.mozilla.org/mozilla-central/rev/d7335cf91ad0
https://hg.mozilla.org/mozilla-central/rev/6ca9d7aa4dc7
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.