Skip to content

Commit b11364e

Browse files
ecatmurHDembinski
andauthored
Split out dynamic-only tests (#388)
Compiling tests under Visual Studio 2019 14.29.30133 (19.29.30145.0) fails with a not very helpful error: ``` libs\histogram\test\algorithm_project_test.cpp(186,1): fatal error C1903: unable to recover from previous error(s); stopping compilation ``` This can be fixed by moving the dynamic-only tests into a separate function, so that they are only compiled and run once. --------- Co-authored-by: Hans Dembinski <[email protected]>
1 parent 04fb105 commit b11364e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/algorithm_project_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ void run_tests() {
134134
BOOST_TEST_EQ(h_210.at(2, 0, 0), 1);
135135
BOOST_TEST_EQ(h_210.at(2, 0, 1), 1);
136136
}
137+
}
137138

139+
// split out dynamic tests as workaround for compiler bug in
140+
// Visual Studio 2019 14.29.30133 (19.29.30145.0), see PR 388 by Ed Catmur
141+
void run_dynamic_tests() {
138142
{
139143
auto h = make(dynamic_tag(), axis::integer<>(0, 2), axis::integer<>(0, 3));
140144
h(0, 0);
@@ -188,6 +192,7 @@ void run_tests() {
188192
int main() {
189193
run_tests<static_tag>();
190194
run_tests<dynamic_tag>();
195+
run_dynamic_tests();
191196

192197
return boost::report_errors();
193198
}

0 commit comments

Comments
 (0)