blob: 02b3ec7b0b9199ff0756da12a31736f7a500335e [file] [log] [blame]
# 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.
group("test") {
testonly = true
deps = [
":fbl",
]
}
test("fbl") {
include_dirs = [ "include" ]
sources = [
"algorithm_tests.cpp",
"array_tests.cpp",
"auto_call_tests.cpp",
"forward_tests.cpp",
"function_tests.cpp",
"intrusive_container_tests.cpp",
"intrusive_doubly_linked_list_tests.cpp",
"intrusive_hash_table_dll_tests.cpp",
"intrusive_hash_table_sll_tests.cpp",
"intrusive_singly_linked_list_tests.cpp",
"intrusive_wavl_tree_tests.cpp",
"macro_tests.cpp",
"recycler_tests.cpp",
"ref_ptr_tests.cpp",
"string_buffer_tests.cpp",
"string_piece_tests.cpp",
"string_printf_tests.cpp",
"string_tests.cpp",
"string_traits_tests.cpp",
"type_info_tests.cpp",
"unique_fd_tests.cpp",
"unique_free_ptr_tests.cpp",
"unique_ptr_tests.cpp",
"vector_tests.cpp",
]
deps = [
"$zx/system/ulib/fbl",
"$zx/system/ulib/unittest",
]
if (is_fuchsia) {
# These tests won't run on the host. There are two primary reasons for this.
#
# First, Some of these tests (ref_counted_upgradeable and
# slab_allocator) need fbl::Mutex which currently isn't supported on
# the host.
#
# Second, some of these tests make use of the ASSERT_DEATH macro to
# ensure that certain actions result in program termination. Again,
# this is not currently supported in the host test environment.
#
# See: TODO(ZX-1053)
sources += [
"condition_variable_tests.cpp",
"ref_counted_tests.cpp",
"slab_allocator_tests.cpp",
]
deps += [
"$zx/system/ulib/fdio",
"$zx/system/ulib/zircon",
"$zx/system/ulib/zx",
]
}
}