This series introduces two new test programs: test-qmp-output-visitor and test-qmp-input-visitor.
As their names suggest, they contain unit-tests to check QMP's Visitor implementation. They supersede the test-visitor program (which is dropped by this series). Besides adding new unit-tests, I've _tried_ to follow these principles: - The tests don't print test result data to be manually checked by humans. Instead, all results are checked with g_assert()s and printed results are only OK or FAILED - Each test-case checks a single functionality - A test-case is only allowed to use a QAPI functionality after it has been tested - setup and teardown functions are used as much as possible to avoid duplication An important to do item I plan to work next is to measure test coverage. PS: The first patch is a fix unrelated to the QAPI. Makefile | 11 +- configure | 5 +- qapi-schema-test.json | 6 + test-qmp-input-visitor.c | 270 +++++++++++++++++++++++++++++ test-qmp-output-visitor.c | 423 +++++++++++++++++++++++++++++++++++++++++++++ test-visitor.c | 338 ------------------------------------ 6 files changed, 710 insertions(+), 343 deletions(-)