|  | # 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. | 
|  |  | 
|  | import("//build/components.gni") | 
|  | import("//build/test.gni") | 
|  |  | 
|  | static_library("inet") { | 
|  | sources = [ | 
|  | "ip_address.cc", | 
|  | "ip_address.h", | 
|  | "ip_port.cc", | 
|  | "ip_port.h", | 
|  | "socket_address.cc", | 
|  | "socket_address.h", | 
|  | ] | 
|  |  | 
|  | public_deps = [ | 
|  | "//sdk/fidl/fuchsia.net", | 
|  | "//src/lib/fxl", | 
|  | ] | 
|  | } | 
|  |  | 
|  | test("libinet_test") { | 
|  | sources = [ | 
|  | "test/ip_address_test.cc", | 
|  | "test/socket_address_test.cc", | 
|  | ] | 
|  |  | 
|  | deps = [ | 
|  | ":inet", | 
|  | "//src/lib/fxl/test:gtest_main", | 
|  | ] | 
|  | } | 
|  |  | 
|  | fuchsia_unittest_package("libinet_tests") { | 
|  | deps = [ ":libinet_test" ] | 
|  | } | 
|  |  | 
|  | group("tests") { | 
|  | testonly = true | 
|  |  | 
|  | deps = [ ":libinet_tests" ] | 
|  |  | 
|  | if (host_os == "linux") { | 
|  | deps += [ ":libinet_test($host_toolchain)" ] | 
|  | } | 
|  | } |