blob: f03b7123c7f5db1383f9df50765ebf979a77c868 [file] [log] [blame]
# Copyright 2015 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("../mojo_edk.gni")
# Declares/defines platform-dependent things. Some things are left
# unimplemented, and the final binary must include a separate implementation
# (e.g., //mojo/edk/base_edk, which implements these platform-dependent things
# using //base).
mojo_edk_source_set("platform") {
sources = [
"io_thread.h",
"message_loop.h",
"platform_handle.cc",
"platform_handle.h",
"platform_handle_watcher.h",
"scoped_platform_handle.h",
"task_runner.h",
"thread.h",
]
mojo_sdk_public_deps = [ "mojo/public/cpp/system" ]
mojo_edk_public_deps = [ "mojo/edk/util" ]
}
# Functionality to be used by tests (both those merely using :platform as well
# as those implementing the unimplemented parts of :platform).
mojo_edk_source_set("test_platform") {
testonly = true
sources = [
"message_loop_test_helper.cc",
"message_loop_test_helper.h",
"platform_handle_watcher_test_helper.cc",
"platform_handle_watcher_test_helper.h",
"test_message_loops.h",
]
public_deps = [
":platform",
]
mojo_edk_public_deps = [ "mojo/edk/util" ]
deps = [
"//testing/gtest",
]
}
# Tests for both :platform and :test_platform. Actually linking these tests into
# a test binary will require an implementation of :platform and :test_platform
# (e.g., this is done by //mojo/edk/base_edk:mojo_edk_platform_unittests).
mojo_edk_source_set("unittests") {
testonly = true
sources = [
"aligned_alloc_unittest.cc",
"io_thread_unittest.cc",
"test_message_loops_unittest.cc",
]
deps = [
":platform",
":test_platform",
"//testing/gtest",
]
mojo_sdk_deps = [ "mojo/public/cpp/system" ]
}