Encoder and Decoder for toml-test
ℹ️ The contents of this directory relate to testing with the toml-test suite, not anything to do with running the library's unit-tests. For information about running the unit-tests see CONTRIBUTING.
ℹ️ All command snippets in this document assume the working directory is the toml++ repository root.
Install the toml-test runner, either from a release binary or with Go, as the toml-test README describes:
go install github.com/toml-lang/toml-test/v2/cmd/toml-test@v2.2.0CI runs the same version against the TOML 1.1 tests, which is what -toml 1.1 below selects.
cmake -S . -B build-tt -DCMAKE_BUILD_TYPE=Release -Dtomlplusplus_BUILD_TOML_TEST=ON
cmake --build build-tt
toml-test test -toml 1.1 -decoder=build-tt/toml-test/tt_decoder -encoder=build-tt/toml-test/tt_encoderWith Visual Studio or another multi-config generator, build with --config Release; the executables are then in
build-tt/toml-test/Release.
meson setup build-tt --buildtype=release -Dbuild_tt=true
meson compile -C build-tt
toml-test test -toml 1.1 -decoder=build-tt/toml-test/tt_decoder -encoder=build-tt/toml-test/tt_encoderℹ️ Pass
-Dtomlplusplus_USE_VENDORED_LIBS=OFFto CMake or-Duse_vendored_libs=falseto Meson if you wish to use the system-installed version of nlohmann/json rather than the vendored one.ℹ️ With unreleased TOML features enabled, the encoder writes keys such as
€without quotes, which TOML 1.1 doesn't allow, so toml-test reports failures.