File tree Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ target_link_libraries(another_main PRIVATE myproj::lib myproj::lib2)
48
48
49
49
# tests
50
50
enable_testing ()
51
- add_test ( NAME another_main COMMAND another_main )
51
+ add_executable_test ( another_main no_arg )
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ add_subdirectory(libs)
97
97
98
98
## tests
99
99
enable_testing ()
100
- add_test ( NAME main COMMAND main )
100
+ add_executable_test ( main no_arg )
101
101
102
102
# Header-only library
103
103
add_library (lib INTERFACE )
@@ -120,6 +120,17 @@ target_link_libraries(lib2 PRIVATE myproj_project_options myproj_project_warning
120
120
target_link_system_libraries (lib2 PRIVATE fmt::fmt Eigen3::Eigen )
121
121
target_link_system_libraries (lib2 PRIVATE mythirdpartylib )
122
122
123
+ add_test_config (common
124
+ DEPENDENCIES_CONFIG
125
+ ut
126
+
127
+ SYSTEM_LIBRARIES
128
+ Boost::ut
129
+ )
130
+
131
+ add_library_test (lib lib CONFIGS common SOURCES tests/mylib/lib.cpp )
132
+ add_library_test (lib2 lib CONFIGS common SOURCES tests/mylib2/lib.cpp )
133
+
123
134
# package everything automatically
124
135
package_project (
125
136
# NAME
Original file line number Diff line number Diff line change
1
+ #include " mylib/lib.hpp"
2
+
3
+ #include < boost/ut.hpp>
4
+
5
+ int main () { // NOLINT(bugprone-exception-escape)
6
+ using namespace boost ::ut; // NOLINT(*using-namespace*)
7
+
8
+ " lib" _test = []() { expect (some_fun () == 0 ); };
9
+ }
Original file line number Diff line number Diff line change
1
+ #include " mylib2/lib.hpp"
2
+
3
+ #include < boost/ut.hpp>
4
+
5
+ int main () { // NOLINT(bugprone-exception-escape)
6
+ using namespace boost ::ut; // NOLINT(*using-namespace*)
7
+
8
+ " lib" _test = []() { expect (some_fun2 () == 0 ); };
9
+ }
Original file line number Diff line number Diff line change 11
11
{
12
12
"name" : " fmt" ,
13
13
"version>=" : " 8.1.1"
14
+ },
15
+ {
16
+ "name" : " bext-ut" ,
17
+ "version>=" : " 1.1.9"
14
18
}
15
19
]
16
20
}
You can’t perform that action at this time.
0 commit comments