| 1 |
load("@rules_cc//cc:defs.bzl", "cc_test") |
| 2 |
|
| 3 |
filegroup( |
| 4 |
name = "config_test", |
| 5 |
srcs = [ |
| 6 |
"config_test.json", |
| 7 |
"config_test_characters.txt", |
| 8 |
"config_test_phrases.txt", |
| 9 |
], |
| 10 |
visibility = ["//visibility:public"], |
| 11 |
) |
| 12 |
|
| 13 |
filegroup( |
| 14 |
name = "config_test_nested_group", |
| 15 |
srcs = [ |
| 16 |
"config_test_nested_group.json", |
| 17 |
"config_test_characters.txt", |
| 18 |
"config_test_phrases.txt", |
| 19 |
], |
| 20 |
visibility = ["//visibility:public"], |
| 21 |
) |
| 22 |
|
| 23 |
# Schema validation for the main fixture; missing-policy backward compatibility |
| 24 |
# is exercised by //src:config_test. |
| 25 |
cc_test( |
| 26 |
name = "config_schema_validation_config_test", |
| 27 |
size = "small", |
| 28 |
srcs = ["//data/config:config_schema_validation_test_src"], |
| 29 |
local_defines = [ |
| 30 |
"BAZEL", |
| 31 |
"OPENCC_CONFIG_SCHEMA_TEST_FILE=\\\"test/config_test/config_test.json\\\"", |
| 32 |
], |
| 33 |
data = [ |
| 34 |
":config_test", |
| 35 |
"//data/config:config_schema", |
| 36 |
], |
| 37 |
deps = [ |
| 38 |
"@bazel_tools//tools/cpp/runfiles", |
| 39 |
"@googletest//:gtest_main", |
| 40 |
"//deps/rapidjson-1.1.0:rapidjson", |
| 41 |
], |
| 42 |
) |
| 43 |
|
| 44 |
cc_test( |
| 45 |
name = "config_schema_validation_config_test_nested_group", |
| 46 |
size = "small", |
| 47 |
srcs = ["//data/config:config_schema_validation_test_src"], |
| 48 |
local_defines = [ |
| 49 |
"BAZEL", |
| 50 |
"OPENCC_CONFIG_SCHEMA_TEST_FILE=\\\"test/config_test/config_test_nested_group.json\\\"", |
| 51 |
], |
| 52 |
data = [ |
| 53 |
":config_test_nested_group", |
| 54 |
"//data/config:config_schema", |
| 55 |
], |
| 56 |
deps = [ |
| 57 |
"@bazel_tools//tools/cpp/runfiles", |
| 58 |
"@googletest//:gtest_main", |
| 59 |
"//deps/rapidjson-1.1.0:rapidjson", |
| 60 |
], |
| 61 |
) |