blob: cd24d0c418f9e3e5d79107eb6511fbd73e17b841 [file] [log] [blame]
# Copyright 2020 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") {
# 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 = [
"client.cc",
"client.h",
"event.cc",
"event.h",
"exception.cc",
"exception.h",
"general_parameters.cc",
"general_parameters.h",
"hit.cc",
"hit.h",
"noop_client.h",
"timing.cc",
"timing.h",
]
public_deps = [ "//sdk/lib/fit-promise" ]
deps = [
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
]
}
test("unittests") {
output_name = "analytics_cpp_google_analytics_unittests"
sources = [
"event_unittest.cc",
"exception_unittest.cc",
"general_parameters_unittest.cc",
"timing_unittest.cc",
]
deps = [
":google_analytics",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
}
group("tests") {
testonly = true
deps = [ ":unittests" ]
}