vendor/scs/test/run_tests.c in scs-0.4.0 vs vendor/scs/test/run_tests.c in scs-0.4.1

- old
+ new

@@ -6,38 +6,49 @@ #include "scs.h" /* Include Tests */ #include "problems/degenerate.h" #include "problems/hs21_tiny_qp.h" -#include "problems/hs21_tiny_qp_rw.h" #include "problems/infeasible_tiny_qp.h" #include "problems/qafiro_tiny_qp.h" #include "problems/small_lp.h" #include "problems/small_qp.h" -#include "problems/test_validation.h" +#include "problems/test_exp_cone.h" #include "problems/unbounded_tiny_qp.h" +int tests_run = 0; + +/* decrement tests_run since mu_unit will increment it, so this cancels */ #define _SKIP(problem) \ char *problem(void) { \ scs_printf("skipped\n"); \ + tests_run--; \ return 0; \ } -#ifdef USE_LAPACK /* solve SDPs, requires blas / lapack */ -#include "problems/rob_gauss_cov_est.h" +#if NO_VALIDATE == 0 +#include "problems/test_validation.h" #else -_SKIP(rob_gauss_cov_est) +_SKIP(test_validation) #endif -/* TODO: this reads a file written with 32bit ints */ -#if defined(USE_LAPACK) && !defined(DLONG) +/* solve SDPs, requires blas / lapack */ +#if defined(USE_LAPACK) && NO_READ_WRITE == 0 #include "problems/random_prob.h" +#include "problems/rob_gauss_cov_est.h" #else +_SKIP(rob_gauss_cov_est) _SKIP(random_prob) #endif -int tests_run = 0; +#if NO_READ_WRITE == 0 /* reads / writes */ +#include "problems/hs21_tiny_qp_rw.h" +#include "problems/max_ent.h" +#else +_SKIP(hs21_tiny_qp_rw) +_SKIP(max_ent) +#endif static const char *all_tests(void) { mu_run_test(test_validation); mu_run_test(degenerate); mu_run_test(small_lp); @@ -47,16 +58,18 @@ mu_run_test(hs21_tiny_qp_rw); mu_run_test(qafiro_tiny_qp); mu_run_test(infeasible_tiny_qp); mu_run_test(unbounded_tiny_qp); mu_run_test(random_prob); + mu_run_test(max_ent); + mu_run_test(test_exp_cone); return 0; } - int main(void) { const char *result = all_tests(); if (result != 0) { scs_printf("%s\n", result); + scs_printf("TEST FAILED!\n"); } else { scs_printf("ALL TESTS PASSED\n"); } scs_printf("Tests run: %d\n", tests_run);