Dynare++: ensure that testsuite does not fail because of safety check

Safety check introduced in c10d8daf9.

Ref #217
time-shift
Sébastien Villemot 2019-04-16 12:22:41 +02:00
parent be170f131c
commit 040c4f11a7
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 8 deletions

View File

@ -1106,15 +1106,11 @@ main()
all_tests.push_back(std::make_unique<UnfoldZContSmall>());
all_tests.push_back(std::make_unique<UnfoldZCont>());
// find maximum dimension and maximum nvar
int dmax = 0;
int nvmax = 0;
/* Initialize library. We do it for each test individually instead of
computing the maximum dimension and number of variables, because otherwise it
does not pass the check on maximum problem size. */
for (const auto &test : all_tests)
{
dmax = std::max(dmax, test->dim);
nvmax = std::max(nvmax, test->nvar);
}
TLStatic::init(dmax, nvmax); // initialize library
TLStatic::init(test->dim, test->nvar);
// launch the tests
int success = 0;