Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v91-bugfix' into v9-minor
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Aug 12, 2024
2 parents 92a6a75 + 8531e15 commit f00cccc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
11 changes: 11 additions & 0 deletions tests/include/scip_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "scip/nodesel_dfs.h"
#include "scip/cons_integral.h"
#include <locale.h>

/** execution method of presolver */
static
Expand Down Expand Up @@ -165,3 +166,13 @@ void TESTsetTestfilename(
else
(void)SCIPsnprintf(filename, SCIP_MAXSTRLEN, testfile);
}

/* ensure we run with C locale */
#ifdef __GNUC__
__attribute__((constructor))
static
void TESTsetlocale(void)
{
setlocale(LC_ALL, "C");
}
#endif
15 changes: 0 additions & 15 deletions tests/include/scip_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ void TESTsetTestfilename(
* be available every test.
* */
#include "scip_test.c"
#include "locale.h"

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wredundant-decls"
Expand All @@ -49,17 +48,3 @@ void TESTsetTestfilename(
} \
} \
while( FALSE )

CR_API int main(int argc, char *argv[]) {
struct criterion_test_set *tests = criterion_initialize();

int result = 0;
if (criterion_handle_args(argc, argv, true))
{
setlocale(LC_ALL, "C");
result = !criterion_run_all_tests(tests);
}

criterion_finalize(tests);
return result;
}

0 comments on commit f00cccc

Please sign in to comment.