forked from UBC-Thunderbots/Software
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD
More file actions
117 lines (106 loc) · 2.3 KB
/
Copy pathBUILD
File metadata and controls
117 lines (106 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package(default_visibility = ["//visibility:public"])
cc_library(
name = "observer",
hdrs = [
"observer.hpp",
],
deps = [
":thread_safe_buffer",
"//shared:constants",
],
)
cc_library(
name = "subject",
hdrs = [
"subject.hpp",
],
deps = [
":observer",
],
)
cc_library(
name = "observer_subject_adapter",
hdrs = [
"observer_subject_adapter.hpp",
],
deps = [
":observer",
],
)
cc_library(
name = "thread_safe_buffer",
hdrs = [
"thread_safe_buffer.hpp",
],
deps = [
"//software/time:duration",
"//software/util/typename",
"@boost//:circular_buffer",
],
)
cc_library(
name = "threaded_observer",
hdrs = [
"first_in_first_out_threaded_observer.h",
"last_in_first_out_threaded_observer.h",
"threaded_observer.hpp",
],
deps = [
":observer",
":thread_safe_buffer",
"//software/time:duration",
],
)
cc_test(
name = "observer_test",
srcs = ["observer_test.cpp"],
deps = [
":observer",
"//shared/test_util:tbots_gtest_main",
"//software/test_util:fake_clock",
],
)
cc_test(
name = "subject_test",
srcs = ["subject_test.cpp"],
deps = [
":subject",
"//shared/test_util:tbots_gtest_main",
],
)
cc_test(
name = "observer_subject_adapter_test",
srcs = ["observer_subject_adapter_test.cpp"],
deps = [
":observer",
":observer_subject_adapter",
":subject",
"//shared/test_util:tbots_gtest_main",
],
)
cc_test(
name = "thread_safe_buffer_test",
srcs = ["thread_safe_buffer_test.cpp"],
deps = [
":thread_safe_buffer",
"//shared/test_util:tbots_gtest_main",
],
)
cc_test(
name = "first_in_first_out_threaded_observer_test",
srcs = ["first_in_first_out_threaded_observer_test.cpp"],
# Run the test up to 3 times if it fails
flaky = True,
deps = [
":threaded_observer",
"//shared/test_util:tbots_gtest_main",
],
)
cc_test(
name = "last_in_first_out_threaded_observer_test",
srcs = ["last_in_first_out_threaded_observer_test.cpp"],
deps = [
":threaded_observer",
"//shared/test_util:tbots_gtest_main",
],
)