blob: b32b9b4f76c1f58da2ef3033435ca12be3fb6b3c [file] [log] [blame]
Yifan Hong4d68f662019-02-13 14:29:33 -08001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// This static library defines parameterized tests that enforce additional restrictions when
16// using Protobuf as schema for JSON files. The reason is that the JSON parser that
17// libprotobuf-cpp-full provides is relatively relaxed.
18cc_library_static {
19 name: "libjsonpbverify",
20 host_supported: true,
21 srcs: [
22 "verify.cpp",
23 ],
24 shared_libs: [
25 "libbase",
26 "libprotobuf-cpp-full",
27 "libjsoncpp",
28 ],
29 static_libs: [
30 "libjsonpbparse",
31 ],
32 export_static_lib_headers: [
33 "libjsonpbparse",
34 ],
35 export_include_dirs: [
36 "include",
37 ],
38 cflags: [
39 "-Wall",
40 "-Werror",
41 "-Wno-unused-parameter",
42 ],
43}
44
45cc_test_host {
46 name: "libjsonpbverify_test",
47 srcs: [
48 "test.cpp",
49 "test.proto",
50 ],
51 static_libs: [
52 "libbase",
53 "liblog",
54 "libgmock",
55 "libjsoncpp",
56 "libjsonpbparse",
57 "libjsonpbverify",
58 ],
59 shared_libs: [
60 "libprotobuf-cpp-full",
61 ],
62 cflags: [
63 "-Wall",
64 "-Werror",
65 "-Wno-unused-parameter",
66 ],
67 test_suites: [
68 "general-tests",
69 ],
70}