| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| source_set("json_parser") { |
| sources = [ |
| "json_parser.cc", |
| "json_parser.h", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| "//third_party/rapidjson", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fit", |
| ] |
| |
| public_configs = [ "//garnet/public:config" ] |
| } |
| |
| executable("json_parser_unittests_bin") { |
| testonly = true |
| |
| output_name = "json_parser_unittests" |
| |
| sources = [ |
| "json_parser_unittest.cc", |
| ] |
| |
| deps = [ |
| ":json_parser", |
| "//src/lib/files", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| if (is_fuchsia) { |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| test_package("json_parser_unittests") { |
| deps = [ |
| ":json_parser_unittests_bin", |
| ] |
| tests = [ |
| { |
| name = "json_parser_unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":json_parser_unittests_bin($host_toolchain)", |
| ] |
| if (is_fuchsia) { |
| deps += [ ":json_parser_unittests" ] |
| } |
| } |