diff --git a/.ci/run-matrix.sh b/.ci/run-matrix.sh index 8ae29ea7..84768c28 100755 --- a/.ci/run-matrix.sh +++ b/.ci/run-matrix.sh @@ -4,6 +4,7 @@ export PATH=/opt-2/gcc-13/bin:$PATH export CC=gcc export CXX=g++ # .ci/test-case.sh --asan --python /opt-3/cpython-v3.11.9-asan/bin/python3 /opt-3/sundials-6.7.0-asan + .ci/test-case.sh --python /opt-3/pypy3.10-v7.3.15-linux64/bin/python3 /opt-3/sundials-6.7.0-debug .ci/test-case.sh --python /opt-3/cpython-v3.11.?-debug/bin/python3 /opt-3/sundials-6.7.0-debug .ci/test-case.sh --python /opt-3/cpython-v3.12.2-debug/bin/python3 /opt-3/sundials-6.7.0-debug PYCVODES_NO_LAPACK=1 PYCVODES_NO_KLU=1 .ci/test-case.sh --python /opt-3/cpython-v3.11-apt-deb/bin/python3 /opt-3/sundials-6.7.0-extended diff --git a/.ci/test-case.sh b/.ci/test-case.sh index 7560e1d1..7342ff86 100755 --- a/.ci/test-case.sh +++ b/.ci/test-case.sh @@ -5,8 +5,10 @@ show_help() { echo "--native" echo "--python " } + NATIVE=0 TEST_ASAN=0 +MAKE_TMP_DIR=0 while [ $# -gt 1 ]; do case $1 in --native) @@ -22,12 +24,21 @@ while [ $# -gt 1 ]; do TEST_ASAN=1 shift ;; + --tmp) + MAKE_TMP_DIR=1 + shift + ;; *) >&2 echo "Unrecognized parameter: $1" exit 1 esac done - +if [ "$MAKE_TMP_DIR" = 1 ]; then + REPO_TMP_DIR=$(mktemp -d) + trap 'rm -rf -- "$REPO_TMP_DIR"' EXIT + cp -ra . "$REPO_TMP_DIR/." + cd "$REPO_TMP_DIR" +fi SUNDBASE=$1 if [ ! -d "$SUNDBASE/include/sundials" ]; then >&2 echo "No such directory: $SUNDBASE"; exit 1; fi if [[ $SUNDBASE =~ *-extended || $SUNDBASE =~ *-single ]]; then @@ -40,6 +51,7 @@ export LDFLAGS="$LINKLIBS -Wl,--disable-new-dtags -Wl,-rpath,$SUNDBASE/lib -L$SU export LD_LIBRARY_PATH=$(compgen -G "/opt-2/llvm-*/lib") if [ $TEST_ASAN -eq 1 ]; then + export CC=clang export CXX=clang++ LIBCXX_ASAN_ROOT=$(compgen -G "/opt-2/libcxx*-asan") LIBCXX_ASAN_INCLUDE=${LIBCXX_ASAN_ROOT}/include/c++/v1 @@ -53,7 +65,7 @@ if [ $TEST_ASAN -eq 1 ]; then # LD_PRELOAD=$(clang++ --print-file-name=libclang_rt.asan.so) export PYTHON="env ASAN_OPTIONS=abort_on_error=1,detect_leaks=0 ${PYTHON:-python3}" else - export PATH=/opt-2/gcc-13/bin:$PATH + export CC=gcc export CXX=g++ if $CXX --version | head -n 1 | grep -E 'g++\.*13\.[0-9]\.[0-9]$'; then exit 1; fi export CXXFLAGS="$CXXFLAGS -D_GLIBCXX_DEBUG -D_GLIBCXX_PEDANTIC" diff --git a/.ci/test-sdist.sh b/.ci/test-sdist.sh index 9351ef37..c321d450 100755 --- a/.ci/test-sdist.sh +++ b/.ci/test-sdist.sh @@ -11,9 +11,14 @@ env \ CFLAGS="-isystem $SUNDBASE/include -isystem /usr/include/suitesparse" \ LDFLAGS="-Wl,--disable-new-dtags -Wl,-rpath,$SUNDBASE/lib -L$SUNDBASE/lib" \ CC=gcc CXX=g++ pip install ${CI_REPO_NAME}-*.tar.gz -pip install pytest-flakes pytest-cov matplotlib sphinx numpydoc sphinx-rtd-theme -../scripts/run_tests.sh --cov ${CI_REPO_NAME} --cov-report html -../scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg - +python3 -m pytest --pyargs pycvodes cd - -source ./scripts/generate_docs.sh +env \ + CFLAGS="-isystem $SUNDBASE/include -isystem /usr/include/suitesparse" \ + LDFLAGS="-Wl,--disable-new-dtags -Wl,-rpath,$SUNDBASE/lib -L$SUNDBASE/lib" \ + CC=gcc CXX=g++ python3 setup.py build_ext -i + +pip install pytest-flakes pytest-cov matplotlib sphinx numpydoc sphinx-rtd-theme +./scripts/run_tests.sh --cov ${CI_REPO_NAME} --cov-report html +./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg +./scripts/generate_docs.sh diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 73af74fb..6381b740 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,30 +1,64 @@ when: - - event: [pull_request, tag, cron, push] + - event: [push] # pull_request, tag, cron, steps: - - name: build-and-test-asan - image: cont-reg.bjodah.se:443/bjodah/triceratops-3:14 + - name: pypy + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 + commands: + - .ci/test-case.sh --tmp --python /opt-3/pypy3.10-v7.3.15-linux64/bin/python3 /opt-3/sundials-6.7.0-debug + + - name: py3.11-dbg + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 + commands: + - .ci/test-case.sh --tmp --python /opt-3/cpython-v3.11.?-debug/bin/python3 /opt-3/sundials-6.7.0-debug + + - name: py3.12-dbg + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 + commands: + - .ci/test-case.sh --tmp --python /opt-3/cpython-v3.12.2-debug/bin/python3 /opt-3/sundials-6.7.0-debug + + - name: py3.11-extended + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 + environment: + - PYCVODES_NO_LAPACK=1 + - PYCVODES_NO_KLU=1 + commands: + - .ci/test-case.sh --tmp --python /opt-3/cpython-v3.11-apt-deb/bin/python3 /opt-3/sundials-6.7.0-extended + + - name: py3.12-single + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 + environment: + - PYCVODES_NO_LAPACK=1 + - PYCVODES_NO_KLU=1 + commands: + - .ci/test-case.sh --tmp --python /opt-3/cpython-v3.12.2-release/bin/python3 /opt-3/sundials-6.7.0-single + + - name: sdist-and-docs + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 environment: - PYCVODES_STRICT=1 - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu - - LLVM_ROOT=/opt-2/llvm-18 commands: #- git fetch -tq # - bash -c '[[ $(python3 setup.py --version 2>/dev/null) =~ ^[0-9]+.* ]]' - - .ci/run-matrix.sh - .ci/test-sdist.sh - ./scripts/prepare_deploy.sh - - if grep "DO-NOT-MERGE!" -R . --exclude ".woodpecker.yml"; then exit 1; fi - + - if grep "DO-NOT-MERGE!" -R . --exclude ".woodpecker.yaml"; then exit 1; fi + depends_on: + - pypy + - py3.11-dbg + - py3.12-dbg + - py3.11-extended + - py3.12-single - name: deploy-public-html - image: cont-reg.bjodah.se:443/bjodah/triceratops-3:14 + image: cont-reg.bjodah.se:443/bjodah/triceratops-3:16 commands: - - tar -C ./deploy/public_html czf pycovdes-${CI_COMMIT_BRANCH}.tar.gz . - - curl -T pycovdes-${CI_COMMIT_BRANCH}.tar.gz ftp://pycovdes:$${ARTIFACTS_PASS}@$${FTP_SERVER}/public_html/ + - tar -C ./deploy/public_html -czf pycvodes-${CI_COMMIT_BRANCH}.tar.gz . + - curl -T pycvodes-${CI_COMMIT_BRANCH}.tar.gz ftp://pycvodes:$${ARTIFACTS_PASS}@$${FTP_SERVER}/public_html/ secrets: [ ARTIFACTS_PASS, FTP_SERVER ] when: - event: push - repo: github.com/bjodah/pycovdes + repo: bjodah/pycvodes depends_on: - - build-and-test + - sdist-and-docs diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 3e4cdf91..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -environment: - - matrix: - - TARGET_ARCH: x64 - CONDA_PY: 38 - CONDA_INSTALL_LOCN: C:\\Miniconda36-x64 - -platform: - - x64 - -install: - # Cywing's git breaks conda-build. https://github.com/conda-forge/conda-smithy-feedstock/pull/2 - - cmd: rmdir C:\cygwin /s /q - - # Add path, activate `conda` and update conda. - - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat - - cmd: conda update --yes --quiet conda - - - cmd: set PYTHONUNBUFFERED=1 - - - cmd: conda config --set show_channel_urls true - - cmd: conda install --yes --quiet conda-build - - cmd: conda config --add channels conda-forge - -# Skip .NET project specific build phase. -build: off - -test_script: - - conda.exe build conda-recipe --quiet diff --git a/external/anyode b/external/anyode index ea189e0b..ac350a93 160000 --- a/external/anyode +++ b/external/anyode @@ -1 +1 @@ -Subproject commit ea189e0be4e2648d1483df213294d7e6d16ade16 +Subproject commit ac350a937b0fe74a4da4f9b6f983c982b1cce0d2 diff --git a/pycvodes/include/sundials_cxx.hpp b/pycvodes/include/sundials_cxx.hpp index 26de48b8..7b89d21e 100644 --- a/pycvodes/include/sundials_cxx.hpp +++ b/pycvodes/include/sundials_cxx.hpp @@ -1,7 +1,10 @@ #pragma once -#include // std::memcpy #include /* serial N_Vector types, fcts., macros */ #include +#include +#include // std::memcpy +#include + namespace sundials_cxx { #if SUNDIALS_VERSION_MAJOR >= 3 const int version_major = SUNDIALS_VERSION_MAJOR; diff --git a/pycvodes/tests/test_cvodes_numpy.py b/pycvodes/tests/test_cvodes_numpy.py index 196e16f6..b06e0e2a 100644 --- a/pycvodes/tests/test_cvodes_numpy.py +++ b/pycvodes/tests/test_cvodes_numpy.py @@ -13,6 +13,15 @@ ) +def _get_refcount_None(): + if hasattr(sys, 'getrefcount'): + gc.collect() + gc.collect() + return sys.getrefcount(None) + else: # e.g. pypy + return 0 + + def test_config_env(): # This test is useful for e.g. out-of-tree conda-recipes (e.g. conda-forge) where variables # are set manually (and could otherwise be forgotten unless tests fail). @@ -822,10 +831,7 @@ def j(t, y, Jmat, dfdt=None, fy=None): k = 0 for jiter in range(nIter): if jiter == 1: - gc.collect() - gc.collect() - nNone1 = sys.getrefcount(None) - + nNone1 = _get_refcount_None() t0 = k tend = k + 1 # so let the step to be 1 second k+=1 @@ -840,5 +846,5 @@ def j(t, y, Jmat, dfdt=None, fy=None): y_prev2 = yout.T[1][-1] gc.collect() gc.collect() - nNone2 = sys.getrefcount(None) - assert -10 < nNone1 - nNone2 < 10 + nNone2 = _get_refcount_None() + assert -nIter//10 < nNone1 - nNone2 < nIter//10 diff --git a/tests/.gitignore b/tests/.gitignore index 58d0246f..3b3ef858 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,5 @@ -catch.hpp +doctest.h +doctest.o test_cvodes_anyode test_cvodes_cxx test_sundials_cxx @@ -8,6 +9,5 @@ test_cvodes_anyode_autorestart test_cvodes_anyode_svd test_tough_case test_cvodes_anyode_quad -catch.o test_cvodes_anyode_jtimes test_cvodes_anyode_sparse diff --git a/tests/Makefile b/tests/Makefile index 39b940d1..b2768956 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -50,22 +50,22 @@ else endif clean: - $(RM) catch.o + $(RM) doctest.o $(RM) $(TARGETS) if [ -f test_cvodes_anyode_parallel ] ; then rm test_cvodes_anyode_parallel ; fi; -test_%: test_%.cpp ../pycvodes/include/cvodes_cxx.hpp catch.o - $(CXX) $(CXXFLAGS) $(INCLUDE) $(DEFINES) -o $@ $< catch.o $(LDFLAGS) +test_%: test_%.cpp ../pycvodes/include/cvodes_cxx.hpp doctest.o + $(CXX) $(CXXFLAGS) $(INCLUDE) $(DEFINES) -o $@ $< doctest.o $(LDFLAGS) -test_cvodes_anyode_parallel: test_cvodes_anyode_parallel.cpp ../pycvodes/include/cvodes_*.hpp catch.o +test_cvodes_anyode_parallel: test_cvodes_anyode_parallel.cpp ../pycvodes/include/cvodes_*.hpp doctest.o ifeq ($(CXX),clang++-6.0) @echo "skipping openmp when using clang" else - $(CXX) $(CXXFLAGS) $(OPENMP_FLAG) $(INCLUDE) $(DEFINES) -o $@ $< catch.o $(LDFLAGS) $(OPENMP_LIB) + $(CXX) $(CXXFLAGS) $(OPENMP_FLAG) $(INCLUDE) $(DEFINES) -o $@ $< doctest.o $(LDFLAGS) $(OPENMP_LIB) endif -catch.hpp: catch.hpp.bz2 +doctest.h: doctest.h.bz2 bzcat $< >$@ -catch.o: catch.cpp catch.hpp +doctest.o: doctest.cpp doctest.h diff --git a/tests/catch.cpp b/tests/catch.cpp deleted file mode 100644 index 0c7c351f..00000000 --- a/tests/catch.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include "catch.hpp" diff --git a/tests/doctest.cpp b/tests/doctest.cpp new file mode 100644 index 00000000..a3f832e4 --- /dev/null +++ b/tests/doctest.cpp @@ -0,0 +1,2 @@ +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include "doctest.h" diff --git a/tests/doctest.h.bz2 b/tests/doctest.h.bz2 new file mode 100644 index 00000000..66086b19 Binary files /dev/null and b/tests/doctest.h.bz2 differ diff --git a/tests/doctest.h.url b/tests/doctest.h.url new file mode 100644 index 00000000..e5aedb4d --- /dev/null +++ b/tests/doctest.h.url @@ -0,0 +1 @@ +https://github.com/doctest/doctest/releases/download/v2.4.11/doctest.h diff --git a/tests/test_cvodes_anyode.cpp b/tests/test_cvodes_anyode.cpp index 7c6e1055..15a83892 100644 --- a/tests/test_cvodes_anyode.cpp +++ b/tests/test_cvodes_anyode.cpp @@ -1,9 +1,9 @@ // C++11 source code. -#include "catch.hpp" +#include "doctest.h" #include "cvodes_anyode.hpp" #include "testing_utils.hpp" -TEST_CASE( "decay_adaptive", "[simple_adaptive]" ) { +TEST_CASE( "decay_adaptive" ) { Decay odesys(1.0); std::vector root_indices; int td = 1; @@ -24,7 +24,7 @@ TEST_CASE( "decay_adaptive", "[simple_adaptive]" ) { free(xyout); } -TEST_CASE( "decay_adaptive_ew_ele", "[simple_adaptive]" ) { +TEST_CASE( "decay_adaptive_ew_ele" ) { Decay odesys(1.0); std::vector root_indices; int td = 1; @@ -65,7 +65,7 @@ TEST_CASE( "decay_adaptive_ew_ele", "[simple_adaptive]" ) { free(ew_ele); } -TEST_CASE( "decay_predefined_ew_ele", "[simple_predefined]" ) { +TEST_CASE( "decay_predefined_ew_ele" ) { Decay odesys(1.0); int nt = 37; realtype t0=0, tend=4.0; @@ -108,7 +108,7 @@ TEST_CASE( "decay_predefined_ew_ele", "[simple_predefined]" ) { REQUIRE( odesys.current_info.nfo_int["n_steps"] < 997 ); } -TEST_CASE( "decay_adaptive_get_dx_max", "[simple_adaptive]" ) { +TEST_CASE( "decay_adaptive_get_dx_max" ) { Decay odesys(1.0); realtype y0 = 1.0; std::vector root_indices; @@ -130,7 +130,7 @@ TEST_CASE( "decay_adaptive_get_dx_max", "[simple_adaptive]" ) { } -TEST_CASE( "decay_adaptive_dx_max", "[simple_adaptive]" ) { +TEST_CASE( "decay_adaptive_dx_max" ) { Decay odesys(1.0); realtype y0 = 1.0; std::vector root_indices; diff --git a/tests/test_cvodes_anyode_autorestart.cpp b/tests/test_cvodes_anyode_autorestart.cpp index f5c8c6c6..806f59e7 100644 --- a/tests/test_cvodes_anyode_autorestart.cpp +++ b/tests/test_cvodes_anyode_autorestart.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include "anyode/anyode.hpp" @@ -7,7 +7,7 @@ #include "cetsa_case.hpp" -TEST_CASE( "adaptive_autorestart", "[simple_adaptive]" ) { +TEST_CASE( "adaptive_autorestart" ) { std::vector p = {{298.15, 39390, -135.3, 18010, 44960, 48.2, 65919.5, -93.8304, 1780, 3790, 57.44, 19700, -157.4}}; OdeSys odesys(&p[0]); int td = 1; diff --git a/tests/test_cvodes_anyode_jtimes.cpp b/tests/test_cvodes_anyode_jtimes.cpp index cb2dd514..363c6e60 100644 --- a/tests/test_cvodes_anyode_jtimes.cpp +++ b/tests/test_cvodes_anyode_jtimes.cpp @@ -1,11 +1,11 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include "anyode/anyode.hpp" #include "cvodes_anyode.hpp" #include "cetsa_case_iterative.hpp" -TEST_CASE( "adaptive_tricky_svd_no_jac_no_prec", "[simple_adaptive]" ) { +TEST_CASE( "adaptive_tricky_svd_no_jac_no_prec" ) { std::vector p = {{321.14999999999998, 39390, -135.30000000000001, 18010, 44960, 48.200000000000003, 49320, -114.59999999999999, 1780, -34400.547966379738, -2.865040967667511, 93065.338440593958, 5.7581184659305222}}; diff --git a/tests/test_cvodes_anyode_parallel.cpp b/tests/test_cvodes_anyode_parallel.cpp index 58328652..cc3b5fc5 100644 --- a/tests/test_cvodes_anyode_parallel.cpp +++ b/tests/test_cvodes_anyode_parallel.cpp @@ -1,9 +1,9 @@ // C++11 source code. -#include "catch.hpp" +#include "doctest.h" #include "cvodes_anyode_parallel.hpp" #include "testing_utils.hpp" -TEST_CASE( "decay_adaptive", "[multi_adaptive]" ) { +TEST_CASE( "decay_adaptive" ) { std::vector k {{ 2.0, 3.0}}; Decay odesys1(k[0]); Decay odesys2(k[1]); @@ -44,7 +44,7 @@ TEST_CASE( "decay_adaptive", "[multi_adaptive]" ) { free(xyout_arr); } -TEST_CASE( "decay_predefined", "[multi_predefined]" ) { +TEST_CASE( "decay_predefined" ) { std::vector k {{ 2.0, 3.0}}; Decay odesys1(k[0]); Decay odesys2(k[1]); diff --git a/tests/test_cvodes_anyode_quad.cpp b/tests/test_cvodes_anyode_quad.cpp index 5ca61c87..5a807f4b 100644 --- a/tests/test_cvodes_anyode_quad.cpp +++ b/tests/test_cvodes_anyode_quad.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include "anyode/anyode.hpp" @@ -45,7 +45,7 @@ realtype integral_A_exp_minus_k_t__squared(realtype A, realtype k, realtype t){ return (1.0L/2.0L)*pow(A, 2)/k - 1.0L/2.0L*pow(A, 2)*exp(-2*k*t)/k; } -TEST_CASE( "quadrature_adaptive", "[simple_adaptive]" ) { +TEST_CASE( "quadrature_adaptive" ) { auto odesys = OdeSys(); int td = 1; realtype * xyqout = (realtype*)malloc(td*(odesys.get_ny()+odesys.get_nquads()+1)*sizeof(realtype)); @@ -92,7 +92,7 @@ TEST_CASE( "quadrature_adaptive", "[simple_adaptive]" ) { free(xyqout); } -TEST_CASE( "quadrature_predefined", "[simple_predefined]" ) { +TEST_CASE( "quadrature_predefined" ) { auto odesys = OdeSys(); int nt = 37; realtype t0=0, tend=4.0; diff --git a/tests/test_cvodes_anyode_sparse.cpp b/tests/test_cvodes_anyode_sparse.cpp index 2fab6bd2..3a70a6bd 100644 --- a/tests/test_cvodes_anyode_sparse.cpp +++ b/tests/test_cvodes_anyode_sparse.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include @@ -7,7 +7,7 @@ #include "cvodes_anyode.hpp" #include "cetsa_case.hpp" -TEST_CASE( "adaptive_sparse_jac", "[simple_adaptive]" ) { +TEST_CASE( "adaptive_sparse_jac" ) { std::vector p = {{298.15, 39390, -135.3, 18010, 44960, 48.2, 65919.5, -93.8304, 1780, 3790, 57.44, 19700, -157.4}}; OdeSys odesys(&p[0]); std::vector root_indices; diff --git a/tests/test_cvodes_anyode_svd.cpp b/tests/test_cvodes_anyode_svd.cpp index 70611512..fd629f78 100644 --- a/tests/test_cvodes_anyode_svd.cpp +++ b/tests/test_cvodes_anyode_svd.cpp @@ -1,11 +1,11 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include "anyode/anyode.hpp" #include "cvodes_anyode.hpp" #include "cetsa_case_iterative.hpp" -TEST_CASE( "adaptive_tricky_svd", "[simple_adaptive]" ) { +TEST_CASE( "adaptive_tricky_svd" ) { std::vector p = {{321.14999999999998, 39390, -135.30000000000001, 18010, 44960, 48.200000000000003, 49320, -114.59999999999999, 1780, -34400.547966379738, -2.865040967667511, 93065.338440593958, 5.7581184659305222}}; diff --git a/tests/test_cvodes_cxx.cpp b/tests/test_cvodes_cxx.cpp index a473633d..3a82be5d 100644 --- a/tests/test_cvodes_cxx.cpp +++ b/tests/test_cvodes_cxx.cpp @@ -1,5 +1,5 @@ // C++11 source code. -#include "catch.hpp" +#include "doctest.h" #include "cvodes_cxx.hpp" // realtype #include "testing_utils.hpp" @@ -18,7 +18,7 @@ int rhs_cb3(realtype /* t */, N_Vector y, N_Vector f, void * /* user_data */){ } -TEST_CASE( "methods", "[Integrator]" ) { +TEST_CASE( "methods" ) { #if SUNDIALS_VERSION_MAJOR >= 6 auto ctx = std::make_shared(nullptr); #endif @@ -47,7 +47,7 @@ realtype get_dx_max(realtype /* x */, const realtype * const /* y */){ return 1e-3; } -TEST_CASE( "adaptive", "[Integrator]" ) { +TEST_CASE( "adaptive" ) { const int ny = 1; #if SUNDIALS_VERSION_MAJOR >= 6 auto ctx = std::make_shared(nullptr); @@ -92,7 +92,7 @@ realtype get_dx_max2(realtype /* x */, const realtype * const /* y */){ } -TEST_CASE( "predefined", "[Integrator]" ) { +TEST_CASE( "predefined" ) { const int ny = 1; #if SUNDIALS_VERSION_MAJOR >= 6 auto ctx = std::make_shared(nullptr); @@ -128,7 +128,7 @@ TEST_CASE( "predefined", "[Integrator]" ) { } } -TEST_CASE( "predefined_autorestart", "[Integrator]" ) { +TEST_CASE( "predefined_autorestart" ) { const int ny = 3; #if SUNDIALS_VERSION_MAJOR >= 6 auto ctx = std::make_shared(nullptr); diff --git a/tests/test_sundials_cxx.cpp b/tests/test_sundials_cxx.cpp index 657695fa..bff9e303 100644 --- a/tests/test_sundials_cxx.cpp +++ b/tests/test_sundials_cxx.cpp @@ -1,5 +1,5 @@ // C++11 source code. -#include "catch.hpp" +#include "doctest.h" #include "sundials_cxx.hpp" // realtype #if SUNDIALS_VERSION_MAJOR >= 6 #include @@ -10,7 +10,7 @@ using sundials_cxx::nvector_serial::Vector; using sundials_cxx::nvector_serial::VectorView; -TEST_CASE( "methods" "[sundials::nvector_serial::Vector]" ) { +TEST_CASE( "methods" ) { #if SUNDIALS_VERSION_MAJOR >= 6 SUNContext ctx; SUNContext_Create(/*SUN_COMM_*/NULL, &ctx); @@ -39,7 +39,7 @@ TEST_CASE( "methods" "[sundials::nvector_serial::Vector]" ) { SUNContext_Free(&ctx); } -TEST_CASE( "methods" "[sundials::nvector_serial::VectorView]" ) { +TEST_CASE( "methods" ) { #if SUNDIALS_VERSION_MAJOR >= 6 SUNContext ctx; SUNContext_Create(/*SUN_COMM_*/NULL, &ctx); diff --git a/tests/test_tough_case.cpp b/tests/test_tough_case.cpp index d55cd549..4c85df28 100644 --- a/tests/test_tough_case.cpp +++ b/tests/test_tough_case.cpp @@ -1,11 +1,11 @@ -#include "catch.hpp" +#include "doctest.h" #include #include #include "cvodes_anyode.hpp" #include "anyode/anyode_iterative.hpp" #include "tough_case.hpp" -TEST_CASE( "adaptive_autorestart_tricky", "[simple_adaptive]" ) { +TEST_CASE( "adaptive_autorestart_tricky" ) { std::vector p = {{321.14999999999998, 39390, -135.30000000000001, 18010, 44960, 48.200000000000003, 49320, -114.59999999999999, 1780, -34400.547966379738, -2.865040967667511, 93065.338440593958, 5.7581184659305222}};