gecko/ipc/ipdl/test/cxx
2009-10-27 16:52:37 -05:00
..
app bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -05:00
genIPDLUnitTests.py bug 523761: give top-level IPDL actors handles to each others' processes. r=bent 2009-10-27 16:52:37 -05:00
ipdl.mk bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
IPDLUnitTests.h bug 523761: give top-level IPDL actors handles to each others' processes. r=bent 2009-10-27 16:52:37 -05:00
IPDLUnitTests.template.cpp bug 523761: give top-level IPDL actors handles to each others' processes. r=bent 2009-10-27 16:52:37 -05:00
IPDLUnitTestSubprocess.cpp bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -05:00
IPDLUnitTestSubprocess.h bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -05:00
IPDLUnitTestThreadChild.cpp bug 523761: give top-level IPDL actors handles to each others' processes. r=bent 2009-10-27 16:52:37 -05:00
IPDLUnitTestThreadChild.h bug 523761: give top-level IPDL actors handles to each others' processes. r=bent 2009-10-27 16:52:37 -05:00
Makefile.in bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
PTestArrays.ipdl bug 506171: rewrite lower.py and add native IPDL arrays. 2009-10-16 18:31:53 -05:00
PTestArraysSub.ipdl bug 506171: rewrite lower.py and add native IPDL arrays. 2009-10-16 18:31:53 -05:00
PTestDesc.ipdl bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
PTestDescSub.ipdl bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
PTestDescSubsub.ipdl bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
PTestLatency.ipdl add basic IPC latency tests 2009-10-13 17:36:28 -05:00
PTestManyChildAllocs.ipdl bug 518425: C++ unit test for bug 2009-10-06 13:05:47 -05:00
PTestManyChildAllocsSub.ipdl bug 518425: C++ unit test for bug 2009-10-06 13:05:47 -05:00
PTestSanity.ipdl bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -05:00
README.txt bug 518425: C++ unit test for bug 2009-10-06 13:05:47 -05:00
TestArrays.cpp pre-emptive windows build fix. no hablas STDint 2009-10-16 19:33:19 -05:00
TestArrays.h pre-emptive windows build fix. no hablas STDint 2009-10-16 19:33:19 -05:00
TestDesc.cpp bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
TestDesc.h bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
TestLatency.cpp bug 523272: allow protocols to reference great*grandchild actors 2009-10-19 21:12:25 -05:00
TestLatency.h fix bugs that were preventing IPDL C++ unit tests from running on win32 2009-10-13 23:08:24 -05:00
TestManyChildAllocs.cpp bug 518425: C++ unit test for bug 2009-10-06 13:05:47 -05:00
TestManyChildAllocs.h bug 518425: C++ unit test for bug 2009-10-06 13:05:47 -05:00
TestSanity.cpp bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -05:00
TestSanity.h bug 518126, part 2: add infrastructure for C++ tests of IPDL-generated code. r=ted,bsmedberg 2009-10-06 13:02:26 -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.