Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add explicit template argument to random matrices
Browse files Browse the repository at this point in the history
Lukas Weber committed Apr 14, 2022
1 parent 3a0fbf3 commit 2cf465c
Showing 2 changed files with 299 additions and 295 deletions.
2 changes: 1 addition & 1 deletion scripts/lpgen.py
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ def print_cpp_tests(outfile, cases):

if case['type'] == 'valid':
f.write('''res = solp::solve(c, {A});
CHECK_THAT(res.x, Catch::Matchers::Approx(std::vector{{{solution}}}).margin(1e-10));
CHECK_THAT(res.x, Catch::Matchers::Approx(std::vector<double>{{{solution}}}).margin(1e-10));
'''.format(A = A, solution = eigen_comma(x)))
elif case['type'] == 'unbounded':
f.write('''CHECK_THROWS_MATCHES(solp::solve(c, {A}), solp::exception, MatchSolpException(solp::exception::type::unbounded));
Loading

0 comments on commit 2cf465c

Please sign in to comment.