mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-12-12 12:56:43 +01:00
* Expose JSON_USE_EXCEPTION and JSON_HAS_INT64 as Bazel config flags with defaults that match the existing Bazel build. Switch //:jsoncpp from using copts ro defines for JSON_USE_EXCEPTION and JSON_HAS_INT64 so that rules that depend on it get the same config. Make src/test_lib_json/fuzz.cpp respect JSON_USE_EXCEPTION. * #ifdef stuff that should only be used with JSON_USE_EXCEPTION. * Modify runjsontests.py to allow passing a single test case file. * Add tests to the Bazel builds. * Reverse the polarity to fix a bug. --------- Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
21 lines
515 B
Python
21 lines
515 B
Python
filegroup(
|
|
name = "expected",
|
|
srcs = glob(["data/**", "jsonchecker/**"], exclude=["**/*.json"]),
|
|
)
|
|
|
|
[py_test(
|
|
name = "runjson_%s_test" % "_".join(f.split("/")),
|
|
srcs = ["runjsontests.py"],
|
|
main = "runjsontests.py",
|
|
args = [
|
|
"--with-json-checker",
|
|
"$(location //src/jsontestrunner:jsontestrunner)",
|
|
"$(location :%s)" % f,
|
|
],
|
|
data = [
|
|
"//src/jsontestrunner:jsontestrunner",
|
|
":expected",
|
|
":%s" % f,
|
|
],
|
|
) for f in glob(["**/*.json"])]
|