Defines a contract test by mixing in a new test function.
The test function actually does a few things:
* Verify the contract that libclang returns what we expect it to.
* Use the *same* code to construct a mock translation unit cursor
that also satisfies the contract.
* Verifies the mock also passes the test.
Two functions are generated: the contract test, and a helper function
that does the heavy lifting. The separation is so the 2nd function can
be called from unit tests to generate the mock.
This 2nd function isn't supposed to be called directly, but is found
via compile-time reflection in mockTU.
Defines a contract test by mixing in a new test function.
The test function actually does a few things: * Verify the contract that libclang returns what we expect it to. * Use the *same* code to construct a mock translation unit cursor that also satisfies the contract. * Verifies the mock also passes the test.
Two functions are generated: the contract test, and a helper function that does the heavy lifting. The separation is so the 2nd function can be called from unit tests to generate the mock.
This 2nd function isn't supposed to be called directly, but is found via compile-time reflection in mockTU.