| # Copyright 2019 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. |
| |
| # Since this is experimental code, we restrict the visibility to this build file and to the |
| # archived build targets. |
| visibility = [ |
| ":*", |
| "archived:*", |
| ] |
| |
| import("//build/test.gni") |
| |
| source_set("randomized_response") { |
| sources = [ |
| "randomized_response.cc", |
| "randomized_response.h", |
| ] |
| |
| deps = [ |
| "$cobalt_root/src/algorithms/random:distributions", |
| "$cobalt_root/src/algorithms/random:random", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("randomized_response_test") { |
| testonly = true |
| sources = [ "randomized_response_test.cc" ] |
| |
| deps = [ |
| ":randomized_response", |
| "$cobalt_root/src/algorithms/random:random", |
| "//third_party/gflags", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("integer_encoder") { |
| sources = [ |
| "integer_encoder.cc", |
| "integer_encoder.h", |
| ] |
| |
| public_deps = [ |
| ":randomized_response", |
| "$cobalt_root/src/algorithms/random:distributions", |
| "$cobalt_root/src/algorithms/random:random", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("integer_encoder_test") { |
| testonly = true |
| sources = [ "integer_encoder_test.cc" ] |
| |
| deps = [ |
| ":integer_encoder", |
| ":randomized_response", |
| "$cobalt_root/src/algorithms/random:random", |
| "//third_party/gflags", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("histogram_encoder") { |
| sources = [ |
| "histogram_encoder.cc", |
| "histogram_encoder.h", |
| ] |
| |
| deps = [ |
| ":integer_encoder", |
| ":randomized_response", |
| "$cobalt_root/src/algorithms/random:random", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("histogram_encoder_test") { |
| testonly = true |
| sources = [ "histogram_encoder_test.cc" ] |
| |
| deps = [ |
| ":histogram_encoder", |
| ":integer_encoder", |
| "$cobalt_root/src/algorithms/random:random", |
| "//third_party/gflags", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":histogram_encoder_test", |
| ":integer_encoder_test", |
| ":randomized_response_test", |
| "archived:tests", |
| ] |
| |
| # Allow src/algorithms:tests to depend on this group. |
| visibility = [] |
| visibility = [ "$cobalt_root/src/algorithms:tests" ] |
| } |