C++ JSON Content Rules Parser
The unit tests are in the
test project of the main C++ solution.
execution-tests directory contains material for testing the error
messages generated by the
jcrcheck program. The directory contains
test-runner.rb test program,
zinc-reviewer.rb and sub-directories
with sample JCR files.
test-runner.rb globs all the sample JCR files and runs the
program on each of them, capturing the output into separate files. If a
pre-vetted reference output is present, it compares the generated output to
the reference. The results of running
<name>.jcr is stored
in the file
<name>.txt and the pre-vetted reference versions of the output
are stored in files named
<name>.zinc.txt. (The reference file names are
zinc rather than
gold so that the order of display in
Windows explorer is more natural.)
test-runner.rb will look for various files in the sub-directories containing
the JCR test files in order to set command-line flags for running the tests. If
$test-opt.parse-only is present in a sub-directory, then all tests for that
sub-directory will have the
-parse-only command-line flag set. For
per-JCR-file test options, if
<name>.jcr is being tested, and the
<name>.test-opt.parse-only is present, then the
will be included specifically for that test.
zinc-reviewer.rb is a Ruby/Tk based program that facilitates reviewing the
results of tests run by
test-runner.rb and selecting vetted zinc references.
Tests Table of Contents
To assist in seeing how the library can be used, using the principle of 'tests as documentation', the test Table of Contents is here.