Skip to content

Commit c3c3553

Browse files
committed
Merge remote-tracking branch 'origin/v9-minor'
2 parents c60c8b2 + f00cccc commit c3c3553

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

tests/include/scip_test.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "scip/nodesel_dfs.h"
2626
#include "scip/cons_integral.h"
27+
#include <locale.h>
2728

2829
/** execution method of presolver */
2930
static
@@ -165,3 +166,13 @@ void TESTsetTestfilename(
165166
else
166167
(void)SCIPsnprintf(filename, SCIP_MAXSTRLEN, testfile);
167168
}
169+
170+
/* ensure we run with C locale */
171+
#ifdef __GNUC__
172+
__attribute__((constructor))
173+
static
174+
void TESTsetlocale(void)
175+
{
176+
setlocale(LC_ALL, "C");
177+
}
178+
#endif

tests/include/scip_test.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ void TESTsetTestfilename(
2222
* be available every test.
2323
* */
2424
#include "scip_test.c"
25-
#include "locale.h"
2625

2726
#ifdef __GNUC__
2827
#pragma GCC diagnostic ignored "-Wredundant-decls"
@@ -49,17 +48,3 @@ void TESTsetTestfilename(
4948
} \
5049
} \
5150
while( FALSE )
52-
53-
CR_API int main(int argc, char *argv[]) {
54-
struct criterion_test_set *tests = criterion_initialize();
55-
56-
int result = 0;
57-
if (criterion_handle_args(argc, argv, true))
58-
{
59-
setlocale(LC_ALL, "C");
60-
result = !criterion_run_all_tests(tests);
61-
}
62-
63-
criterion_finalize(tests);
64-
return result;
65-
}

0 commit comments

Comments
 (0)