blob: 8238dd91ba71deb07742ca7b117a13f5ce39f6a4 [file] [log] [blame]
# Copyright 2020 The Chromium 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/config/allocator.gni")
import("//testing/test.gni")
component("gc") {
sources = [
"core/gc_export.h",
"core/globals.h",
"core/page_memory.cc",
"core/page_memory.h",
"public/platform.h",
]
deps = [ "//base" ]
defines = [ "GC_IMPLEMENTATION=1" ]
}
source_set("test_support") {
testonly = true
sources = []
if (use_partition_alloc) {
sources += [
"test/base_allocator.cc",
"test/base_allocator.h",
]
}
deps = [
":gc",
"//base",
]
}
source_set("unit_tests") {
testonly = true
sources = [ "core/page_memory_basic_test.cc" ]
if (use_partition_alloc) {
sources += [
"core/page_memory_test.cc",
"test/base_allocator_test.cc",
]
}
deps = [
":gc",
":test_support",
"//base",
"//testing/gtest",
]
}
# Convenience target to allow just building GC-related tests for local development.
test("gc_unittests") {
testonly = true
sources = [ "test/run_all_unittests.cc" ]
deps = [
":unit_tests",
"//testing/gtest",
]
}