gecko/ipc/ipdl/test/cxx
2011-07-13 22:43:43 -07:00
..
app Bug 655473 - Remove WinCE code from IPC; r=cjones 2011-05-10 20:24:49 +02:00
genIPDLUnitTests.py Bug 564086, part e: Allow IPDL/C++ tests to spawn subprocesses that speak protocols that are not unit tests in and of themselves. r=ted 2011-06-03 13:33:55 -05:00
ipdl.mk Test for bug 671189. 2011-07-13 22:43:43 -07:00
IPDLUnitTestProcessChild.cpp
IPDLUnitTestProcessChild.h
IPDLUnitTests.h
IPDLUnitTests.template.cpp
IPDLUnitTestSubprocess.cpp
IPDLUnitTestSubprocess.h
IPDLUnitTestTypes.h
Makefile.in Test for bug 671189. 2011-07-13 22:43:43 -07:00
PTestBlockChild.ipdl
PTestBridgeMain.ipdl Bug 564086, part r: Test IPDL |bridge| 2011-06-03 13:33:56 -05:00
PTestBridgeMainSub.ipdl Bug 564086, part r: Test IPDL |bridge| 2011-06-03 13:33:56 -05:00
PTestBridgeSub.ipdl Bug 564086, part r: Test IPDL |bridge| 2011-06-03 13:33:56 -05:00
PTestCrashCleanup.ipdl
PTestDataStructures.ipdl Bug 592866: Allow Shmem to be used in IPDL unions. r=bent a=blocking-2.0 2010-09-08 13:27:52 -05:00
PTestDataStructuresSub.ipdl
PTestDesc.ipdl Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
PTestDescSub.ipdl
PTestDescSubsub.ipdl
PTestFailedCtor.ipdl Test for bug 640901. a=b 2011-03-25 12:56:17 -05:00
PTestFailedCtorSub.ipdl Test for bug 640901. a=b 2011-03-25 12:56:17 -05:00
PTestFailedCtorSubsub.ipdl Test for bug 640901. a=b 2011-03-25 12:56:17 -05:00
PTestHandle.ipdl
PTestHangs.ipdl
PTestJSON.ipdl
PTestLatency.ipdl Bug 581930: Add an async "spam test" and make output more readable. r=NPOTB (alas!) 2010-08-05 17:11:23 -05:00
PTestManyChildAllocs.ipdl
PTestManyChildAllocsSub.ipdl
PTestMultiMgrs.ipdl
PTestMultiMgrsBottom.ipdl
PTestMultiMgrsLeft.ipdl
PTestMultiMgrsRight.ipdl
PTestNestedLoops.ipdl
PTestOpens.ipdl Bug 598869: Test that using actors on non-main threads works 2011-06-03 13:33:56 -05:00
PTestOpensOpened.ipdl Bug 613442, part 6: Test IPDL |opens| 2011-06-03 13:33:56 -05:00
PTestRaceDeferral.ipdl Test for bug 572134. a=b 2011-01-12 01:07:17 -06:00
PTestRacyReentry.ipdl Test for bug 592002. a=test 2010-09-01 13:01:50 -05:00
PTestRacyRPCReplies.ipdl
PTestRacyUndefer.ipdl Test for bug 648935. 2011-05-04 15:55:54 -05:00
PTestRPCErrorCleanup.ipdl
PTestRPCRaces.ipdl Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
PTestRPCShutdownRace.ipdl
PTestSanity.ipdl
PTestSelfManage.ipdl Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
PTestSelfManageRoot.ipdl
PTestShmem.ipdl Tests for bug 598866. 2010-11-05 02:17:07 -05:00
PTestShutdown.ipdl
PTestShutdownSub.ipdl
PTestShutdownSubsub.ipdl
PTestStackHooks.ipdl
PTestSyncError.ipdl Test for bug 671189. 2011-07-13 22:43:43 -07:00
PTestSyncHang.ipdl Bug 535077 - Fixes hang caused by failure to execute sync launch r=cjones a=blocking2.0 2010-08-10 14:14:10 -07:00
PTestSyncWakeup.ipdl
PTestSysVShmem.ipdl Tests for bug 598866. 2010-11-05 02:17:07 -05:00
README.txt
TestBlockChild.cpp
TestBlockChild.h
TestBridgeMain.cpp Bug 564086, part r: Test IPDL |bridge| 2011-06-03 13:33:56 -05:00
TestBridgeMain.h Bug 564086, part r: Test IPDL |bridge| 2011-06-03 13:33:56 -05:00
TestCrashCleanup.cpp
TestCrashCleanup.h
TestDataStructures.cpp Bug 562424: Switch IPDL interfaces to infallible TArray. r=bent a=blocking 2010-11-08 20:49:00 -06:00
TestDataStructures.h Bug 562424: Switch IPDL interfaces to infallible TArray. r=bent a=blocking 2010-11-08 20:49:00 -06:00
TestDesc.cpp
TestDesc.h
TestFailedCtor.cpp Test for bug 640901. a=b 2011-03-25 12:56:17 -05:00
TestFailedCtor.h Test for bug 640901. a=b 2011-03-25 12:56:17 -05:00
TestHangs.cpp Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
TestHangs.h Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
TestJSON.cpp Bug 562424: Switch IPDL interfaces to infallible TArray. r=bent a=blocking 2010-11-08 20:49:00 -06:00
TestJSON.h
TestLatency.cpp Bug 581930: Add an async "spam test" and make output more readable. r=NPOTB (alas!) 2010-08-05 17:11:23 -05:00
TestLatency.h Bug 581930: Add an async "spam test" and make output more readable. r=NPOTB (alas!) 2010-08-05 17:11:23 -05:00
TestManyChildAllocs.cpp
TestManyChildAllocs.h
TestMultiMgrs.cpp
TestMultiMgrs.h Bug 562424: Switch IPDL interfaces to infallible TArray. r=bent a=blocking 2010-11-08 20:49:00 -06:00
TestNestedLoops.cpp
TestNestedLoops.h
TestOpens.cpp Bug 598869: Test that using actors on non-main threads works 2011-06-03 13:33:56 -05:00
TestOpens.h Bug 613442, part 6: Test IPDL |opens| 2011-06-03 13:33:56 -05:00
TestRaceDeferral.cpp Test for bug 572134. a=b 2011-01-12 01:07:17 -06:00
TestRaceDeferral.h Test for bug 572134. a=b 2011-01-12 01:07:17 -06:00
TestRacyReentry.cpp Test for bug 592002. a=test 2010-09-01 13:01:50 -05:00
TestRacyReentry.h Test for bug 592002. a=test 2010-09-01 13:01:50 -05:00
TestRacyRPCReplies.cpp
TestRacyRPCReplies.h
TestRacyUndefer.cpp Test for bug 648935. 2011-05-04 15:55:54 -05:00
TestRacyUndefer.h Test for bug 648935. 2011-05-04 15:55:54 -05:00
TestRPCErrorCleanup.cpp Bug 540097: Add a ProcessingError(what) notification interface for top-level actors. r=bent 2010-08-20 18:24:40 -05:00
TestRPCErrorCleanup.h Bug 540097: Add a ProcessingError(what) notification interface for top-level actors. r=bent 2010-08-20 18:24:40 -05:00
TestRPCRaces.cpp
TestRPCRaces.h
TestRPCShutdownRace.cpp
TestRPCShutdownRace.h
TestSanity.cpp
TestSanity.h
TestSelfManageRoot.cpp
TestSelfManageRoot.h
TestShmem.cpp Tests for bug 598866. 2010-11-05 02:17:07 -05:00
TestShmem.h Tests for bug 598866. 2010-11-05 02:17:07 -05:00
TestShutdown.cpp Bug 562424: Switch IPDL interfaces to infallible TArray. r=bent a=blocking 2010-11-08 20:49:00 -06:00
TestShutdown.h
TestStackHooks.cpp Bug 525181, part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions. Fix tests. r=bent 2010-07-15 14:27:43 -05:00
TestStackHooks.h
TestSyncError.cpp Test for bug 671189. 2011-07-13 22:43:43 -07:00
TestSyncError.h Test for bug 671189. 2011-07-13 22:43:43 -07:00
TestSyncHang.cpp Bug 535077 - Fixes hang caused by failure to execute sync launch r=cjones a=blocking2.0 2010-08-10 14:14:10 -07:00
TestSyncHang.h Bug 535077 - Fixes hang caused by failure to execute sync launch r=cjones a=blocking2.0 2010-08-10 14:14:10 -07:00
TestSyncWakeup.cpp
TestSyncWakeup.h
TestSysVShmem.cpp Tests for bug 598866. 2010-11-05 02:17:07 -05:00
TestSysVShmem.h Tests for bug 598866. 2010-11-05 02:17:07 -05:00

To add a new IPDL C++ unit test, you need to create (at least) the
following files (for a test "TestFoo"):

  - PTestFoo.ipdl, specifying the top-level protocol used for the test

  - TestFoo.h, declaring the top-level parent/child actors used for
    the test

  - TestFoo.cpp, defining the top-level actors

  - (make sure all are in the namespace mozilla::_ipdltest)

Next

  - add PTestFoo.ipdl to ipdl.mk

  - append TestFoo to the variable IPDLTESTS in Makefile.in

The IPDL test harness will try to execute |testFooParentActor->Main()|
to kick off your test.  Make sure you define |TestFooParent::Main()|.

If your test passes its criteria, please call
|MOZ_IPDL_TESTPASS("msg")| and "exit gracefully".

If your tests fails, please call |MOZ_IPDL_TESTFAIL("msg")| and "exit
ungracefully", preferably by abort()ing.


If all goes well, running

  make -C $OBJDIR/ipc/ipdl/test/cxx

will update the file IPDLUnitTests.cpp (the test launcher), and your
new code will be built automatically.


You can launch your new test by invoking

  make -C $OBJDIR/ipc/ipdl/test/cxx check

If you want to launch only your test, run

  cd $OBJDIR/dist/bin
  ./run-mozilla.sh ./ipdlunittest TestFoo


For a bare-bones example of adding a test, take a look at
PTestSanity.ipdl, TestSanity.h, TestSanity.cpp, and how "TestSanity"
is included in ipdl.mk and Makefile.in.