зеркало из https://github.com/mozilla/gecko-dev.git
d64b9bd504
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 |
||
---|---|---|
.. | ||
cxx | ||
ipdl | ||
README.txt | ||
moz.build |
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.