The macro simultaneously declares an enumeration and a count of its
enumerators.
A few variants of the macro are also provided to handle things like
enum classes, underlying types, and enumerations declared at class
scope.
MozReview-Commit-ID: 3z6yHnfXbLj
--HG--
extra : rebase_source : 92c333693e4bbf85b89cd3d7ac5b31f4b5434367
The test results were updated to match current behaviour. The
TestDummyAudioWithTransport and TestDummyVideoWithTransports are disabled due
to shutdown crashes and intermittent failures that show up in automation.
A follow up bug has been filed to fix these. The GMP test was removed
completely as it seems unlikely that it will be practical to test that from a
gtest.
MozReview-Commit-ID: 2pOb7u2Qp7v
--HG--
rename : media/webrtc/signaling/test/mediaconduit_unittests.cpp => media/webrtc/signaling/gtest/mediaconduit_unittests.cpp
extra : rebase_source : 992330f83e0a6a57810f1c5f0b4ea77f2512cd92
* TestUDPSocket wasn't initializing it's members properly, fixup by mcmanus
* Scope the netwerk TestCommon waiting to be non-global, and add assertions so that waiting is deterministic. r=mcmanus
MozReview-Commit-ID: 7jLgNIujrbu
--HG--
extra : rebase_source : fabee29260f06686e874d0130cb00067c769ad6f
This change is mostly straightforward, except for the following.
- It removes all the printing from the do_check_* macros because gtest macros
do appropriate printing.
- test_StatementCache.cpp needs some special gtest magic for the type
parameterization.
- It merges the four tests in test_unlock_notify.cpp because they rely on being
executed in order, and so aren't independent.
- storage_test_harness_tail.h is no longer necessary because gtest provides the
test looping functionality.
- It uses #include and the preprocessor to remove the duplication between
test_deadlock_detector.cpp and xpcom/tests/DeadlockDetector.cpp.
- It makes the test in test_service_init_background_thread.cpp a death test to
force it to be the first storage gtest, because it fails otherwise.
- It adds code to undo the SQLite mutex hooking as necessary, so that tests
don't interfere with each other.
- It de-virtualizes Spinner's destructor (as identified in bug 1318282).
--HG--
rename : storage/test/storage_test_harness.h => storage/test/gtest/storage_test_harness.h
rename : storage/test/test_AsXXX_helpers.cpp => storage/test/gtest/test_AsXXX_helpers.cpp
rename : storage/test/test_StatementCache.cpp => storage/test/gtest/test_StatementCache.cpp
rename : storage/test/test_asyncStatementExecution_transaction.cpp => storage/test/gtest/test_asyncStatementExecution_transaction.cpp
rename : storage/test/test_async_callbacks_with_spun_event_loops.cpp => storage/test/gtest/test_async_callbacks_with_spun_event_loops.cpp
rename : storage/test/test_binding_params.cpp => storage/test/gtest/test_binding_params.cpp
rename : storage/test/test_deadlock_detector.cpp => storage/test/gtest/test_deadlock_detector.cpp
rename : storage/test/test_file_perms.cpp => storage/test/gtest/test_file_perms.cpp
rename : storage/test/test_mutex.cpp => storage/test/gtest/test_mutex.cpp
rename : storage/test/test_service_init_background_thread.cpp => storage/test/gtest/test_service_init_background_thread.cpp
rename : storage/test/test_statement_scoper.cpp => storage/test/gtest/test_statement_scoper.cpp
rename : storage/test/test_transaction_helper.cpp => storage/test/gtest/test_transaction_helper.cpp
rename : storage/test/test_true_async.cpp => storage/test/gtest/test_true_async.cpp
rename : storage/test/test_unlock_notify.cpp => storage/test/gtest/test_unlock_notify.cpp
extra : rebase_source : dbb695c112564efa1945116be1a8435988982e74
This is a most minimal gtest conversion possible. It leaves in place
significant amounts of non-typical-for-gtest code.
Notable changes:
- All the mock Link and URLSearchParams method definitions are no longer
needed.
- The changes adds a new constructor for Link that doesn't set mHistory.
Without that, leaked URLs occur at shutdown.
- The output printed by the test is slightly streamlined, mostly by omitting
the test filename.
- It disables TestMediaFormatReader.cpp, which was causing problems. That test
is slated for removal in bug 1318225 anyway.
--HG--
rename : toolkit/components/places/tests/cpp/mock_Link.h => toolkit/components/places/tests/gtest/mock_Link.h
rename : toolkit/components/places/tests/cpp/moz.build => toolkit/components/places/tests/gtest/moz.build
rename : toolkit/components/places/tests/cpp/places_test_harness.h => toolkit/components/places/tests/gtest/places_test_harness.h
rename : toolkit/components/places/tests/cpp/places_test_harness_tail.h => toolkit/components/places/tests/gtest/places_test_harness_tail.h
rename : toolkit/components/places/tests/cpp/test_IHistory.cpp => toolkit/components/places/tests/gtest/test_IHistory.cpp
extra : rebase_source : b7def3f9afce3a44e99f5ed35cb220f7814551cd
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
The only complication was that I had to add namespaces to TestAudioMixer.cpp
and TestAudioSegment.cpp to avoid multiple definitions of a few small helper
functions like GetLowValue().
--HG--
rename : dom/media/compiledtest/TestAudioBuffers.cpp => dom/media/gtest/TestAudioBuffers.cpp
rename : dom/media/compiledtest/TestAudioMixer.cpp => dom/media/gtest/TestAudioMixer.cpp
rename : dom/media/compiledtest/TestAudioPacketizer.cpp => dom/media/gtest/TestAudioPacketizer.cpp
rename : dom/media/compiledtest/TestAudioSegment.cpp => dom/media/gtest/TestAudioSegment.cpp
extra : rebase_source : f42a1209b98a344c77e1245815eebc86a16866c0
This converts the tests to gtests. Most of them are just runtime tests and just
hava dummy assertion that everything ran. One test remains disabled, although
it's still built-in. You can run the disabled test with the following command:
> GTEST_ALSO_RUN_DISABLED_TESTS=1 ./mach gtest DeadlockDetectorScalability.*
MozReview-Commit-ID: 57rxjiZKjQ6
--HG--
rename : xpcom/tests/TestDeadlockDetectorScalability.cpp => xpcom/tests/gtest/TestDeadlockDetectorScalability.cpp
This converts TestDeadlockDetector to a gtest. The logic for spawning off
subprocesses is replaced with gtest's built-in death tests. On linux this will
clone() the process and assert that the child process generates the appropriate
assertion message. On OSX it will use fork(). In theory this should work on
Windows as well buy spawning a new process but this test currently disabled
there.
MozReview-Commit-ID: 9Sl0hHBVGT3
--HG--
rename : xpcom/tests/TestDeadlockDetector.cpp => xpcom/tests/gtest/TestDeadlockDetector.cpp
This is a straightforward conversion to a gtest. The test itself is updated
to use RefPtr/nsCOMPtr where appropriate to avoid memory leaks.
MozReview-Commit-ID: JyHF3iTaoOg
--HG--
rename : xpcom/tests/TestObserverService.cpp => xpcom/tests/gtest/TestObserverService.cpp
This is a very straightforward conversion of TestObserverArray. The tests were
not split out as they are all dependent on each other. The test macro was left
as well as converting it to a proper function would require a fair amount of
modification to the tests.
MozReview-Commit-ID: Bz9aWbAwBS
--HG--
rename : xpcom/tests/TestObserverArray.cpp => xpcom/tests/gtest/TestObserverArray.cpp
This converts the tests over to gtests.
MozReview-Commit-ID: 3oXY9kUZdB6
--HG--
rename : xpcom/tests/TestNsRefPtr.cpp => xpcom/tests/gtest/TestNsRefPtr.cpp
This is a very straightforward conversion of TestFile to a gtest. It sticks
with using one main test function to avoid dealing with possible dependency
issues between subtests.
MozReview-Commit-ID: IoIeGgisMGE
--HG--
rename : xpcom/tests/TestFile.cpp => xpcom/tests/gtest/TestFile.cpp