BDE 4.14.0 Production release
|
Provide JSON Test Suite for BDE table-driven testing.
This component provides a utility struct
, bdljsn::JsonTestSuiteUtil
, that encapsulates the JSON Test Suite found at: https://github.com/nst/JSONTestSuite/tree/master. Note that the test suite is itself an appendix to the article Parsing JSON is a Minefield by Nicolas Seriot (see https://seriot.ch/projects/parsing_json.html).
The test points are constructed from the files found under: https://github.com/nst/JSONTestSuite/blob/master/test_parsers. The name of these files indicate whether or not their contents should be accepted or rejected.
Note that this component provides one additional y_
(not counted above), y_henry_verschell_smiley_surrogate_smiley.json
, that does not exist in downloaded test suite.
This section illustrates intended use of this component.
Generally, BDE table-drive testing uses tables defined locally in the test driver. To conveniently use the table defined in the bdljsn_jsontestsuiteutil component, some small adaptation to the test driver is recommended.
First, create aliases for symbols conventionally used in BDE table-driven tests:
Now, use these symbols in a typical table-driven for
-loop: