Skip to content

Commit

Permalink
chore: add more tests to bazel (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy authored Oct 10, 2023
1 parent 7220bf8 commit cacdb92
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 5 deletions.
143 changes: 138 additions & 5 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,144 @@ cc_library(
hdrs = ["unit_test.hpp"],
)

cc_test(
name = "any_completion_executor",
srcs = ["any_completion_executor.cpp"],
_TESTS = {
"any_completion_executor": [],
"any_completion_handler": [],
"any_io_executor": [],
"append": [],
"as_tuple": [],
"associated_allocator": [],
"associated_cancellation_slot": [],
"associated_executor": [],
"associated_immediate_executor": [],
"associator": [],
"async_result": [],
"awaitable": [],
"basic_datagram_socket": [],
"basic_deadline_timer": [],
"basic_file": [],
"basic_random_access_file": [],
"basic_raw_socket": [],
"basic_readable_pipe": [],
"basic_seq_packet_socket": [],
"basic_serial_port": [],
"basic_signal_set": [],
"basic_socket": [],
"basic_socket_acceptor": [],
"basic_stream_file": [],
"basic_stream_socket": [],
"basic_streambuf": [],
"basic_waitable_timer": [],
"basic_writable_pipe": [],
"bind_allocator": [],
"bind_cancellation_slot": [],
"bind_executor": [],
"bind_immediate_executor": [],
"buffer": [],
"buffer_registration": [],
"buffered_read_stream": [
"//archetypes:async_result",
],
"buffered_stream": [
"//archetypes:async_result",
],
"buffered_write_stream": [
"//archetypes:async_result",
],
"buffers_iterator": [],
"cancellation_signal": [],
"cancellation_state": [],
"cancellation_type": [],
"co_spawn": [],
"completion_condition": [],
"compose": [],
"connect": [],
"connect_pipe": [],
"consign": [],
"coroutine": [],
"deadline_timer": [
"//archetypes:async_result",
],
"defer": [],
"deferred": [],
"detached": [],
"dispatch": [],
"error": [],
"execution_context": [],
"executor": [],
"executor_work_guard": [],
"file_base": [],
"high_resolution_timer": [],
"io_context": [],
"io_context_strand": [],
"is_read_buffered": [],
"is_write_buffered": [],
"packaged_task": [],
"placeholders": [],
"post": [],
"prepend": [],
"random_access_file": [
"//archetypes:async_result",
],
"read": [
"//archetypes:async_result",
],
"read_at": [
"//archetypes:async_result",
],
"read_until": [
"//archetypes:async_result",
],
"readable_pipe": [
"//archetypes:async_result",
],
"recycling_allocator": [],
"redirect_error": [],
"registered_buffer": [],
"serial_port": [
"//archetypes:async_result",
],
"serial_port_base": [],
"signal_set": [
"//archetypes:async_result",
],
"signal_set_base": [],
"socket_base": [],
"static_thread_pool": [],
"steady_timer": [],
"strand": [],
"stream_file": [
"//archetypes:async_result",
],
"streambuf": [],
"system_context": [],
"system_executor": [],
"system_timer": [],
"this_coro": [],
"thread_pool": [],
"time_traits": [],
"use_awaitable": [],
"use_future": [
"//archetypes:async_ops",
],
"uses_executor": [],
"wait_traits": [],
"writable_pipe": [
"//archetypes:async_result",
],
"write": [
"//archetypes:async_result",
],
"write_at": [
"//archetypes:async_result",
],
}

[cc_test(
name = test,
srcs = ["{}.cpp".format(test)],
deps = [
":unit_test",
"@boost.asio",
],
)
] + _TESTS[test],
) for test in _TESTS]
19 changes: 19 additions & 0 deletions test/archetypes/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
name = "async_result",
hdrs = ["async_result.hpp"],
deps = [
"@boost.asio",
],
)

cc_library(
name = "async_ops",
hdrs = ["async_ops.hpp"],
deps = [
"@boost.asio",
],
)

0 comments on commit cacdb92

Please sign in to comment.