blob: fae5be9c83dfed398b10da5c55e28ea1cce04e9c [file] [log] [blame]
# Copyright 2023 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.
import("//build/test.gni")
static_library("google_analytics_4") {
# This library only provides an abstract class for Google Analytics client, which leaves the
# actual HTTP communications as implementation details.
# See //src/lib/analytics/cpp/core_dev_tools/google_analytics_client.{h,cc} for an implementation
# for Fuchsia developer tools written in C++
visibility = [
":*",
"//src/lib/analytics/cpp/*",
]
sources = [
"batch.cc",
"batch.h",
"client.cc",
"client.h",
"event.cc",
"event.h",
"measurement.cc",
"measurement.h",
"testing_client.h",
]
deps = [
"//sdk/lib/fit",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//third_party/rapidjson",
]
}
test("unittests") {
output_name = "analytics_cpp_google_analytics_4_unittests"
sources = [
"batch_unittest.cc",
"client_unittest.cc",
]
deps = [
":google_analytics_4",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//third_party/rapidjson",
]
}
group("tests") {
testonly = true
deps = [ ":unittests" ]
}