gecko-dev/ipc/ipdl/test
Andrew McCreight d64b9bd504 Bug 1319620 - Check that IPDL unit tests in error/ fail for the right reason. r=billm
An IPDL unit test that is intended to fail should check that the
reason the test fails matches the expected reason for failure. We have
had a number of cases where some change, like renaming a keyword,
causes tests to start failing for the wrong reason, which means they
are no longer testing anything useful.

To support this, each file in error/ must contain one or more error
annotations. An error annotation is a line starting with "//error:",
followed by whatever the rest of the expected error is. For every one
of these annotations that a file has, the stderr output of compiling
the test must contain the specified string, including the "error:". It
is also an error for an error/ file to not contain an error
annotation.

To generate the initial set of annotations, I just copied and pasted
the error that each test produced. I did some light auditing to check
that the errors are reasonable, which did turn up one minor error
which I fixed as part of bug 1347527.

This patch does not check that every error produced by compiling the
file is in the list of expected errors. I think that's less of a
problem if it does occur.

MozReview-Commit-ID: BrePLGPPRil

--HG--
extra : rebase_source : 0ddb2f866c4b4ab74b7e975ce5877568c8cc3b62
2017-03-15 10:43:51 -07:00
..
cxx Bug 1345977 - Add unused message to PTestSyncHang to prevent compiler warning. r=billm 2017-03-10 14:34:19 -08:00
ipdl Bug 1319620 - Check that IPDL unit tests in error/ fail for the right reason. r=billm 2017-03-15 10:43:51 -07:00
README.txt
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00

README.txt

There are two major categories of tests, segregated into different
top-level directories under test/.

The first category (ipdl/) is IPDL-compiler tests.  These tests check
that the IPDL compiler is successfully compiling correct
specifications, and successfully rejecting erroneous specifications.

The second category (cxx/) is C++ tests of IPDL semantics.  These
tests check that async/sync/rpc semantics are implemented correctly,
ctors/dtors behave as they should, etc.