diff --git a/.gersemirc b/.gersemirc index c682c6bb5..b3d68b096 100644 --- a/.gersemirc +++ b/.gersemirc @@ -1,4 +1,4 @@ -definitions: [./CMakeLists.txt,./cmake-module,./cmake-external,./bindings,./include] -line_length: 80 +definitions: [] +line_length: 100 indent: 2 warn_about_unknown_commands: false diff --git a/.github/workflows/ci-arch.yml b/.github/workflows/ci-arch.yml index 07df38fdc..c8ce8f112 100644 --- a/.github/workflows/ci-arch.yml +++ b/.github/workflows/ci-arch.yml @@ -17,12 +17,8 @@ jobs: container: image: archlinux/archlinux:base-devel steps: - - run: pacman -Syu --noconfirm cmake eigen git libmatio python-scipy simde - - - uses: actions/checkout@v6 - with: - submodules: recursive - - - run: cmake -B build -S . -DBUILD_PYTHON_INTERFACE=ON - - run: cmake --build build - - run: cmake --build build -t test + - run: pacman -Syu --noconfirm cmake eigen libmatio python-scipy simde + - uses: actions/checkout@v6 + - run: cmake -B build -S . -DBUILD_PYTHON_INTERFACE=ON + - run: cmake --build build + - run: cmake --build build -t test diff --git a/.github/workflows/ci-linux-osx-win-conda.yml b/.github/workflows/ci-linux-osx-win-conda.yml index 487790dcc..8e0b974a1 100644 --- a/.github/workflows/ci-linux-osx-win-conda.yml +++ b/.github/workflows/ci-linux-osx-win-conda.yml @@ -60,8 +60,6 @@ jobs: steps: - uses: actions/checkout@v6 - with: - submodules: recursive - uses: conda-incubator/setup-miniconda@v3 with: @@ -102,7 +100,6 @@ jobs: run: | echo $(whereis ccache) echo $(which ccache) - git submodule update --init mkdir build cd build cmake .. -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }} -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_PYTHON_INTERFACE:BOOL=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_DOCUMENTATION:BOOL=ON -DINSTALL_DOCUMENTATION:BOOL=ON -DTEST_JULIA_INTERFACE:BOOL=OFF -DOpenMP_ROOT=$CONDA_PREFIX @@ -121,7 +118,6 @@ jobs: # It's better to use CMD to have all VS variables setup shell: cmd /C CALL {0} run: | - git submodule update --init mkdir build cd build set CC=${{ matrix.compiler }} diff --git a/.github/workflows/ci-linux-ros.yml b/.github/workflows/ci-linux-ros.yml index 3908082de..f8f56438e 100644 --- a/.github/workflows/ci-linux-ros.yml +++ b/.github/workflows/ci-linux-ros.yml @@ -32,11 +32,11 @@ jobs: name: ${{ matrix.env.name }} env: CMAKE_ARGS: -DBUILD_WITH_VECTORIZATION_SUPPORT=${{ matrix.env.VECTORIZATION_SUPPORT }} # Simde is available since humble + VERBOSE_OUTPUT: true + VERBOSE_TESTS: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - with: - submodules: recursive # Run industrial_ci - uses: 'ros-industrial/industrial_ci@master' env: ${{ matrix.env }} diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 8a5ab2c3a..7607359bb 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - with: - submodules: recursive - uses: conda-incubator/setup-miniconda@v3 with: @@ -38,7 +36,6 @@ jobs: - name: Configure shell: bash -l {0} run: | - git submodule update --init mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_INTERFACE:BOOL=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_DOCUMENTATION:BOOL=ON -DINSTALL_DOCUMENTATION:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DBUILD_WITH_VECTORIZATION_SUPPORT:BOOL=OFF diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml index a708c5511..273a57edf 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux.yml @@ -33,8 +33,6 @@ jobs: steps: - uses: actions/checkout@v6 - with: - submodules: recursive - uses: actions/setup-python@v6 with: python-version: "3.12" diff --git a/.github/workflows/release-osx-win.yml b/.github/workflows/release-osx-win.yml index 67725e229..d9d2b2fe1 100644 --- a/.github/workflows/release-osx-win.yml +++ b/.github/workflows/release-osx-win.yml @@ -28,8 +28,6 @@ jobs: steps: - uses: actions/checkout@v6 - with: - submodules: recursive - name: Set ownership run: | diff --git a/.gitignore b/.gitignore index 50e5b7617..d3f153efd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,14 @@ -build* +build*/ +install*/ +.pytest_cache/ +.cache/ +.pixi/ +__pycache__/ Xcode* *.pyc -.vscode* \ No newline at end of file +*~ +*.egg-info +.ruff_cache +.DS_Store +compile_commands.json +cmake-profiling.json \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2867bf33b..000000000 --- a/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "bindings/python/external/nanobind"] - path = bindings/python/external/nanobind - url = https://github.com/wjakob/nanobind -[submodule "cmake-module"] - path = cmake-module - url = https://github.com/jrl-umi3218/jrl-cmakemodules.git -[submodule "external/cereal"] - path = external/cereal - url = https://github.com/USCiLab/cereal.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f6efd294..199390997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - replace `std::numeric_limits::infinity()` by `std::numeric_limits::max()` ([#413](https://github.com/Simple-Robotics/proxsuite/pull/413)) - Upgraded nanobind dependency version (submodule) to v2.9.2 ([#418](https://github.com/Simple-Robotics/proxsuite/pull/418)) - Better dynamic module handling ([#419](https://github.com/Simple-Robotics/proxsuite/pull/419)) +- Switch to [JRL CMake modules v2](https://github.com/jrl-umi3218/jrl-cmakemodules/pull/798) ([#28](https://github.com/Simple-Robotics/nanoeigenpy/pull/28)) ### Fixed - Correction of the status update for `PROXQP_SOLVED_CLOSEST_PRIMAL_FEASIBLE` ([#432])(https://github.com/Simple-Robotics/proxsuite/pull/432) diff --git a/CMakeLists.txt b/CMakeLists.txt index a91b58935..780a5e556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,259 +1,280 @@ -# -# Copyright (c) 2022-2023 INRIA -# +cmake_minimum_required(VERSION 3.22...4.2) -cmake_minimum_required(VERSION 3.22) - -if(DEFINED PROJECT_NAME AND NOT PROJECT_WORKSPACE) - set(PROXSUITE_AS_SUBPROJECT ON) -endif() - -set(PROJECT_NAME proxsuite) -set(PROJECT_DESCRIPTION "The Advanced Proximal Optimization Toolbox") -set(PROJECT_URL "http://github.com/Simple-Robotics/proxsuite") -set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp") -set(PROJECT_USE_CMAKE_EXPORT TRUE) -set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE) -# To enable jrl-cmakemodules compatibility with workspace we must define the two -# following lines -set(PROJECT_AUTO_RUN_FINALIZE FALSE) -set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) - -# Check if the submodule cmake have been initialized -set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake-module") -if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake") - message(STATUS "JRL cmakemodules found in 'cmake/' git submodule") -else() - find_package(jrl-cmakemodules QUIET CONFIG) - if(jrl-cmakemodules_FOUND) - get_property( - JRL_CMAKE_MODULES - TARGET jrl-cmakemodules::jrl-cmakemodules - PROPERTY INTERFACE_INCLUDE_DIRECTORIES - ) - message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}") - elseif(${CMAKE_VERSION} VERSION_LESS "3.14.0") - message( - FATAL_ERROR - "\nCan't find jrl-cmakemodules. Please either:\n" - " - use git submodule: 'git submodule update --init'\n" - " - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n" - " - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n" - ) - else() - message(STATUS "JRL cmakemodules not found. Let's fetch it.") - include(FetchContent) - FetchContent_Declare( - "jrl-cmakemodules" - GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" - ) - FetchContent_MakeAvailable("jrl-cmakemodules") - FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES) - endif() -endif() - -# Disable -Werror on Unix for now. -set(CXX_DISABLE_WERROR True) -set(CMAKE_VERBOSE_MAKEFILE True) - -# Set CMake Policies -if(POLICY CMP0068) - cmake_policy(SET CMP0068 NEW) -endif(POLICY CMP0068) - -# ---------------------------------------------------- -# --- OPTIONS --------------------------------------- -# Need to be set before including base.cmake -# ---------------------------------------------------- -option(BUILD_DOCUMENTATION "Build the documentation." OFF) -option(BUILD_BENCHMARK "Build the benchmarks" OFF) -option(INSTALL_DOCUMENTATION "Install the documentation" OFF) -option(BUILD_PYTHON_INTERFACE "Build the Python bindings" OFF) -set(DOXYGEN_USE_MATHJAX YES) -set(DOXYGEN_USE_TEMPLATE_CSS YES) - -# install() DESTINATION paths are normalized (to remove in 3.31) (copied over -# from Pinocchio) -if(POLICY CMP0177) - cmake_policy(SET CMP0177 NEW) - set(CMAKE_POLICY_DEFAULT_CMP0177 NEW) -endif() -include(${JRL_CMAKE_MODULES}/base.cmake) -COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) -project(${PROJECT_NAME} ${PROJECT_ARGS}) - -include(${JRL_CMAKE_MODULES}/ide.cmake) -include(${JRL_CMAKE_MODULES}/apple.cmake) - -if(NOT ${CMAKE_VERSION} VERSION_GREATER "3.26.0" OR WIN32) - set( - CMAKE_MODULE_PATH - ${JRL_CMAKE_MODULES}/find-external/OpenMP - ${CMAKE_MODULE_PATH} - ) -endif() -include(${JRL_CMAKE_MODULES}/julia.cmake) -include(CMakeDependentOption) +project( + proxsuite + VERSION 0.7.2 + DESCRIPTION "The Advanced Proximal Optimization Toolbox" + HOMEPAGE_URL "https://github.com/Simple-Robotics/proxsuite" +) -# If needed, set CMake policy for APPLE systems -APPLY_DEFAULT_APPLE_CONFIGURATION() -SET_DEFAULT_CMAKE_BUILD_TYPE(Release) +include(cmake/get-jrl-cmakemodules.cmake) -option(INITIALIZE_EIGEN_WITH_NAN "Initialize Eigen objects with NAN values" OFF) -option( - CHECK_RUNTIME_MALLOC - "Check if some memory allocations are performed at runtime" - OFF -) -option(SUFFIX_SO_VERSION "Suffix library name with its version" ON) +jrl_configure_defaults() -option( - BUILD_WITH_VECTORIZATION_SUPPORT - "Build the library with the support of modern SIMD instructions." - ON -) -option( - BUILD_BINDINGS_WITH_AVX2_SUPPORT - "Build the bindings with AVX2 support." - ON -) -option( - BUILD_BINDINGS_WITH_AVX512_SUPPORT - "Build the bindings with AVX512 support." - ON -) -option(TEST_JULIA_INTERFACE "Run the julia examples as unittest" OFF) -option( - BUILD_WITH_OPENMP_SUPPORT - "Build the library with the OpenMP support" - OFF -) -cmake_dependent_option( +jrl_option(BUILD_TESTING "Build the tests" ON) +jrl_option(BUILD_EXAMPLES "Build the examples" ON) +jrl_option(BUILD_BENCHMARK "Build the benchmarks" ON) +jrl_option(BUILD_DOCUMENTATION "Build the documentation." ON) +jrl_option(BUILD_MAROS_MESZAROS_TESTS "Build the Maros-Meszaros tests, needs matio library" ON) +jrl_option(ENABLE_WARNINGS "Enable warnings during compilation" OFF) +jrl_option(ENABLE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF) +jrl_option(BUILD_PYTHON_INTERFACE "Build the Python bindings" OFF) +jrl_option(INSTALL_DOCUMENTATION "Install the documentation" OFF) +jrl_option(INITIALIZE_EIGEN_WITH_NAN "Initialize Eigen objects with NAN values" OFF) +jrl_option(CHECK_RUNTIME_MALLOC "Check if some memory allocations are performed at runtime" OFF) +jrl_option(SUFFIX_SO_VERSION "Suffix library name with its version" ON) +jrl_option(BUILD_WITH_VECTORIZATION_SUPPORT "Build the library with the support of modern SIMD instructions." OFF) +jrl_cmake_dependent_option(BUILD_BINDINGS_WITH_AVX2_SUPPORT "Build the bindings with AVX2 support." ON BUILD_WITH_VECTORIZATION_SUPPORT OFF) +jrl_cmake_dependent_option(BUILD_BINDINGS_WITH_AVX512_SUPPORT "Build the bindings with AVX512 support." ON BUILD_WITH_VECTORIZATION_SUPPORT OFF) +jrl_option(TEST_JULIA_INTERFACE "Run the julia examples as unittest" OFF) +jrl_option(BUILD_WITH_OPENMP_SUPPORT "Build the library with the OpenMP support" OFF) +jrl_cmake_dependent_option( LINK_PYTHON_INTERFACE_TO_OPENMP "Link OpenMP to the Python interface" ON BUILD_WITH_OPENMP_SUPPORT OFF ) +jrl_cmake_dependent_option(BUILD_WITH_SERIALIZATION "Build with serialization support" ON BUILD_PYTHON_INTERFACE OFF) +jrl_option(GENERATE_PYTHON_STUBS "Generate Python stubs" OFF) +jrl_option(PYTHON_BINDING_CUSTOM_INSTALL_DIR "Override the default /" "") -if(BUILD_WITH_OPENMP_SUPPORT) - find_package(OpenMP REQUIRED) - separate_arguments(OpenMP_CXX_FLAGS UNIX_COMMAND "${OpenMP_CXX_FLAGS}") -endif(BUILD_WITH_OPENMP_SUPPORT) - -set( - CMAKE_MODULE_PATH - "${JRL_CMAKE_MODULES}/find-external/Julia" - ${CMAKE_MODULE_PATH} -) -set( - CMAKE_MODULE_PATH - "${CMAKE_CURRENT_LIST_DIR}/cmake-external" - ${CMAKE_MODULE_PATH} -) +############################################################ -message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") -if(INITIALIZE_EIGEN_WITH_NAN) - add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_NAN) -endif(INITIALIZE_EIGEN_WITH_NAN) -if(CHECK_RUNTIME_MALLOC) - message(STATUS "Check if some memory allocations are performed at runtime.") - add_definitions(-DPROXSUITE_EIGEN_CHECK_MALLOC) - add_definitions(-DEIGEN_RUNTIME_NO_MALLOC) -endif(CHECK_RUNTIME_MALLOC) - -# set CXX standard -if(DEFINED CMAKE_CXX_STANDARD) - CHECK_MINIMAL_CXX_STANDARD(14 ENFORCE) -else() - set(CMAKE_CXX_STANDARD 17) +# Eigen3 +jrl_find_package(Eigen3 CONFIG REQUIRED) + +# Catch2 +if(BUILD_TESTING) + jrl_find_package(Catch2 CONFIG REQUIRED) + include(Catch) endif() -message(STATUS "[Proxsuite] Using C++ standard: ${CMAKE_CXX_STANDARD}") -# Handle Windows context -if(MSVC) - # add_definitions(-D_USE_MATH_DEFINES) - add_definitions(-DNOMINMAX) +# cereal (Serialization) +if(BUILD_WITH_SERIALIZATION) + jrl_find_package(cereal CONFIG REQUIRED) endif() -# Look for dependencies -ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.5") +# nanobind (Python bindings) +if(BUILD_PYTHON_INTERFACE) + jrl_find_python(3.8 REQUIRED COMPONENTS Interpreter Development.Module) + jrl_find_nanobind(2.4.0 CONFIG REQUIRED) +endif() -set( - SIMDE_HINT_FAILURE - "Set BUILD_WITH_VECTORIZATION_SUPPORT=OFF or install Simde on your system.\n If Simde is already installed, ensure that the CMake variable CMAKE_MODULE_PATH correctly points toward the location of FindSimde.cmake file." -) +# simde if(BUILD_WITH_VECTORIZATION_SUPPORT) - ADD_PROJECT_DEPENDENCY( - Simde - REQUIRED - FIND_EXTERNAL "Simde" - PKG_CONFIG_REQUIRES "simde" - ) + jrl_find_package(simde REQUIRED) +endif() + +# matio +if(BUILD_TESTING AND BUILD_MAROS_MESZAROS_TESTS) + jrl_find_package(matio REQUIRED) +endif() + +# OpenMP +if(BUILD_WITH_OPENMP_SUPPORT) + jrl_find_package(OpenMP REQUIRED) +endif() + +# Doxygen + Graphviz (dot) +if(BUILD_DOCUMENTATION) + jrl_find_package(Doxygen REQUIRED COMPONENTS dot) endif() -# Build the main library -file(GLOB_RECURSE ${PROJECT_NAME}_HEADERS ${PROJECT_SOURCE_DIR}/include/*.hpp) +############################################################ add_library(proxsuite INTERFACE) -if(MSVC) - target_compile_options(proxsuite INTERFACE /permissive-) - target_compile_options(proxsuite INTERFACE $<$:/bigobj>) -endif(MSVC) -target_link_libraries(proxsuite PUBLIC INTERFACE Eigen3::Eigen) +add_library(proxsuite::proxsuite ALIAS proxsuite) +set_target_properties(proxsuite PROPERTIES VERSION ${PROJECT_VERSION}) +target_compile_features(proxsuite INTERFACE cxx_std_17) +jrl_target_enforce_msvc_conformance(proxsuite INTERFACE) + target_include_directories( proxsuite INTERFACE - "$" - "$" + $ + $ ) -target_include_directories( + +jrl_target_generate_config_header(proxsuite INTERFACE) + +if(ENABLE_WARNINGS) + jrl_target_set_default_compile_options(proxsuite INTERFACE) +endif() + +if(ENABLE_WARNINGS_AS_ERRORS) + jrl_target_treat_all_warnings_as_errors(proxsuite INTERFACE) +endif() + +target_compile_definitions( + proxsuite + INTERFACE + $<$:EIGEN_INITIALIZE_MATRICES_BY_NAN> + $<$:EIGEN_RUNTIME_NO_MALLOC> + $<$:PROXSUITE_EIGEN_CHECK_MALLOC> + $<$:PROXSUITE_PYTHON_INTERFACE_WITH_OPENMP> +) + +target_link_libraries( proxsuite - INTERFACE "$" + INTERFACE Eigen3::Eigen $<$:OpenMP::OpenMP_CXX> ) -set(EXPORTED_TARGETS_LIST proxsuite) -ADD_HEADER_GROUP(${PROJECT_NAME}_HEADERS) +if(BUILD_PYTHON_INTERFACE) + add_subdirectory(bindings/python) +endif() if(BUILD_WITH_VECTORIZATION_SUPPORT) add_library(proxsuite-vectorized INTERFACE) - target_link_libraries(proxsuite-vectorized PUBLIC INTERFACE proxsuite) - target_link_libraries(proxsuite-vectorized PUBLIC INTERFACE simde) + add_library(proxsuite::proxsuite-vectorized ALIAS proxsuite-vectorized) + target_link_libraries(proxsuite-vectorized INTERFACE proxsuite simde::simde) target_compile_definitions(proxsuite-vectorized INTERFACE PROXSUITE_VECTORIZE) - list(APPEND EXPORTED_TARGETS_LIST proxsuite-vectorized) endif() -if(BUILD_TESTING OR BUILD_PYTHON_INTERFACE) - # Download cereal for pything bindings and unittests - find_package(cereal QUIET CONFIG) - if(NOT cereal_FOUND) - set(cereal_dir ${PROJECT_SOURCE_DIR}/external/cereal) - set(cereal ${cereal_dir}/README.md) - find_package(Git REQUIRED) - if(NOT EXISTS ${cereal}) - execute_process( - COMMAND ${GIT_EXECUTABLE} submodule update --init ${cereal_dir} - WORKING_DIRECTORY ${cereal_dir} - COMMAND_ERROR_IS_FATAL ANY - ) - endif() - endif() -endif() +target_link_libraries(proxsuite INTERFACE $<$:cereal::cereal>) -install( - TARGETS ${EXPORTED_TARGETS_LIST} - EXPORT ${TARGETS_EXPORT_NAME} - LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} +target_link_libraries( + proxsuite-vectorized + INTERFACE $<$:cereal::cereal> ) -add_subdirectory(bindings) -if(BUILD_TESTING AND NOT PROXSUITE_AS_SUBPROJECT) +if(BUILD_TESTING) + message(STATUS "[proxsuite] Building tests") + enable_testing() add_subdirectory(test) +endif() + +if(BUILD_EXAMPLES) + message(STATUS "[proxsuite] Building examples") add_subdirectory(examples) endif() -add_subdirectory(benchmark) +if(BUILD_BENCHMARK) + message(STATUS "[proxsuite] Building benchmarks") + add_subdirectory(benchmark) +endif() + +if(BUILD_DOCUMENTATION) + message(STATUS "[proxsuite] Building documentation") + add_subdirectory(doc) +endif() + +jrl_target_headers(proxsuite INTERFACE + HEADERS + include/proxsuite/helpers/common.hpp + include/proxsuite/helpers/instruction-set.hpp + include/proxsuite/helpers/optional.hpp + include/proxsuite/helpers/version.hpp + include/proxsuite/linalg/dense/core.hpp + include/proxsuite/linalg/dense/factorize.hpp + include/proxsuite/linalg/dense/ldlt.hpp + include/proxsuite/linalg/dense/modify.hpp + include/proxsuite/linalg/dense/solve.hpp + include/proxsuite/linalg/dense/update.hpp + include/proxsuite/linalg/sparse/core.hpp + include/proxsuite/linalg/sparse/factorize.hpp + include/proxsuite/linalg/sparse/rowmod.hpp + include/proxsuite/linalg/sparse/update.hpp + include/proxsuite/linalg/veg/internal/external/hedley.ext.hpp + include/proxsuite/linalg/veg/internal/external/unhedley.ext.hpp + include/proxsuite/linalg/veg/internal/assert_impl.hpp + include/proxsuite/linalg/veg/internal/collection_algo.hpp + include/proxsuite/linalg/veg/internal/dbg.hpp + include/proxsuite/linalg/veg/internal/delete_special_members.hpp + include/proxsuite/linalg/veg/internal/dyn_index.hpp + include/proxsuite/linalg/veg/internal/epilogue.hpp + include/proxsuite/linalg/veg/internal/fix_index.hpp + include/proxsuite/linalg/veg/internal/has_asan.hpp + include/proxsuite/linalg/veg/internal/integer_seq.hpp + include/proxsuite/linalg/veg/internal/macros.hpp + include/proxsuite/linalg/veg/internal/narrow.hpp + include/proxsuite/linalg/veg/internal/preprocessor.hpp + include/proxsuite/linalg/veg/internal/prologue.hpp + include/proxsuite/linalg/veg/internal/std.hpp + include/proxsuite/linalg/veg/internal/terminate.hpp + include/proxsuite/linalg/veg/internal/typedefs.hpp + include/proxsuite/linalg/veg/memory/address.hpp + include/proxsuite/linalg/veg/memory/alloc.hpp + include/proxsuite/linalg/veg/memory/dynamic_stack.hpp + include/proxsuite/linalg/veg/memory/placement.hpp + include/proxsuite/linalg/veg/memory/stack_alloc.hpp + include/proxsuite/linalg/veg/type_traits/alloc.hpp + include/proxsuite/linalg/veg/type_traits/assignable.hpp + include/proxsuite/linalg/veg/type_traits/constructible.hpp + include/proxsuite/linalg/veg/type_traits/core.hpp + include/proxsuite/linalg/veg/type_traits/invocable.hpp + include/proxsuite/linalg/veg/type_traits/primitives.hpp + include/proxsuite/linalg/veg/type_traits/tags.hpp + include/proxsuite/linalg/veg/util/assert.hpp + include/proxsuite/linalg/veg/util/dbg.hpp + include/proxsuite/linalg/veg/util/defer.hpp + include/proxsuite/linalg/veg/util/dynstack_alloc.hpp + include/proxsuite/linalg/veg/util/get.hpp + include/proxsuite/linalg/veg/util/index.hpp + include/proxsuite/linalg/veg/util/unreachable.hpp + include/proxsuite/linalg/veg/ref.hpp + include/proxsuite/linalg/veg/slice.hpp + include/proxsuite/linalg/veg/tuple.hpp + include/proxsuite/linalg/veg/vec.hpp + include/proxsuite/proxqp/dense/preconditioner/identity.hpp + include/proxsuite/proxqp/dense/preconditioner/ruiz.hpp + include/proxsuite/proxqp/dense/backward_data.hpp + include/proxsuite/proxqp/dense/compute_ECJ.hpp + include/proxsuite/proxqp/dense/dense.hpp + include/proxsuite/proxqp/dense/fwd.hpp + include/proxsuite/proxqp/dense/helpers.hpp + include/proxsuite/proxqp/dense/linesearch.hpp + include/proxsuite/proxqp/dense/model.hpp + include/proxsuite/proxqp/dense/solver.hpp + include/proxsuite/proxqp/dense/utils.hpp + include/proxsuite/proxqp/dense/views.hpp + include/proxsuite/proxqp/dense/workspace.hpp + include/proxsuite/proxqp/dense/wrapper.hpp + include/proxsuite/proxqp/parallel/omp.hpp + include/proxsuite/proxqp/parallel/qp_solve.hpp + include/proxsuite/proxqp/sparse/preconditioner/identity.hpp + include/proxsuite/proxqp/sparse/preconditioner/ruiz.hpp + include/proxsuite/proxqp/sparse/fwd.hpp + include/proxsuite/proxqp/sparse/helpers.hpp + include/proxsuite/proxqp/sparse/model.hpp + include/proxsuite/proxqp/sparse/solver.hpp + include/proxsuite/proxqp/sparse/sparse.hpp + include/proxsuite/proxqp/sparse/utils.hpp + include/proxsuite/proxqp/sparse/views.hpp + include/proxsuite/proxqp/sparse/workspace.hpp + include/proxsuite/proxqp/sparse/wrapper.hpp + include/proxsuite/proxqp/utils/prints.hpp + include/proxsuite/proxqp/utils/random_qp_problems.hpp + include/proxsuite/proxqp/results.hpp + include/proxsuite/proxqp/settings.hpp + include/proxsuite/proxqp/status.hpp + include/proxsuite/proxqp/timings.hpp + include/proxsuite/fwd.hpp + BASE_DIRS include +) + +if(BUILD_WITH_SERIALIZATION) + jrl_target_headers(proxsuite INTERFACE + HEADERS + include/proxsuite/serialization/archive.hpp + include/proxsuite/serialization/eigen.hpp + include/proxsuite/serialization/model.hpp + include/proxsuite/serialization/results.hpp + include/proxsuite/serialization/ruiz.hpp + include/proxsuite/serialization/settings.hpp + include/proxsuite/serialization/workspace.hpp + include/proxsuite/serialization/wrapper.hpp + BASE_DIRS include + ) +endif() + +jrl_add_export_component(NAME proxsuite TARGETS proxsuite) + +if(BUILD_WITH_VECTORIZATION_SUPPORT) + jrl_add_export_component(NAME vectorized TARGETS proxsuite-vectorized) +endif() + +jrl_export_package() -SETUP_PROJECT_FINALIZE() +jrl_print_dependencies_summary() +jrl_print_options_summary() diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 6f6ea47ef..1249fbb47 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -1,26 +1,18 @@ -add_custom_target(${PROJECT_NAME}_bench) - -macro(proxsuite_benchmark bench_name) - if(BUILD_BENCHMARK) - add_executable(${bench_name} ${bench_name}.cpp) - else(BUILD_BENCHMARK) - add_executable(${bench_name} EXCLUDE_FROM_ALL ${bench_name}.cpp) - endif(BUILD_BENCHMARK) +function(proxsuite_add_benchmark name) + add_executable(proxsuite-benchmark-${name} ${name}.cpp) + target_link_libraries(proxsuite-benchmark-${name} PRIVATE proxsuite) if(BUILD_WITH_VECTORIZATION_SUPPORT) - target_link_libraries(${bench_name} PUBLIC proxsuite-vectorized) - else() - target_link_libraries(${bench_name} PUBLIC proxsuite) + add_executable(proxsuite-vectorized-benchmark-${name} ${name}.cpp) + target_link_libraries(proxsuite-vectorized-benchmark-${name} PRIVATE proxsuite-vectorized) endif() - add_dependencies(${PROJECT_NAME}_bench ${bench_name}) -endmacro(proxsuite_benchmark) +endfunction() -proxsuite_benchmark(timings-lp) -proxsuite_benchmark(timings-box-constraints) -proxsuite_benchmark(timings-dense-backend) -proxsuite_benchmark(timings-diagonal-hessian) +proxsuite_add_benchmark(timings-box-constraints) +proxsuite_add_benchmark(timings-dense-backend) +proxsuite_add_benchmark(timings-diagonal-hessian) +proxsuite_add_benchmark(timings-lp) if(BUILD_WITH_OPENMP_SUPPORT) - proxsuite_benchmark(timings-parallel) - target_link_libraries(timings-parallel PRIVATE OpenMP::OpenMP_CXX) -endif(BUILD_WITH_OPENMP_SUPPORT) + proxsuite_add_benchmark(timings-parallel) +endif() diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt deleted file mode 100644 index 284d3386b..000000000 --- a/bindings/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -if(BUILD_PYTHON_INTERFACE) - add_subdirectory(python) -endif() diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 289d85af0..5a2490ed7 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -1,313 +1,140 @@ -if(UNIX) - set(PYTHON_COMPONENTS Interpreter Development.Module) +set( + proxsuite_pywrap_HEADERS + src/algorithms.hpp + src/expose-backward.hpp + src/expose-helpers.hpp + src/expose-model.hpp + src/expose-qpobject.hpp + src/expose-qpvector.hpp + src/expose-results.hpp + src/expose-settings.hpp + src/expose-solve.hpp + src/expose-workspace.hpp + src/optional-eigen-fix.hpp +) +if(BUILD_WITH_OPENMP_SUPPORT) + list(APPEND proxsuite_pywrap_HEADERS src/expose-parallel.hpp) endif() -include(${JRL_CMAKE_MODULES}/python.cmake) -include(${JRL_CMAKE_MODULES}/python-helpers.cmake) +set(proxsuite_pywrap_SOURCES src/expose-all.cpp) -option(GENERATE_PYTHON_STUBS "Generate Python stubs" OFF) +function(create_python_target target_name) + set(options) + set(oneValueArgs) + set(multiValueArgs COMPILE_OPTIONS LINK_LIBRARIES) + cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) -FINDPYTHON(REQUIRED) -set(Python_INCLUDE_DIRS ${Python3_INCLUDE_DIRS}) -# Nanobind expects these targets instead of Python3::* -# https://github.com/jrl-umi3218/jrl-cmakemodules/issues/708 -add_library(Python::Module ALIAS Python3::Module) -add_executable(Python::Interpreter ALIAS Python3::Interpreter) + nanobind_add_module(${target_name} NB_STATIC LTO NB_SUPPRESS_WARNINGS ${proxsuite_pywrap_SOURCES} ${proxsuite_pywrap_HEADERS}) + jrl_check_python_module_name(${target_name}) -if(IS_ABSOLUTE ${PYTHON_SITELIB}) - set(${PYWRAP}_INSTALL_DIR ${PYTHON_SITELIB}/${PROJECT_NAME}) -else() - set( - ${PYWRAP}_INSTALL_DIR - ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PROJECT_NAME} - ) -endif() + target_link_libraries(${target_name} PRIVATE ${arg_LINK_LIBRARIES}) + target_compile_options(${target_name} PRIVATE ${arg_COMPILE_OPTIONS}) + target_compile_definitions(${target_name} PRIVATE PYTHON_MODULE_NAME=${target_name}) + jrl_target_set_output_directory(${target_name} OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME}) +endfunction() + +# copy __init_.py and torch files into the build directory (so we can import proxsuite) +file(COPY proxsuite DESTINATION ${CMAKE_BINARY_DIR}/lib/site-packages) + +# The main python binding target +create_python_target(proxsuite_pywrap LINK_LIBRARIES proxsuite) -cmake_policy(PUSH) -cmake_policy(SET CMP0074 NEW) -# Detect the installed nanobind package and import it into CMake -execute_process( - COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE nanobind_ROOT +# Vectorized python binding targets +if( + BUILD_WITH_VECTORIZATION_SUPPORT + AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "(x86)|(X86)|(amd64)|(AMD64)" ) -find_package(nanobind CONFIG) -cmake_policy(POP) -if(NOT nanobind_FOUND) - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external/nanobind) - add_subdirectory( - external/nanobind - ${CMAKE_CURRENT_BINARY_DIR}/external/nanobind - ) - message(STATUS "Will use nanobind submodule.") -else() - message(STATUS "Found installed nanobind.") -endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(AVX_COMPILE_OPTION "/arch:AVX") + set(AVX2_COMPILE_OPTION "/arch:AVX2") + set(FMA_COMPILE_OPTION "/fp:fast") + set(AVX512_COMPILE_OPTION "/arch:AVX512") + else() + set(AVX_COMPILE_OPTION "-mavx") + set(AVX2_COMPILE_OPTION "-mavx2") + set(FMA_COMPILE_OPTION "-mfma") + set(AVX512_COMPILE_OPTION "-mavx512f") + endif() -add_custom_target(${PROJECT_NAME}_python) + if(BUILD_BINDINGS_WITH_AVX2_SUPPORT) + message(STATUS "[proxsuite] Building python bindings with AVX2 support") + create_python_target( + proxsuite_pywrap_avx2 + COMPILE_OPTIONS "${AVX2_COMPILE_OPTION};${FMA_COMPILE_OPTION}" + LINK_LIBRARIES proxsuite-vectorized + ) + endif() -# Collect files -file(GLOB_RECURSE PYWRAP_HEADERS ${CMAKE_CURRENT_LIST_DIR}/src/*.hpp) -file(GLOB_RECURSE PYWRAP_SOURCES ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) + if(BUILD_BINDINGS_WITH_AVX512_SUPPORT) + message(STATUS "[proxsuite] Building python bindings with AVX512 support") + create_python_target( + proxsuite_pywrap_avx512 + COMPILE_OPTIONS "${AVX512_COMPILE_OPTION};${FMA_COMPILE_OPTION}" + LINK_LIBRARIES proxsuite-vectorized + ) + endif() +endif() # Add simd feature detectors for current intel CPU if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "(x86)|(X86)|(amd64)|(AMD64)") - nanobind_add_module(instructionset helpers/instruction-set.cpp) - add_dependencies(${PROJECT_NAME}_python instructionset) + nanobind_add_module(instructionset NB_STATIC LTO NB_SUPPRESS_WARNINGS helpers/instruction-set.cpp) target_link_libraries(instructionset PRIVATE proxsuite) - set_target_properties( + jrl_target_set_output_directory( instructionset - PROPERTIES - OUTPUT_NAME instructionset - LIBRARY_OUTPUT_DIRECTORY - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - LIBRARY_OUTPUT_DIRECTORY_RELEASE - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - LIBRARY_OUTPUT_DIRECTORY_DEBUG - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - # On Windows, shared library are treat as binary - RUNTIME_OUTPUT_DIRECTORY - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - RUNTIME_OUTPUT_DIRECTORY_RELEASE - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - RUNTIME_OUTPUT_DIRECTORY_DEBUG - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - ) - if(UNIX AND NOT APPLE) - set_target_properties( - instructionset - PROPERTIES INSTALL_RPATH "\$ORIGIN/../../.." - ) - endif() - install( - TARGETS instructionset - EXPORT ${TARGETS_EXPORT_NAME} - DESTINATION ${${PYWRAP}_INSTALL_DIR} + OUTPUT_DIRECTORY + ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME} ) if(GENERATE_PYTHON_STUBS) nanobind_add_stub( instructionset_stub MODULE instructionset - OUTPUT instructionset.pyi + OUTPUT ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME}/instructionset.pyi PYTHON_PATH $ DEPENDS instructionset ) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/instructionset.pyi - DESTINATION ${${PYWRAP}_INSTALL_DIR} - ) endif() endif() -function(list_filter list regular_expression dest_list) - foreach(elt ${list}) - if(${elt} MATCHES ${regular_expression}) - list(REMOVE_ITEM list ${elt}) - endif() - endforeach(elt ${list}) - set(${dest_list} ${list} PARENT_SCOPE) -endfunction(list_filter) - -function( - create_python_target - target_name - compile_options - dependencies - generate_stubs -) - nanobind_add_module(${target_name} ${PYWRAP_SOURCES} ${PYWRAP_HEADERS}) - add_dependencies(${PROJECT_NAME}_python ${target_name}) - - target_link_libraries(${target_name} PUBLIC ${dependencies}) - target_compile_options(${target_name} PRIVATE ${compile_options}) - target_link_libraries(${target_name} PRIVATE proxsuite) - target_compile_definitions( - ${target_name} - PRIVATE PYTHON_MODULE_NAME=${target_name} - ) - - if(BUILD_WITH_OPENMP_SUPPORT) - target_compile_options(${target_name} PRIVATE ${OpenMP_CXX_FLAGS}) - target_compile_definitions( - ${target_name} - PRIVATE -DPROXSUITE_PYTHON_INTERFACE_WITH_OPENMP - ) - target_include_directories( - ${target_name} - SYSTEM - PRIVATE ${OpenMP_CXX_INCLUDE_DIR} - ) - if(LINK_PYTHON_INTERFACE_TO_OPENMP) - target_link_libraries(${target_name} PRIVATE ${OpenMP_CXX_LIBRARIES}) - endif(LINK_PYTHON_INTERFACE_TO_OPENMP) - else() - list_filter("${PYWRAP_HEADERS}" "expose-parallel" PYWRAP_HEADERS) - endif(BUILD_WITH_OPENMP_SUPPORT) - - if(cereal_FOUND) - target_link_libraries(${target_name} PRIVATE cereal::cereal) - else() - target_include_directories( - ${target_name} - SYSTEM - PRIVATE ${PROJECT_SOURCE_DIR}/external/cereal/include - ) +if(GENERATE_PYTHON_STUBS) + set(simd_lib "") + if(TARGET proxsuite_pywrap_avx2) + set(simd_lib proxsuite_pywrap_avx2) endif() - set_target_properties( - ${target_name} - PROPERTIES - OUTPUT_NAME ${target_name} - LIBRARY_OUTPUT_DIRECTORY - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - LIBRARY_OUTPUT_DIRECTORY_RELEASE - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - LIBRARY_OUTPUT_DIRECTORY_DEBUG - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - # On Windows, shared library are treat as binary - RUNTIME_OUTPUT_DIRECTORY - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - RUNTIME_OUTPUT_DIRECTORY_RELEASE - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - RUNTIME_OUTPUT_DIRECTORY_DEBUG - "${PROJECT_BINARY_DIR}/bindings/python/${PROJECT_NAME}" - ) - - if(UNIX AND NOT APPLE) - set_target_properties( - ${target_name} - PROPERTIES INSTALL_RPATH "\$ORIGIN/../../.." - ) - endif() - - install(TARGETS ${target_name} DESTINATION ${${PYWRAP}_INSTALL_DIR}) - if(${generate_stubs}) - set( - stub_outputs - ${target_name}/__init__.pyi - ${target_name}/helpers.pyi - ${target_name}/proxqp/__init__.pyi - ${target_name}/proxqp/dense.pyi - ${target_name}/proxqp/sparse.pyi - ) - nanobind_add_stub( - ${target_name}_stub - MODULE ${target_name} - OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} - OUTPUT ${stub_outputs} - RECURSIVE - PYTHON_PATH $ - DEPENDS ${target_name} - ) - install( - DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${target_name} - DESTINATION ${${PYWRAP}_INSTALL_DIR} - ) + if(TARGET proxsuite_pywrap_avx512) + set(simd_lib proxsuite_pywrap_avx512) endif() -endfunction() -if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) - set(AVX_COMPILE_OPTION "/arch:AVX") - set(AVX2_COMPILE_OPTION "/arch:AVX2") - set(FMA_COMPILE_OPTION "/fp:fast,") - set(AVX512_COMPILE_OPTION "/arch:AVX512") -else() - set(AVX_COMPILE_OPTION "-mavx") - set(AVX2_COMPILE_OPTION "-mavx2") - set(FMA_COMPILE_OPTION "-mfma") - set(AVX512_COMPILE_OPTION "-mavx512f") + nanobind_add_stub( + proxsuite_pywrap_stub + MODULE proxsuite + VERBOSE + OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME} + OUTPUT + __init__.pyi + helpers.pyi + proxqp/__init__.pyi + proxqp/dense.pyi + proxqp/sparse.pyi + RECURSIVE + PYTHON_PATH ${CMAKE_BINARY_DIR}/lib/site-packages + DEPENDS proxsuite_pywrap ${simd_lib} + ) endif() -create_python_target(proxsuite_pywrap "" proxsuite ${GENERATE_PYTHON_STUBS}) -if( - BUILD_WITH_VECTORIZATION_SUPPORT - AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "(x86)|(X86)|(amd64)|(AMD64)" +jrl_python_compile_all( + DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages ) - if(BUILD_BINDINGS_WITH_AVX2_SUPPORT) - create_python_target( - proxsuite_pywrap_avx2 - "${AVX2_COMPILE_OPTION};${FMA_COMPILE_OPTION}" - proxsuite-vectorized - FALSE - ) - endif(BUILD_BINDINGS_WITH_AVX2_SUPPORT) - if(BUILD_BINDINGS_WITH_AVX512_SUPPORT) - create_python_target( - proxsuite_pywrap_avx512 - "${AVX512_COMPILE_OPTION};${FMA_COMPILE_OPTION}" - proxsuite-vectorized - FALSE - ) - endif(BUILD_BINDINGS_WITH_AVX512_SUPPORT) -endif() -ADD_HEADER_GROUP(PYWRAP_HEADERS) -ADD_SOURCE_GROUP(PYWRAP_SOURCES) - -# --- INSTALL SCRIPTS -# On Windows, we need to enforce the environment variable KMP_DUPLICATE_LIB_OK -# to True to to allow the program to continue to execute with OpenMP support -if( - WIN32 - AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" - AND BUILD_WITH_OPENMP_SUPPORT +# Install the whole python package directory +jrl_python_compute_install_dir(python_install_dir) +install( + DIRECTORY ${CMAKE_BINARY_DIR}/lib/site-packages/${PROJECT_NAME} + DESTINATION ${python_install_dir} + FILES_MATCHING + PATTERN "*.py" + PATTERN "*.pyc" + PATTERN "*.pyi" + PATTERN "*.typed" + PATTERN "*.so" + PATTERN "*.pyd" ) - set( - OPENMP_KMP_DUPLICATE_LIB_OK_SCRIPT - "import os\n" - "os.environ[\"KMP_DUPLICATE_LIB_OK\"] = \"1\"\n\n" - ) - - if(CMAKE_GENERATOR MATCHES "Visual Studio|Xcode") - set(PYTHON_MODULE_DIR "${CMAKE_CURRENT_BINARY_DIR}/proxsuite/$") - else() - set(PYTHON_MODULE_DIR "${CMAKE_CURRENT_BINARY_DIR}/proxsuite") - endif() - - set(original_init_dot_py_file ${CMAKE_CURRENT_LIST_DIR}/proxsuite/__init__.py) - set( - generated_init_dot_py_file - ${CMAKE_CURRENT_BINARY_DIR}/proxsuite/__init__.py - ) - set(generated_init_dot_pyc_file ${PYTHON_MODULE_DIR}/__init__.pyc) - - # Copy content of the __init__.py file - file(READ ${original_init_dot_py_file} INIT_CONTENT) - # Create a new __init__.py file containing both the content of __init__.py - # prepended with the OPENMP_KMP_DUPLICATE_LIB_OK_SCRIPT content - file( - WRITE - ${generated_init_dot_py_file} - ${OPENMP_KMP_DUPLICATE_LIB_OK_SCRIPT} - ) - file(APPEND ${generated_init_dot_py_file} ${INIT_CONTENT}) - - PYTHON_BUILD_FILE( - ${generated_init_dot_py_file} - ${generated_init_dot_pyc_file} - ) - install( - FILES "${generated_init_dot_py_file}" - DESTINATION ${${PYWRAP}_INSTALL_DIR} - ) -else() - PYTHON_BUILD(${PROJECT_NAME} __init__.py) - install( - FILES "${CMAKE_CURRENT_SOURCE_DIR}/proxsuite/__init__.py" - DESTINATION ${${PYWRAP}_INSTALL_DIR} - ) -endif() - -PYTHON_BUILD_GET_TARGET(compile_pyc) -add_dependencies(${PROJECT_NAME}_python ${compile_pyc}) - -set(PYTHON_FILES torch/__init__.py torch/qplayer.py torch/utils.py) - -file(MAKE_DIRECTORY ${${PYWRAP}_INSTALL_DIR}/torch) - -foreach(python ${PYTHON_FILES}) - PYTHON_BUILD(${PROJECT_NAME} ${python}) - get_filename_component(pysubmodule ${python} PATH) - get_filename_component(pyname ${python} NAME) - set(MODULE_NAME ${PROJECT_NAME}/${pysubmodule}) - PYTHON_INSTALL_ON_SITE(${MODULE_NAME} ${pyname}) -endforeach(python) diff --git a/bindings/python/external/nanobind b/bindings/python/external/nanobind deleted file mode 160000 index 116e098cf..000000000 --- a/bindings/python/external/nanobind +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 116e098cfa96effca2a54e32e0ce5b93abe25393 diff --git a/bindings/python/proxsuite/__init__.py b/bindings/python/proxsuite/__init__.py index 22e535961..eb79e4acb 100644 --- a/bindings/python/proxsuite/__init__.py +++ b/bindings/python/proxsuite/__init__.py @@ -8,6 +8,12 @@ if TYPE_CHECKING: from .proxsuite_pywrap import * # noqa F403 +import os + +os.environ["KMP_DUPLICATE_LIB_OK"] = ( + "True" # to avoid issues with OpenMP in some environments +) + def _load_main_module(): import platform diff --git a/bindings/python/proxsuite/torch/qplayer.py b/bindings/python/proxsuite/torch/qplayer.py index 4d407de5a..86bf8af06 100644 --- a/bindings/python/proxsuite/torch/qplayer.py +++ b/bindings/python/proxsuite/torch/qplayer.py @@ -18,7 +18,7 @@ def QPFunction( omp_parallel=False, structural_feasibility=True, ): - """! + r"""! Solve a batch of Quadratic Programming (QP) problems. This function solves QP problems of the form: diff --git a/cmake-external/FindMatio.cmake b/cmake-external/FindMatio.cmake deleted file mode 100644 index 935aad504..000000000 --- a/cmake-external/FindMatio.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# ============================================================================= -# SPDX-FileCopyrightText: 2021 Stefan Gerlach -# -# SPDX-License-Identifier: BSD-3-Clause -# ============================================================================= - -find_library(MATIO_LIBRARIES NAMES matio libmatio) - -find_path(MATIO_INCLUDE_DIR matio.h) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - Matio - FOUND_VAR MATIO_FOUND - REQUIRED_VARS MATIO_LIBRARIES MATIO_INCLUDE_DIR -) - -if(MATIO_FOUND) - add_library(matio UNKNOWN IMPORTED) - set_target_properties( - matio - PROPERTIES - IMPORTED_LOCATION "${MATIO_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${MATIO_INCLUDE_DIR}" - ) -else() - set(MATIO_LIBRARIES "") -endif() - -mark_as_advanced(MATIO_LIBRARIES MATIO_INCLUDE_DIR) - -include(FeatureSummary) -set_package_properties( - Matio - PROPERTIES - DESCRIPTION "Reading and writing binary MATLAB MAT files" - URL "https://github.com/tbeu/matio" -) diff --git a/cmake-external/FindSphinx.cmake b/cmake-external/FindSphinx.cmake deleted file mode 100644 index c00f3720d..000000000 --- a/cmake-external/FindSphinx.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# Look for an executable called sphinx-build -find_program( - SPHINX_EXECUTABLE - NAMES sphinx-build - DOC "Path to sphinx-build executable" -) - -include(FindPackageHandleStandardArgs) -# Handle standard arguments to find_package like REQUIRED and QUIET -find_package_handle_standard_args( - Sphinx - "Failed to find sphinx-build executable" - SPHINX_EXECUTABLE -) diff --git a/cmake-external/compiler_warnings.cmake b/cmake-external/compiler_warnings.cmake deleted file mode 100644 index da63eaf57..000000000 --- a/cmake-external/compiler_warnings.cmake +++ /dev/null @@ -1,91 +0,0 @@ -# from here: -# -# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Avai -# lable.md - -function(set_project_warnings project_name) - option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF) - - set( - MSVC_WARNINGS - /W4 # Baseline reasonable warnings - /w14242 # 'identfier': conversion from 'type1' to 'type1', possible loss - # of data - /w14254 # 'operator': conversion from 'type1:field_bits' to - # 'type2:field_bits', possible loss of data - /w14263 # 'function': member function does not override any base class - # virtual member function - /w14265 # 'classname': class has virtual functions, but destructor is not - # virtual instances of this class may not be destructed correctly - /w14287 # 'operator': unsigned/negative constant mismatch - /we4289 # nonstandard extension used: 'variable': loop control variable - # declared in the for-loop is used outside the for-loop scope - /w14296 # 'operator': expression is always 'boolean_value' - /w14311 # 'variable': pointer truncation from 'type1' to 'type2' - /w14545 # expression before comma evaluates to a function which is missing - # an argument list - /w14546 # function call before comma missing argument list - /w14547 # 'operator': operator before comma has no effect; expected - # operator with side-effect - /w14549 # 'operator': operator before comma has no effect; did you intend - # 'operator'? - /w14555 # expression has no effect; expected expression with side- effect - /w14619 # pragma warning: there is no warning number 'number' - /w14640 # Enable warning on thread un-safe static member initialization - /w14826 # Conversion from 'type1' to 'type_2' is sign-extended. This may - # cause unexpected runtime behavior. - /w14905 # wide string literal cast to 'LPSTR' - /w14906 # string literal cast to 'LPWSTR' - /w14928 # illegal copy-initialization; more than one user-defined - # conversion has been implicitly applied - ) - - set( - CLANG_WARNINGS - -Wall - -Wextra # reasonable and standard - -Wshadow # warn the user if a variable declaration shadows one from a - # parent context - -Wnon-virtual-dtor # warn the user if a class with virtual functions has a - # non-virtual destructor. This helps catch hard to - # track down memory errors - -Wold-style-cast # warn for c-style casts - -Wcast-align # warn for potential performance problem casts - -Wunused # warn on anything being unused - -Woverloaded-virtual # warn if you overload (not override) a virtual - # function - -Wpedantic # warn if non-standard C++ is used - -Wconversion # warn on type conversions that may lose data - -Wsign-conversion # warn on sign conversions - -Wnull-dereference # warn if a null dereference is detected - -Wdouble-promotion # warn if float is implicit promoted to double - -Wformat=2 # warn on security issues around functions that format output - # (ie printf) - ) - - if(WARNINGS_AS_ERRORS) - set(CLANG_WARNINGS ${CLANG_WARNINGS} -Werror) - set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX) - endif() - - set( - GCC_WARNINGS - ${CLANG_WARNINGS} - -Wmisleading-indentation # warn if identation implies blocks where blocks - # do not exist - -Wduplicated-cond # warn if if / else chain has duplicated conditions - -Wduplicated-branches # warn if if / else branches have duplicated code - -Wlogical-op # warn about logical operations being used where bitwise were - # probably wanted - ) - - if(MSVC) - set(PROJECT_WARNINGS ${MSVC_WARNINGS}) - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(PROJECT_WARNINGS ${CLANG_WARNINGS}) - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(PROJECT_WARNINGS ${GCC_WARNINGS}) - endif() - - target_compile_options(${project_name} INTERFACE ${PROJECT_WARNINGS}) -endfunction() diff --git a/cmake-external/doctest.cmake b/cmake-external/doctest.cmake deleted file mode 100644 index 0b4c12f38..000000000 --- a/cmake-external/doctest.cmake +++ /dev/null @@ -1,179 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -doctest ------ - -This module defines a function to help use the doctest test framework. - -The :command:`doctest_discover_tests` discovers tests by asking the compiled test -executable to enumerate its tests. This does not require CMake to be re-run -when tests change. However, it may not work in a cross-compiling environment, -and setting test properties is less convenient. - -This command is intended to replace use of :command:`add_test` to register -tests, and will create a separate CTest test for each doctest test case. Note -that this is in some cases less efficient, as common set-up and tear-down logic -cannot be shared by multiple test cases executing in the same instance. -However, it provides more fine-grained pass/fail information to CTest, which is -usually considered as more beneficial. By default, the CTest test name is the -same as the doctest name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``. - -.. command:: doctest_discover_tests - - Automatically add tests with CTest by querying the compiled test executable - for available tests:: - - doctest_discover_tests(target - [TEST_SPEC arg1...] - [EXTRA_ARGS arg1...] - [WORKING_DIRECTORY dir] - [TEST_PREFIX prefix] - [TEST_SUFFIX suffix] - [PROPERTIES name1 value1...] - [TEST_LIST var] - ) - - ``doctest_discover_tests`` sets up a post-build command on the test executable - that generates the list of tests by parsing the output from running the test - with the ``--list-test-cases`` argument. This ensures that the full - list of tests is obtained. Since test discovery occurs at build time, it is - not necessary to re-run CMake when the list of tests changes. - However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set - in order to function in a cross-compiling environment. - - Additionally, setting properties on tests is somewhat less convenient, since - the tests are not available at CMake time. Additional test properties may be - assigned to the set of tests as a whole using the ``PROPERTIES`` option. If - more fine-grained test control is needed, custom content may be provided - through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES` - directory property. The set of discovered tests is made accessible to such a - script via the ``_TESTS`` variable. - - The options are: - - ``target`` - Specifies the doctest executable, which must be a known CMake executable - target. CMake will substitute the location of the built executable when - running the test. - - ``TEST_SPEC arg1...`` - Specifies test cases, wildcarded test cases, tags and tag expressions to - pass to the doctest executable with the ``--list-test-cases`` argument. - - ``EXTRA_ARGS arg1...`` - Any extra arguments to pass on the command line to each test case. - - ``WORKING_DIRECTORY dir`` - Specifies the directory in which to run the discovered test cases. If this - option is not provided, the current binary directory is used. - - ``TEST_PREFIX prefix`` - Specifies a ``prefix`` to be prepended to the name of each discovered test - case. This can be useful when the same test executable is being used in - multiple calls to ``doctest_discover_tests()`` but with different - ``TEST_SPEC`` or ``EXTRA_ARGS``. - - ``TEST_SUFFIX suffix`` - Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of - every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may - be specified. - - ``PROPERTIES name1 value1...`` - Specifies additional properties to be set on all tests discovered by this - invocation of ``doctest_discover_tests``. - - ``TEST_LIST var`` - Make the list of tests available in the variable ``var``, rather than the - default ``_TESTS``. This can be useful when the same test - executable is being used in multiple calls to ``doctest_discover_tests()``. - Note that this variable is only available in CTest. - -#]=======================================================================] - -# ------------------------------------------------------------------------------ -function(doctest_discover_tests TARGET) - cmake_parse_arguments( - "" - "" - "TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST" - "TEST_SPEC;EXTRA_ARGS;PROPERTIES" - ${ARGN} - ) - - if(NOT _WORKING_DIRECTORY) - set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - endif() - if(NOT _TEST_LIST) - set(_TEST_LIST ${TARGET}_TESTS) - endif() - - # Generate a unique name based on the extra arguments - string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS}") - string(SUBSTRING ${args_hash} 0 7 args_hash) - - # Define rule to generate test list for aforementioned test executable - set( - ctest_include_file - "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake" - ) - set( - ctest_tests_file - "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake" - ) - get_property( - crosscompiling_emulator - TARGET ${TARGET} - PROPERTY CROSSCOMPILING_EMULATOR - ) - add_custom_command( - TARGET ${TARGET} - POST_BUILD - BYPRODUCTS "${ctest_tests_file}" - COMMAND - "${CMAKE_COMMAND}" -D "TEST_TARGET=${TARGET}" -D - "TEST_EXECUTABLE=$" -D - "TEST_EXECUTOR=${crosscompiling_emulator}" -D - "TEST_WORKING_DIR=${_WORKING_DIRECTORY}" -D "TEST_SPEC=${_TEST_SPEC}" -D - "TEST_EXTRA_ARGS=${_EXTRA_ARGS}" -D "TEST_PROPERTIES=${_PROPERTIES}" -D - "TEST_PREFIX=${_TEST_PREFIX}" -D "TEST_SUFFIX=${_TEST_SUFFIX}" -D - "TEST_LIST=${_TEST_LIST}" -D "CTEST_FILE=${ctest_tests_file}" -P - "${_DOCTEST_DISCOVER_TESTS_SCRIPT}" - VERBATIM - ) - - file( - WRITE - "${ctest_include_file}" - "if(EXISTS \"${ctest_tests_file}\")\n" - " include(\"${ctest_tests_file}\")\n" - "else()\n" - " add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n" - "endif()\n" - ) - - if(NOT CMAKE_VERSION VERSION_LESS 3.10) - # Add discovered tests to directory TEST_INCLUDE_FILES - set_property( - DIRECTORY - APPEND - PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}" - ) - else() - # Add discovered tests as directory TEST_INCLUDE_FILE if possible - get_property(test_include_file_set DIRECTORY PROPERTY TEST_INCLUDE_FILE SET) - if(NOT ${test_include_file_set}) - set_property(DIRECTORY PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}") - else() - message(FATAL_ERROR "Cannot set more than one TEST_INCLUDE_FILE") - endif() - endif() -endfunction() - -# ############################################################################## - -set( - _DOCTEST_DISCOVER_TESTS_SCRIPT - ${CMAKE_CURRENT_LIST_DIR}/doctestAddTests.cmake -) diff --git a/cmake-external/doctestAddTests.cmake b/cmake-external/doctestAddTests.cmake deleted file mode 100644 index 689ec75de..000000000 --- a/cmake-external/doctestAddTests.cmake +++ /dev/null @@ -1,91 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -set(prefix "${TEST_PREFIX}") -set(suffix "${TEST_SUFFIX}") -set(spec ${TEST_SPEC}) -set(extra_args ${TEST_EXTRA_ARGS}) -set(properties ${TEST_PROPERTIES}) -set(script) -set(suite) -set(tests) - -function(add_command NAME) - set(_args "") - foreach(_arg ${ARGN}) - if(_arg MATCHES "[^-./:a-zA-Z0-9_]") - set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument - else() - set(_args "${_args} ${_arg}") - endif() - endforeach() - set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE) -endfunction() - -# Run test executable to get list of available tests -if(NOT EXISTS "${TEST_EXECUTABLE}") - message( - FATAL_ERROR - "Specified test executable '${TEST_EXECUTABLE}' does not exist" - ) -endif() - -if("${spec}" MATCHES .) - set(spec "--test-case=${spec}") -endif() - -execute_process( - COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-cases - OUTPUT_VARIABLE output - RESULT_VARIABLE result -) -if(NOT ${result} EQUAL 0) - message( - FATAL_ERROR - "Error running test executable '${TEST_EXECUTABLE}':\n" - " Result: ${result}\n" - " Output: ${output}\n" - ) -endif() - -string(REPLACE "\n" ";" output "${output}") - -# Parse output -foreach(line ${output}) - if( - "${line}" - STREQUAL - "===============================================================================" - OR "${line}" MATCHES [==[^\[doctest\] ]==] - ) - continue() - endif() - set(test ${line}) - # use escape commas to handle properly test cases with commas inside the name - string(REPLACE "," "\\," test_name ${test}) - # ...and add to script - add_command( - add_test - "${prefix}${test}${suffix}" - ${TEST_EXECUTOR} - "${TEST_EXECUTABLE}" - "--test-case=${test_name}" - ${extra_args} - ) - add_command( - set_tests_properties - "${prefix}${test}${suffix}" - PROPERTIES - WORKING_DIRECTORY - "${TEST_WORKING_DIR}" - ${properties} - ) - list(APPEND tests "${prefix}${test}${suffix}") -endforeach() - -# Create a list of all discovered tests, which users may use to e.g. set -# properties on the tests -add_command(set ${TEST_LIST} ${tests}) - -# Write CTest script -file(WRITE "${CTEST_FILE}" "${script}") diff --git a/cmake-external/extra_local_settings.cmake b/cmake-external/extra_local_settings.cmake deleted file mode 100644 index 7e1687e4f..000000000 --- a/cmake-external/extra_local_settings.cmake +++ /dev/null @@ -1,58 +0,0 @@ -option( - ENABLE_IPO - "Enable Iterprocedural Optimization, aka Link Time Optimization (LTO)" - OFF -) -option(ARCH_NATIVE "Build with -march=native" OFF) -option(USE_LIBCXX "Use the libc++ STL" OFF) - -option( - ENABLE_BUILD_WITH_TIME_TRACE - "Enable -ftime-trace to generate time tracing .json files on clang" - OFF -) -if(ENABLE_BUILD_WITH_TIME_TRACE AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") - add_compile_options("-ftime-trace") -endif() - -if(USE_LLD) - add_link_options("-fuse-ld=lld") -elseif(USE_GOLD) - add_link_options("-fuse-ld=gold") -endif() - -if(USE_LIBCXX) - if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") - add_compile_options("-stdlib=libc++") - add_link_options("-stdlib=libc++ -lc++abi") - else() - message(SEND_ERROR "libc++ only available with clang") - endif() -endif() - -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message(STATUS "Setting build type to 'Debug' as none was specified.") - set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) - set_property( - CACHE CMAKE_BUILD_TYPE - PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" - ) -endif() - -if(ENABLE_IPO) - include(CheckIPOSupported) - check_ipo_supported(RESULT result OUTPUT output) - if(result) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - else() - message(SEND_ERROR "IPO is not supported: ${output}") - endif() -endif() - -include(CheckCXXCompilerFlag) -if(ARCH_NATIVE) - check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE) - if(COMPILER_SUPPORTS_MARCH_NATIVE) - add_compile_options("-march=native") - endif() -endif() diff --git a/cmake-external/sanitizers.cmake b/cmake-external/sanitizers.cmake deleted file mode 100644 index 7c54c8eb4..000000000 --- a/cmake-external/sanitizers.cmake +++ /dev/null @@ -1,76 +0,0 @@ -function(enable_sanitizers project_name) - if( - CMAKE_CXX_COMPILER_ID STREQUAL "GNU" - OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" - ) - option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE) - - if(ENABLE_COVERAGE) - target_compile_options(${project_name} INTERFACE --coverage -O0 -g) - target_link_libraries(${project_name} INTERFACE --coverage) - endif() - - set(SANITIZERS "") - - option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" OFF) - if(ENABLE_SANITIZER_ADDRESS) - list(APPEND SANITIZERS "address") - target_compile_options( - ${project_name} - INTERFACE -fsanitize-address-use-after-scope - ) - target_link_libraries( - ${project_name} - INTERFACE -fsanitize-address-use-after-scope - ) - endif() - - option(ENABLE_SANITIZER_MEMORY "Enable memory sanitizer" OFF) - if(ENABLE_SANITIZER_MEMORY) - list(APPEND SANITIZERS "memory") - target_compile_options( - ${project_name} - INTERFACE -fsanitize-memory-track-origins=2 - ) - target_link_libraries( - ${project_name} - INTERFACE -fsanitize-memory-track-origins=2 - ) - endif() - - option( - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR - "Enable undefined behavior sanitizer" - OFF - ) - if(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR) - list(APPEND SANITIZERS "undefined") - endif() - - option(ENABLE_SANITIZER_THREAD "Enable thread sanitizer" OFF) - if(ENABLE_SANITIZER_THREAD) - list(APPEND SANITIZERS "thread") - endif() - - list(JOIN SANITIZERS "," LIST_OF_SANITIZERS) - endif() - - if(LIST_OF_SANITIZERS) - if(NOT "${LIST_OF_SANITIZERS}" STREQUAL "") - target_compile_options( - ${project_name} - INTERFACE - -fsanitize=${LIST_OF_SANITIZERS} - -fno-omit-frame-pointer - -fno-optimize-sibling-calls - ) - target_link_libraries( - ${project_name} - INTERFACE - -fsanitize=${LIST_OF_SANITIZERS} - -fno-omit-frame-pointer - -fno-optimize-sibling-calls - ) - endif() - endif() -endfunction() diff --git a/cmake-external/static_analyzers.cmake b/cmake-external/static_analyzers.cmake deleted file mode 100644 index 255478f11..000000000 --- a/cmake-external/static_analyzers.cmake +++ /dev/null @@ -1,33 +0,0 @@ -option(ENABLE_CPPCHECK "Enable static analysis with cppcheck" OFF) -option(ENABLE_CLANG_TIDY "Enable static analysis with clang-tidy" OFF) -if(ENABLE_CPPCHECK) - find_program(CPPCHECK cppcheck) - if(CPPCHECK) - set( - CMAKE_CXX_CPPCHECK - ${CPPCHECK} - --suppress=missingInclude - --enable=all - --inconclusive - -i - ${CMAKE_SOURCE_DIR}/imgui/lib - ) - else() - message(SEND_ERROR "cppcheck requested but executable not found") - endif() -endif() - -if(ENABLE_CLANG_TIDY AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - find_program(CLANGTIDY clang-tidy) - find_program(UNBUFFER unbuffer) - if(CLANGTIDY) - if(UNBUFFER) - set(CMAKE_CXX_CLANG_TIDY unbuffer ${CLANGTIDY}) - else() - message(WARNING "unbuffer not found") - set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY}) - endif() - else() - message(SEND_ERROR "clang-tidy requested but executable not found") - endif() -endif() diff --git a/cmake-module b/cmake-module deleted file mode 160000 index 307951909..000000000 --- a/cmake-module +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 30795190916d0297092e37bc1f7b50f5d76fc09c diff --git a/cmake/get-jrl-cmakemodules.cmake b/cmake/get-jrl-cmakemodules.cmake new file mode 100644 index 000000000..61db6b6d4 --- /dev/null +++ b/cmake/get-jrl-cmakemodules.cmake @@ -0,0 +1,50 @@ +# Get jrl-cmakemodules package + +# Upstream (https://github.com/jrl-umi3218/jrl-cmakemodules), the new v2 version is located in a subfolder, +# We need to set this variable to bypass the v1 and load the v2. +set( + JRL_CMAKEMODULES_USE_V2 + ON + CACHE BOOL + "Use jrl-cmakemodules v2 on https://github.com/jrl-umi3218/jrl-cmakemodules" +) + +# Option 1: pass -DJRL_CMAKEMODULES_SOURCE_DIR=... to cmake command line +if(JRL_CMAKEMODULES_SOURCE_DIR) + message( + DEBUG + "JRL_CMAKEMODULES_SOURCE_DIR variable set, adding jrl-cmakemodules from source directory: ${JRL_CMAKEMODULES_SOURCE_DIR}" + ) + add_subdirectory(${JRL_CMAKEMODULES_SOURCE_DIR} jrl-cmakemodules) + return() +endif() + +# Option 2: use JRL_CMAKEMODULES_SOURCE_DIR environment variable (pixi might unset it, prefer option 1) +if(ENV{JRL_CMAKEMODULES_SOURCE_DIR}) + message( + DEBUG + "JRL_CMAKEMODULES_SOURCE_DIR environement variable set, adding jrl-cmakemodules from source directory: ${JRL_CMAKEMODULES_SOURCE_DIR}" + ) + add_subdirectory(${JRL_CMAKEMODULES_SOURCE_DIR} jrl-cmakemodules) + return() +endif() + +# Try to look for the installed package +message(DEBUG "Looking for jrl-cmakemodules package...") +find_package(jrl-cmakemodules 2.0.0 CONFIG QUIET) + +# If we have the package, we are done. +if(jrl-cmakemodules_FOUND) + message(DEBUG "Found jrl-cmakemodules package.") + return() +endif() + +# Fallback to FetchContent if not found +message(DEBUG "Fetching jrl-cmakemodules using FetchContent...") +include(FetchContent) +FetchContent_Declare( + jrl-cmakemodules + GIT_REPOSITORY https://github.com/ahoarau/jrl-cmakemodules + GIT_TAG jrl-next +) +FetchContent_MakeAvailable(jrl-cmakemodules) diff --git a/doc/2-ProxQP_api.md b/doc/2-ProxQP_api.md index fedebac47..db6bb1a44 100644 --- a/doc/2-ProxQP_api.md +++ b/doc/2-ProxQP_api.md @@ -683,11 +683,11 @@ It is important to notice that some other solvers API have made different choice \subsection OverviewArchitectureOptions Architecture options when compiling ProxSuite -We highly encourage you to enable the vectorization of the underlying linear algebra for the best performance. You just need to activate the cmake option `BUILD_WITH_SIMD_SUPPORT=ON`, like: +We highly encourage you to enable the vectorization of the underlying linear algebra for the best performance. You just need to activate the cmake option `BUILD_WITH_VECTORIZATION_SUPPORT=ON`, like: \code mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_SIMD_SUPPORT=ON +cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_VECTORIZATION_SUPPORT=ON make make install \endcode diff --git a/doc/5-installation.md b/doc/5-installation.md index 67dc810af..48b22067c 100644 --- a/doc/5-installation.md +++ b/doc/5-installation.md @@ -15,16 +15,15 @@ The following dependencies are required at compile time: 1. Clone this repository with: ```bash -git clone https://github.com/Simple-Robotics/proxsuite.git --recursive +git clone https://github.com/Simple-Robotics/proxsuite.git ``` 2. Create a build tree using CMake, build and install: ```bash -mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -make -make install +cmake -S proxsuite -B proxsuite-build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF +cmake --build proxsuite-build +cmake --install proxsuite-build --prefix proxsuite-install ``` Note: if you are building Proxsuite within a conda environment, consider passing `-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX`. @@ -34,10 +33,9 @@ Note: if you are building Proxsuite within a conda environment, consider passing You just need to ensure that Python3 is indeed present on your system and activate the cmake option `BUILD_PYTHON_INTERFACE=ON` by replacing: ```bash -mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_PYTHON_INTERFACE=ON -make -make install +cmake -S proxsuite -B proxsuite-build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_PYTHON_INTERFACE=ON +cmake --build proxsuite-build +cmake --install proxsuite-build --prefix proxsuite-install ``` 4. Generate the doc @@ -57,10 +55,9 @@ Yet, some CPU architectures may not support such operations. You just need to deactivate the cmake option `BUILD_WITH_VECTORIZATION_SUPPORT=OFF`, like: ```bash -mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_VECTORIZATION_SUPPORT=OFF -make -make install +cmake -S proxsuite -B proxsuite-build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_VECTORIZATION_SUPPORT=OFF +cmake --build proxsuite-build +cmake --install proxsuite-build --prefix proxsuite-install ``` #### Testing diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..c31acb0e9 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,70 @@ +# Set Doxygen module options +set(DOXYGEN_GENERATE_HTML YES) +set(DOXYGEN_GENERATE_LATEX NO) +set(DOXYGEN_QUIET YES) +set(DOXYGEN_WARN_IF_UNDOCUMENTED NO) +set(DOXYGEN_WARN_NO_PARAMDOC NO) +set(DOXYGEN_USE_MATHJAX YES) + +# Set Doxygen options +set( + DOXYGEN_FILE_PATTERNS + *.cc + *.cpp + *.h + *.hpp + *.dox + *.md + *.py +) +set(DOXYGEN_RECURSIVE YES) +set(DOXYGEN_SORT_MEMBER_DOCS NO) +set(DOXYGEN_SORT_BRIEF_DOCS NO) +set(DOXYGEN_SORT_MEMBERS_CTORS_1ST YES) +set(DOXYGEN_GENERATE_TESTLIST YES) +set(DOXYGEN_EXTRACT_STATIC YES) +set(DOXYGEN_EXTRACT_PRIV_VIRTUAL YES) +set(DOXYGEN_ENABLE_PREPROCESSING YES) +set(DOXYGEN_MACRO_EXPANSION YES) +set(DOXYGEN_EXPAND_ONLY_PREDEF YES) +set(DOXYGEN_PREDEFINED "EIGEN_MAKE_ALIGNED_OPERATOR_NEW") +set(DOXYGEN_FULL_PATH_NAMES YES) +set(DOXYGEN_EXCLUDE_SYMBOLS "*::internal, internal::*, *::internal::*") +set(DOXYGEN_EXCLUDE_PATTERNS "*.hxx") +set(DOXYGEN_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/include) +set(DOXYGEN_EXCLUDE_SYMLINKS YES) +set(DOXYGEN_EXAMPLE_PATH ${PROJECT_SOURCE_DIR}/examples) +set(DOXYGEN_EXTRA_PACKAGES "{bm,stmaryrd}") +set(DOXYGEN_FORMULA_MACROFILE ${PROJECT_SOURCE_DIR}/doc/macros.inc) +set(DOXYGEN_GENERATE_TREEVIEW YES) +set(DOXYGEN_VERBATIM_HEADERS YES) +set(DOXYGEN_HTML_HEADER ${PROJECT_SOURCE_DIR}/doc/header.html) +set(DOXYGEN_HTML_EXTRA_STYLESHEET ${PROJECT_SOURCE_DIR}/doc/doxygen-awesome.css) +set(DOXYGEN_HTML_EXTRA_FILES ${PROJECT_SOURCE_DIR}/doc/doxygen-awesome-darkmode-toggle.js) +set(DOXYGEN_TAGFILES "") +set(DOXYGEN_SHOW_FILES YES) +set(DOXYGEN_SHOW_NAMESPACES YES) +set(DOXYGEN_MATHJAX_FORMAT SVG) +set(DOXYGEN_SOURCE_BROWSER YES) +set(DOXYGEN_ALPHABETICAL_INDEX YES) +set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${PROJECT_SOURCE_DIR}/doc/1-Overview.md) +set(DOXYGEN_BUILTIN_STL_SUPPORT YES) +set(DOXYGEN_HAVE_DOT YES) +set(DOXYGEN_DOT_IMAGE_FORMAT SVG) +set(DOXYGEN_DOT_TRANSPARENT YES) + +# Configure Doxygen +doxygen_add_docs( + doc + ${PROJECT_SOURCE_DIR}/doc + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/bindings/python/proxsuite + COMMENT "Generating API documentation with Doxygen" +) + +if(INSTALL_DOCUMENTATION) + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/proxsuite + ) +endif() diff --git a/doc/Doxyfile.extra.in b/doc/Doxyfile.extra.in deleted file mode 100644 index 45700ce9b..000000000 --- a/doc/Doxyfile.extra.in +++ /dev/null @@ -1,63 +0,0 @@ -INPUT = @PROJECT_SOURCE_DIR@/doc \ - @PROJECT_SOURCE_DIR@/include \ - @PROJECT_SOURCE_DIR@/bindings/python/proxsuite \ - -RECURSIVE = YES - -FILE_PATTERNS = *.cc *.cpp *.h *.hpp *.dox *.md *.py - -# Document members in declaration order -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_MEMBERS_CTORS_1ST = YES - -GENERATE_TESTLIST = YES -EXTRACT_STATIC = YES - -EXTRACT_PRIV_VIRTUAL = YES -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES -PREDEFINED += EIGEN_MAKE_ALIGNED_OPERATOR_NEW \ - -FULL_PATH_NAMES = YES -EXCLUDE_SYMBOLS = *::internal, internal::*, *::internal::* -# Do not show source files -EXCLUDE_PATTERNS = *.hxx - -INCLUDE_PATH = @PROJECT_SOURCE_DIR@/include - -EXCLUDE_SYMLINKS = YES - -EXAMPLE_PATH = @PROJECT_SOURCE_DIR@/examples - -EXTRA_PACKAGES = {bm,stmaryrd} -FORMULA_MACROFILE = @PROJECT_SOURCE_DIR@/doc/macros.inc - -GENERATE_TREEVIEW = YES - -VERBATIM_HEADERS = YES - - -HTML_HEADER = @PROJECT_SOURCE_DIR@/doc/header.html -HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/doc/doxygen-awesome.css -HTML_EXTRA_FILES = @PROJECT_SOURCE_DIR@/doc/doxygen-awesome-darkmode-toggle.js - - -TAGFILES = - -SHOW_FILES = YES -SHOW_NAMESPACES = YES - -MATHJAX_FORMAT = SVG - -SOURCE_BROWSER = YES - -ALPHABETICAL_INDEX = YES - -USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/doc/1-Overview.md - -BUILTIN_STL_SUPPORT = YES -HAVE_DOT = YES -DOT_IMAGE_FORMAT = SVG -DOT_TRANSPARENT = YES diff --git a/doc/images/proxsuite-logo-transparent.png b/doc/images/proxsuite-logo-transparent.png new file mode 100644 index 000000000..51835c07a Binary files /dev/null and b/doc/images/proxsuite-logo-transparent.png differ diff --git a/doc/images/proxsuite-logo.png b/doc/images/proxsuite-logo.png index 51835c07a..ed1b44988 100644 Binary files a/doc/images/proxsuite-logo.png and b/doc/images/proxsuite-logo.png differ diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 6208b183a..bc2b1fb2a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -2,17 +2,8 @@ add_subdirectory(cpp) if(BUILD_PYTHON_INTERFACE) add_subdirectory(python) -endif(BUILD_PYTHON_INTERFACE) +endif() if(TEST_JULIA_INTERFACE) - find_package(Julia REQUIRED) - - JULIA_CHECK_PACKAGE(PyCall) - if(NOT Julia_PyCall_found) - message( - FATAL_ERROR - "PyCall not installed. Please use import Pkg; Pkg.add(\"PyCall\")" - ) - endif() add_subdirectory(julia) endif() diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 6ae1bd686..65e1279ee 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -1,20 +1,35 @@ -# -# Copyright (c) 2022 INRIA -# +add_custom_target(proxsuite-examples-cpp) -add_custom_target(${PROJECT_NAME}-example-cpp) +function(proxsuite_add_example name) + add_executable(proxsuite-example-${name} ${name}.cpp) + target_link_libraries(proxsuite-example-${name} PRIVATE proxsuite) + add_dependencies(proxsuite-examples-cpp proxsuite-example-${name}) +endfunction() -function(ADD_PROXSUITE_CPP_EXAMPLE EXAMPLE) - get_filename_component(EXAMPLE_NAME ${EXAMPLE} NAME_WE) - set(EXAMPLE_TARGET "${PROJECT_NAME}-example-cpp-${EXAMPLE_NAME}") - ADD_UNIT_TEST(${EXAMPLE_TARGET} "${EXAMPLE}") - target_link_libraries(${EXAMPLE_TARGET} PRIVATE proxsuite-test-util) +proxsuite_add_example(estimate_nonconvex_eigenvalue) +proxsuite_add_example(first_example_dense) +proxsuite_add_example(first_example_sparse) +proxsuite_add_example(init_dense_qp_with_box) - add_dependencies(${PROJECT_NAME}-example-cpp ${EXAMPLE_TARGET}) -endfunction() +proxsuite_add_example(init_dense_qp_with_other_options) +proxsuite_add_example(init_dense_qp_with_timings) +proxsuite_add_example(init_dense_qp) +proxsuite_add_example(init_with_default_options) + +proxsuite_add_example(initializing_with_none_without_api) +proxsuite_add_example(initializing_with_none) + +proxsuite_add_example(loading_dense_qp_with_box_ineq) +proxsuite_add_example(loading_dense_qp_with_different_backend_choice) +proxsuite_add_example(loading_dense_qp) +proxsuite_add_example(loading_sparse_qp) -file(GLOB_RECURSE ${PROJECT_NAME}_CPP_EXAMPLES *.cpp) +proxsuite_add_example(overview-simple) +proxsuite_add_example(solve_dense_qp_with_setting) +proxsuite_add_example(solve_dense_qp) +proxsuite_add_example(solve_without_api_and_option) +proxsuite_add_example(solve_without_api) -foreach(EXAMPLE ${${PROJECT_NAME}_CPP_EXAMPLES}) - add_proxsuite_cpp_example(${EXAMPLE}) -endforeach() +proxsuite_add_example(update_dense_qp_ws_previous_result) +proxsuite_add_example(update_dense_qp) +proxsuite_add_example(update_sparse_qp) diff --git a/examples/julia/CMakeLists.txt b/examples/julia/CMakeLists.txt index 051eb61a4..ba186b859 100644 --- a/examples/julia/CMakeLists.txt +++ b/examples/julia/CMakeLists.txt @@ -1,15 +1,15 @@ -file(GLOB_RECURSE ${PROJECT_NAME}_JULIA_EXAMPLES *.jl) +find_program(Julia_EXECUTABLE julia REQUIRED) +message(STATUS "Found Julia executable: ${Julia_EXECUTABLE}") -foreach(EXAMPLE ${${PROJECT_NAME}_JULIA_EXAMPLES}) - string( - REGEX REPLACE - "${PROJECT_SOURCE_DIR}/examples/julia/" - "" - EXAMPLE - ${EXAMPLE} - ) - ADD_JULIA_UNIT_TEST( - "${PROJECT_NAME}-example-jl-${EXAMPLE}" - "examples/julia/${EXAMPLE}" - ) -endforeach() +add_test( + NAME proxsuite-example-jl-overview-simple + COMMAND ${Julia_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/overview-simple.jl +) +set_tests_properties( + proxsuite-example-jl-overview-simple + PROPERTIES + ENVIRONMENT PYTHON=$ + ENVIRONMENT PYTHONPATH=$/.. + LABELS julia + DEPENDS proxsuite_pywrap +) diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index 31f46b63d..f4f349ea4 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -1,11 +1,33 @@ -file(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_EXAMPLES *.py) +add_custom_target(proxsuite-examples-python) -foreach(EXAMPLE_FILE ${${PROJECT_NAME}_PYTHON_EXAMPLES}) - get_filename_component(EXAMPLE_NAME ${EXAMPLE_FILE} NAME_WE) - string(REGEX REPLACE "${PROJECT_SOURCE_DIR}" "" EXAMPLE_FILE ${EXAMPLE_FILE}) - ADD_PYTHON_UNIT_TEST( - "${PROJECT_NAME}-example-py-${EXAMPLE_NAME}" - "${EXAMPLE_FILE}" - "bindings/python" +function(proxsuite_add_python_example name) + add_custom_target( + proxsuite-example-py-${name} + COMMAND $ ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py + DEPENDS proxsuite_pywrap ) -endforeach() + add_dependencies(proxsuite-examples-python proxsuite-example-py-${name}) +endfunction() + +proxsuite_add_python_example(estimate_nonconvex_eigenvalue) +proxsuite_add_python_example(init_dense_qp_with_box) +proxsuite_add_python_example(init_dense_qp_with_other_options) +proxsuite_add_python_example(init_dense_qp_with_timings) +proxsuite_add_python_example(init_dense_qp) +proxsuite_add_python_example(init_with_default_options) +proxsuite_add_python_example(initializing_with_none_without_api) +proxsuite_add_python_example(initializing_with_none) +proxsuite_add_python_example(loading_dense_qp_with_box_ineq) +proxsuite_add_python_example(loading_dense_qp_with_different_backend_choice) +proxsuite_add_python_example(loading_dense_qp) +proxsuite_add_python_example(loading_sparse_qp) +proxsuite_add_python_example(overview-simple) +proxsuite_add_python_example(qplayer_sudoku) +proxsuite_add_python_example(solve_dense_lp) +proxsuite_add_python_example(solve_dense_qp_with_setting) +proxsuite_add_python_example(solve_dense_qp) +proxsuite_add_python_example(solve_without_api_and_option) +proxsuite_add_python_example(solve_without_api) +proxsuite_add_python_example(update_dense_qp_ws_previous_result) +proxsuite_add_python_example(update_dense_qp) +proxsuite_add_python_example(update_sparse_qp) diff --git a/external/cereal b/external/cereal deleted file mode 160000 index ddd467244..000000000 --- a/external/cereal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ddd467244713ea4fe63733628992efcdd6a9187d diff --git a/include/proxsuite/helpers/tl-optional.hpp b/include/proxsuite/helpers/tl-optional.hpp deleted file mode 100644 index 65859cbb7..000000000 --- a/include/proxsuite/helpers/tl-optional.hpp +++ /dev/null @@ -1,2471 +0,0 @@ - -/// -// optional - An implementation of std::optional with extensions -// Written in 2017 by Sy Brand (tartanllama@gmail.com, @TartanLlama) -// -// Documentation available at https://tl.tartanllama.xyz/ -// -// To the extent possible under law, the author(s) have dedicated all -// copyright and related and neighboring rights to this software to the -// public domain worldwide. This software is distributed without any warranty. -// -// You should have received a copy of the CC0 Public Domain Dedication -// along with this software. If not, see -// . -/// - -#ifndef TL_OPTIONAL_HPP -#define TL_OPTIONAL_HPP - -#define TL_OPTIONAL_VERSION_MAJOR 1 -#define TL_OPTIONAL_VERSION_MINOR 1 -#define TL_OPTIONAL_VERSION_PATCH 0 - -#include -#include -#include -#include -#include - -#if (defined(_MSC_VER) && _MSC_VER == 1900) -#define TL_OPTIONAL_MSVC2015 -#endif - -#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \ - !defined(__clang__)) -#define TL_OPTIONAL_GCC49 -#endif - -#if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 4 && \ - !defined(__clang__)) -#define TL_OPTIONAL_GCC54 -#endif - -#if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \ - !defined(__clang__)) -#define TL_OPTIONAL_GCC55 -#endif - -#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \ - !defined(__clang__)) -// GCC < 5 doesn't support overloading on const&& for member functions -#define TL_OPTIONAL_NO_CONSTRR - -// GCC < 5 doesn't support some standard C++11 type traits -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ - std::has_trivial_copy_constructor::value -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ - std::has_trivial_copy_assign::value - -// This one will be different for GCC 5.7 if it's ever supported -#define TL_OPTIONAL_IS_TRIVIALLY_DESTRUCTIBLE(T) \ - std::is_trivially_destructible::value - -// GCC 5 < v < 8 has a bug in is_trivially_copy_constructible which breaks -// std::vector for non-copyable types -#elif (defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__)) -#ifndef TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX -#define TL_GCC_LESS_8_TRIVIALLY_COPY_CONSTRUCTIBLE_MUTEX -namespace tl { -namespace detail { -template -struct is_trivially_copy_constructible : std::is_trivially_copy_constructible -{}; -#ifdef _GLIBCXX_VECTOR -template -struct is_trivially_copy_constructible> - : std::is_trivially_copy_constructible -{}; -#endif -} -} -#endif - -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ - tl::detail::is_trivially_copy_constructible::value -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ - std::is_trivially_copy_assignable::value -#define TL_OPTIONAL_IS_TRIVIALLY_DESTRUCTIBLE(T) \ - std::is_trivially_destructible::value -#else -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) \ - std::is_trivially_copy_constructible::value -#define TL_OPTIONAL_IS_TRIVIALLY_COPY_ASSIGNABLE(T) \ - std::is_trivially_copy_assignable::value -#define TL_OPTIONAL_IS_TRIVIALLY_DESTRUCTIBLE(T) \ - std::is_trivially_destructible::value -#endif - -#if __cplusplus > 201103L -#define TL_OPTIONAL_CXX14 -#endif - -// constexpr implies const in C++11, not C++14 -#if (__cplusplus == 201103L || defined(TL_OPTIONAL_MSVC2015) || \ - defined(TL_OPTIONAL_GCC49)) -#define TL_OPTIONAL_11_CONSTEXPR -#else -#define TL_OPTIONAL_11_CONSTEXPR constexpr -#endif - -namespace tl { -#ifndef TL_MONOSTATE_INPLACE_MUTEX -#define TL_MONOSTATE_INPLACE_MUTEX -/// Used to represent an optional with no data; essentially a bool -class monostate -{}; - -/// A tag type to tell optional to construct its value in-place -struct in_place_t -{ - explicit in_place_t() = default; -}; -/// A tag to tell optional to construct its value in-place -static constexpr in_place_t in_place{}; -#endif - -template -class optional; - -namespace detail { -#ifndef TL_TRAITS_MUTEX -#define TL_TRAITS_MUTEX -// C++14-style aliases for brevity -template -using remove_const_t = typename std::remove_const::type; -template -using remove_reference_t = typename std::remove_reference::type; -template -using decay_t = typename std::decay::type; -template -using enable_if_t = typename std::enable_if::type; -template -using conditional_t = typename std::conditional::type; - -// std::conjunction from C++17 -template -struct conjunction : std::true_type -{}; -template -struct conjunction : B -{}; -template -struct conjunction - : std::conditional, B>::type -{}; - -#if defined(_LIBCPP_VERSION) && __cplusplus == 201103L -#define TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND -#endif - -// In C++11 mode, there's an issue in libc++'s std::mem_fn -// which results in a hard-error when using it in a noexcept expression -// in some cases. This is a check to workaround the common failing case. -#ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND -template -struct is_pointer_to_non_const_member_func : std::false_type -{}; -template -struct is_pointer_to_non_const_member_func : std::true_type -{}; -template -struct is_pointer_to_non_const_member_func - : std::true_type -{}; -template -struct is_pointer_to_non_const_member_func - : std::true_type -{}; -template -struct is_pointer_to_non_const_member_func - : std::true_type -{}; -template -struct is_pointer_to_non_const_member_func - : std::true_type -{}; -template -struct is_pointer_to_non_const_member_func - : std::true_type -{}; - -template -struct is_const_or_const_ref : std::false_type -{}; -template -struct is_const_or_const_ref : std::true_type -{}; -template -struct is_const_or_const_ref : std::true_type -{}; -#endif - -// std::invoke from C++17 -// https://stackoverflow.com/questions/38288042/c11-14-invoke-workaround -template< - typename Fn, - typename... Args, -#ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND - typename = enable_if_t::value && - is_const_or_const_ref::value)>, -#endif - typename = enable_if_t>::value>, - int = 0> -constexpr auto -invoke(Fn&& f, Args&&... args) noexcept( - noexcept(std::mem_fn(f)(std::forward(args)...))) - -> decltype(std::mem_fn(f)(std::forward(args)...)) -{ - return std::mem_fn(f)(std::forward(args)...); -} - -template>::value>> -constexpr auto -invoke(Fn&& f, Args&&... args) noexcept( - noexcept(std::forward(f)(std::forward(args)...))) - -> decltype(std::forward(f)(std::forward(args)...)) -{ - return std::forward(f)(std::forward(args)...); -} - -// std::invoke_result from C++17 -template -struct invoke_result_impl; - -template -struct invoke_result_impl< - F, - decltype(detail::invoke(std::declval(), std::declval()...), void()), - Us...> -{ - using type = - decltype(detail::invoke(std::declval(), std::declval()...)); -}; - -template -using invoke_result = invoke_result_impl; - -template -using invoke_result_t = typename invoke_result::type; - -#if defined(_MSC_VER) && _MSC_VER <= 1900 -// TODO make a version which works with MSVC 2015 -template -struct is_swappable : std::true_type -{}; - -template -struct is_nothrow_swappable : std::true_type -{}; -#else -// https://stackoverflow.com/questions/26744589/what-is-a-proper-way-to-implement-is-swappable-to-test-for-the-swappable-concept -namespace swap_adl_tests { -// if swap ADL finds this then it would call std::swap otherwise (same -// signature) -struct tag -{}; - -template -tag -swap(T&, T&); -template -tag swap(T (&a)[N], T (&b)[N]); - -// helper functions to test if an unqualified swap is possible, and if it -// becomes std::swap -template -std::false_type -can_swap(...) noexcept(false); -template(), std::declval()))> -std::true_type -can_swap(int) noexcept(noexcept(swap(std::declval(), std::declval()))); - -template -std::false_type -uses_std(...); -template -std::is_same(), std::declval())), tag> -uses_std(int); - -template -struct is_std_swap_noexcept - : std::integral_constant::value && - std::is_nothrow_move_assignable::value> -{}; - -template -struct is_std_swap_noexcept : is_std_swap_noexcept -{}; - -template -struct is_adl_swap_noexcept - : std::integral_constant(0))> -{}; -} // namespace swap_adl_tests - -template -struct is_swappable - : std::integral_constant< - bool, - decltype(detail::swap_adl_tests::can_swap(0))::value && - (!decltype(detail::swap_adl_tests::uses_std(0))::value || - (std::is_move_assignable::value && - std::is_move_constructible::value))> -{}; - -template -struct is_swappable - : std::integral_constant< - bool, - decltype(detail::swap_adl_tests::can_swap(0))::value && - (!decltype(detail::swap_adl_tests::uses_std(0))::value || - is_swappable::value)> -{}; - -template -struct is_nothrow_swappable - : std::integral_constant< - bool, - is_swappable::value && - ((decltype(detail::swap_adl_tests::uses_std(0))::value && - detail::swap_adl_tests::is_std_swap_noexcept::value) || - (!decltype(detail::swap_adl_tests::uses_std(0))::value && - detail::swap_adl_tests::is_adl_swap_noexcept::value))> -{}; -#endif -#endif - -// std::void_t from C++17 -template -struct voider -{ - using type = void; -}; -template -using void_t = typename voider::type; - -// Trait for checking if a type is a tl::optional -template -struct is_optional_impl : std::false_type -{}; -template -struct is_optional_impl> : std::true_type -{}; -template -using is_optional = is_optional_impl>; - -// Change void to tl::monostate -template -using fixup_void = conditional_t::value, monostate, U>; - -template> -using get_map_return = optional>>; - -// Check if invoking F for some Us returns void -template -struct returns_void_impl; -template -struct returns_void_impl>, U...> - : std::is_void> -{}; -template -using returns_void = returns_void_impl; - -template -using enable_if_ret_void = enable_if_t::value>; - -template -using disable_if_ret_void = enable_if_t::value>; - -template -using enable_forward_value = - detail::enable_if_t::value && - !std::is_same, in_place_t>::value && - !std::is_same, detail::decay_t>::value>; - -template -using enable_from_other = - detail::enable_if_t::value && - !std::is_constructible&>::value && - !std::is_constructible&&>::value && - !std::is_constructible&>::value && - !std::is_constructible&&>::value && - !std::is_convertible&, T>::value && - !std::is_convertible&&, T>::value && - !std::is_convertible&, T>::value && - !std::is_convertible&&, T>::value>; - -template -using enable_assign_forward = detail::enable_if_t< - !std::is_same, detail::decay_t>::value && - !detail::conjunction, - std::is_same>>::value && - std::is_constructible::value && std::is_assignable::value>; - -template -using enable_assign_from_other = - detail::enable_if_t::value && - std::is_assignable::value && - !std::is_constructible&>::value && - !std::is_constructible&&>::value && - !std::is_constructible&>::value && - !std::is_constructible&&>::value && - !std::is_convertible&, T>::value && - !std::is_convertible&&, T>::value && - !std::is_convertible&, T>::value && - !std::is_convertible&&, T>::value && - !std::is_assignable&>::value && - !std::is_assignable&&>::value && - !std::is_assignable&>::value && - !std::is_assignable&&>::value>; - -// The storage base manages the actual storage, and correctly propagates -// trivial destruction from T. This case is for when T is not trivially -// destructible. -template::value> -struct optional_storage_base -{ - TL_OPTIONAL_11_CONSTEXPR optional_storage_base() noexcept - : m_dummy() - , m_has_value(false) - { - } - - template - TL_OPTIONAL_11_CONSTEXPR optional_storage_base(in_place_t, U&&... u) - : m_value(std::forward(u)...) - , m_has_value(true) - { - } - - ~optional_storage_base() - { - if (m_has_value) { - m_value.~T(); - m_has_value = false; - } - } - - struct dummy - {}; - union - { - dummy m_dummy; - T m_value; - }; - - bool m_has_value; -}; - -// This case is for when T is trivially destructible. -template -struct optional_storage_base -{ - TL_OPTIONAL_11_CONSTEXPR optional_storage_base() noexcept - : m_dummy() - , m_has_value(false) - { - } - - template - TL_OPTIONAL_11_CONSTEXPR optional_storage_base(in_place_t, U&&... u) - : m_value(std::forward(u)...) - , m_has_value(true) - { - } - - // No destructor, so this class is trivially destructible - - struct dummy - {}; - union - { - dummy m_dummy; - T m_value; - }; - - bool m_has_value = false; -}; - -// This base class provides some handy member functions which can be used in -// further derived classes -template -struct optional_operations_base : optional_storage_base -{ - using optional_storage_base::optional_storage_base; - - void hard_reset() noexcept - { - get().~T(); - this->m_has_value = false; - } - - template - void construct(Args&&... args) - { - new (std::addressof(this->m_value)) T(std::forward(args)...); - this->m_has_value = true; - } - - template - void assign(Opt&& rhs) - { - if (this->has_value()) { - if (rhs.has_value()) { - this->m_value = std::forward(rhs).get(); - } else { - this->m_value.~T(); - this->m_has_value = false; - } - } - - else if (rhs.has_value()) { - construct(std::forward(rhs).get()); - } - } - - bool has_value() const { return this->m_has_value; } - - TL_OPTIONAL_11_CONSTEXPR T& get() & { return this->m_value; } - TL_OPTIONAL_11_CONSTEXPR const T& get() const& { return this->m_value; } - TL_OPTIONAL_11_CONSTEXPR T&& get() && { return std::move(this->m_value); } -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr const T&& get() const&& { return std::move(this->m_value); } -#endif -}; - -// This class manages conditionally having a trivial copy constructor -// This specialization is for when T is trivially copy constructible -template -struct optional_copy_base : optional_operations_base -{ - using optional_operations_base::optional_operations_base; -}; - -// This specialization is for when T is not trivially copy constructible -template -struct optional_copy_base : optional_operations_base -{ - using optional_operations_base::optional_operations_base; - - optional_copy_base() = default; - optional_copy_base(const optional_copy_base& rhs) - : optional_operations_base() - { - if (rhs.has_value()) { - this->construct(rhs.get()); - } else { - this->m_has_value = false; - } - } - - optional_copy_base(optional_copy_base&& rhs) = default; - optional_copy_base& operator=(const optional_copy_base& rhs) = default; - optional_copy_base& operator=(optional_copy_base&& rhs) = default; -}; - -// This class manages conditionally having a trivial move constructor -// Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it -// doesn't implement an analogue to std::is_trivially_move_constructible. We -// have to make do with a non-trivial move constructor even if T is trivially -// move constructible -#ifndef TL_OPTIONAL_GCC49 -template::value> -struct optional_move_base : optional_copy_base -{ - using optional_copy_base::optional_copy_base; -}; -#else -template -struct optional_move_base; -#endif -template -struct optional_move_base : optional_copy_base -{ - using optional_copy_base::optional_copy_base; - - optional_move_base() = default; - optional_move_base(const optional_move_base& rhs) = default; - - optional_move_base(optional_move_base&& rhs) noexcept( - std::is_nothrow_move_constructible::value) - { - if (rhs.has_value()) { - this->construct(std::move(rhs.get())); - } else { - this->m_has_value = false; - } - } - optional_move_base& operator=(const optional_move_base& rhs) = default; - optional_move_base& operator=(optional_move_base&& rhs) = default; -}; - -// This class manages conditionally having a trivial copy assignment operator -template -struct optional_copy_assign_base : optional_move_base -{ - using optional_move_base::optional_move_base; -}; - -template -struct optional_copy_assign_base : optional_move_base -{ - using optional_move_base::optional_move_base; - - optional_copy_assign_base() = default; - optional_copy_assign_base(const optional_copy_assign_base& rhs) = default; - - optional_copy_assign_base(optional_copy_assign_base&& rhs) = default; - optional_copy_assign_base& operator=(const optional_copy_assign_base& rhs) - { - this->assign(rhs); - return *this; - } - optional_copy_assign_base& operator=(optional_copy_assign_base&& rhs) = - default; -}; - -// This class manages conditionally having a trivial move assignment operator -// Unfortunately there's no way to achieve this in GCC < 5 AFAIK, since it -// doesn't implement an analogue to std::is_trivially_move_assignable. We have -// to make do with a non-trivial move assignment operator even if T is trivially -// move assignable -#ifndef TL_OPTIONAL_GCC49 -template::value && - std::is_trivially_move_constructible::value && - std::is_trivially_move_assignable::value> -struct optional_move_assign_base : optional_copy_assign_base -{ - using optional_copy_assign_base::optional_copy_assign_base; -}; -#else -template -struct optional_move_assign_base; -#endif - -template -struct optional_move_assign_base : optional_copy_assign_base -{ - using optional_copy_assign_base::optional_copy_assign_base; - - optional_move_assign_base() = default; - optional_move_assign_base(const optional_move_assign_base& rhs) = default; - - optional_move_assign_base(optional_move_assign_base&& rhs) = default; - - optional_move_assign_base& operator=(const optional_move_assign_base& rhs) = - default; - - optional_move_assign_base& - operator=(optional_move_assign_base&& rhs) noexcept( - std::is_nothrow_move_constructible::value && - std::is_nothrow_move_assignable::value) - { - this->assign(std::move(rhs)); - return *this; - } -}; - -// optional_delete_ctor_base will conditionally delete copy and move -// constructors depending on whether T is copy/move constructible -template::value, - bool EnableMove = std::is_move_constructible::value> -struct optional_delete_ctor_base -{ - optional_delete_ctor_base() = default; - optional_delete_ctor_base(const optional_delete_ctor_base&) = default; - optional_delete_ctor_base(optional_delete_ctor_base&&) noexcept = default; - optional_delete_ctor_base& operator=(const optional_delete_ctor_base&) = - default; - optional_delete_ctor_base& operator=(optional_delete_ctor_base&&) noexcept = - default; -}; - -template -struct optional_delete_ctor_base -{ - optional_delete_ctor_base() = default; - optional_delete_ctor_base(const optional_delete_ctor_base&) = default; - optional_delete_ctor_base(optional_delete_ctor_base&&) noexcept = delete; - optional_delete_ctor_base& operator=(const optional_delete_ctor_base&) = - default; - optional_delete_ctor_base& operator=(optional_delete_ctor_base&&) noexcept = - default; -}; - -template -struct optional_delete_ctor_base -{ - optional_delete_ctor_base() = default; - optional_delete_ctor_base(const optional_delete_ctor_base&) = delete; - optional_delete_ctor_base(optional_delete_ctor_base&&) noexcept = default; - optional_delete_ctor_base& operator=(const optional_delete_ctor_base&) = - default; - optional_delete_ctor_base& operator=(optional_delete_ctor_base&&) noexcept = - default; -}; - -template -struct optional_delete_ctor_base -{ - optional_delete_ctor_base() = default; - optional_delete_ctor_base(const optional_delete_ctor_base&) = delete; - optional_delete_ctor_base(optional_delete_ctor_base&&) noexcept = delete; - optional_delete_ctor_base& operator=(const optional_delete_ctor_base&) = - default; - optional_delete_ctor_base& operator=(optional_delete_ctor_base&&) noexcept = - default; -}; - -// optional_delete_assign_base will conditionally delete copy and move -// constructors depending on whether T is copy/move constructible + assignable -template::value && - std::is_copy_assignable::value), - bool EnableMove = (std::is_move_constructible::value && - std::is_move_assignable::value)> -struct optional_delete_assign_base -{ - optional_delete_assign_base() = default; - optional_delete_assign_base(const optional_delete_assign_base&) = default; - optional_delete_assign_base(optional_delete_assign_base&&) noexcept = default; - optional_delete_assign_base& operator=(const optional_delete_assign_base&) = - default; - optional_delete_assign_base& operator=( - optional_delete_assign_base&&) noexcept = default; -}; - -template -struct optional_delete_assign_base -{ - optional_delete_assign_base() = default; - optional_delete_assign_base(const optional_delete_assign_base&) = default; - optional_delete_assign_base(optional_delete_assign_base&&) noexcept = default; - optional_delete_assign_base& operator=(const optional_delete_assign_base&) = - default; - optional_delete_assign_base& operator=( - optional_delete_assign_base&&) noexcept = delete; -}; - -template -struct optional_delete_assign_base -{ - optional_delete_assign_base() = default; - optional_delete_assign_base(const optional_delete_assign_base&) = default; - optional_delete_assign_base(optional_delete_assign_base&&) noexcept = default; - optional_delete_assign_base& operator=(const optional_delete_assign_base&) = - delete; - optional_delete_assign_base& operator=( - optional_delete_assign_base&&) noexcept = default; -}; - -template -struct optional_delete_assign_base -{ - optional_delete_assign_base() = default; - optional_delete_assign_base(const optional_delete_assign_base&) = default; - optional_delete_assign_base(optional_delete_assign_base&&) noexcept = default; - optional_delete_assign_base& operator=(const optional_delete_assign_base&) = - delete; - optional_delete_assign_base& operator=( - optional_delete_assign_base&&) noexcept = delete; -}; - -} // namespace detail - -/// A tag type to represent an empty optional -struct nullopt_t -{ - struct do_not_use - {}; - constexpr explicit nullopt_t(do_not_use, do_not_use) noexcept {} -}; -/// Represents an empty optional -static constexpr nullopt_t nullopt{ nullopt_t::do_not_use{}, - nullopt_t::do_not_use{} }; - -class bad_optional_access : public std::exception -{ -public: - bad_optional_access() = default; - const char* what() const noexcept { return "Optional has no value"; } -}; - -/// An optional object is an object that contains the storage for another -/// object and manages the lifetime of this contained object, if any. The -/// contained object may be initialized after the optional object has been -/// initialized, and may be destroyed before the optional object has been -/// destroyed. The initialization state of the contained object is tracked by -/// the optional object. -template -class optional - : private detail::optional_move_assign_base - , private detail::optional_delete_ctor_base - , private detail::optional_delete_assign_base -{ - using base = detail::optional_move_assign_base; - - static_assert(!std::is_same::value, - "instantiation of optional with in_place_t is ill-formed"); - static_assert(!std::is_same, nullopt_t>::value, - "instantiation of optional with nullopt_t is ill-formed"); - -public: -// The different versions for C++14 and 11 are needed because deduced return -// types are not SFINAE-safe. This provides better support for things like -// generic lambdas. C.f. -// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0826r0.html -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - /// Carries out some operation which returns an optional on the stored - /// object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto and_then(F&& f) & - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto and_then(F&& f) && - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : result(nullopt); - } - - template - constexpr auto and_then(F&& f) const& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr auto and_then(F&& f) const&& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : result(nullopt); - } -#endif -#else - /// Carries out some operation which returns an optional on the stored - /// object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR detail::invoke_result_t and_then(F&& f) & - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - TL_OPTIONAL_11_CONSTEXPR detail::invoke_result_t and_then(F&& f) && - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : result(nullopt); - } - - template - constexpr detail::invoke_result_t and_then(F&& f) const& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr detail::invoke_result_t and_then(F&& f) const&& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : result(nullopt); - } -#endif -#endif - -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto map(F&& f) & - { - return optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto map(F&& f) && - { - return optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr auto map(F&& f) const& - { - return optional_map_impl(*this, std::forward(f)); - } - - template - constexpr auto map(F&& f) const&& - { - return optional_map_impl(std::move(*this), std::forward(f)); - } -#else - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(std::declval(), - std::declval())) - map(F&& f) & - { - return optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl( - std::declval(), - std::declval())) - map(F&& f) && - { - return optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr decltype(optional_map_impl(std::declval(), - std::declval())) - map(F&& f) const& - { - return optional_map_impl(*this, std::forward(f)); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr decltype(optional_map_impl(std::declval(), - std::declval())) map(F&& f) const&& - { - return optional_map_impl(std::move(*this), std::forward(f)); - } -#endif -#endif - -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto transform(F&& f) & - { - return optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto transform(F&& f) && - { - return optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr auto transform(F&& f) const& - { - return optional_map_impl(*this, std::forward(f)); - } - - template - constexpr auto transform(F&& f) const&& - { - return optional_map_impl(std::move(*this), std::forward(f)); - } -#else - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl(std::declval(), - std::declval())) - transform(F&& f) & - { - return optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR decltype(optional_map_impl( - std::declval(), - std::declval())) - transform(F&& f) && - { - return optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr decltype(optional_map_impl(std::declval(), - std::declval())) - transform(F&& f) const& - { - return optional_map_impl(*this, std::forward(f)); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr decltype(optional_map_impl(std::declval(), - std::declval())) transform(F&& f) - const&& - { - return optional_map_impl(std::move(*this), std::forward(f)); - } -#endif -#endif - - /// Calls `f` if the optional is empty - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) & - { - if (has_value()) - return *this; - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) & - { - return has_value() ? *this : std::forward(f)(); - } - - template* = nullptr> - optional or_else(F&& f) && - { - if (has_value()) - return std::move(*this); - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) && - { - return has_value() ? std::move(*this) : std::forward(f)(); - } - - template* = nullptr> - optional or_else(F&& f) const& - { - if (has_value()) - return *this; - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) const& - { - return has_value() ? *this : std::forward(f)(); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template* = nullptr> - optional or_else(F&& f) const&& - { - if (has_value()) - return std::move(*this); - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional or_else(F&& f) const&& - { - return has_value() ? std::move(*this) : std::forward(f)(); - } -#endif - - /// Maps the stored value with `f` if there is one, otherwise returns `u`. - template - U map_or(F&& f, U&& u) & - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u); - } - - template - U map_or(F&& f, U&& u) && - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u); - } - - template - U map_or(F&& f, U&& u) const& - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - U map_or(F&& f, U&& u) const&& - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u); - } -#endif - - /// Maps the stored value with `f` if there is one, otherwise calls - /// `u` and returns the result. - template - detail::invoke_result_t map_or_else(F&& f, U&& u) & - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u)(); - } - - template - detail::invoke_result_t map_or_else(F&& f, U&& u) && - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u)(); - } - - template - detail::invoke_result_t map_or_else(F&& f, U&& u) const& - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u)(); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - detail::invoke_result_t map_or_else(F&& f, U&& u) const&& - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u)(); - } -#endif - - /// Returns `u` if `*this` has a value, otherwise an empty optional. - template - constexpr optional::type> conjunction(U&& u) const - { - using result = optional>; - return has_value() ? result{ u } : result{ nullopt }; - } - - /// Returns `rhs` if `*this` is empty, otherwise the current value. - TL_OPTIONAL_11_CONSTEXPR optional disjunction(const optional& rhs) & - { - return has_value() ? *this : rhs; - } - - constexpr optional disjunction(const optional& rhs) const& - { - return has_value() ? *this : rhs; - } - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(const optional& rhs) && - { - return has_value() ? std::move(*this) : rhs; - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr optional disjunction(const optional& rhs) const&& - { - return has_value() ? std::move(*this) : rhs; - } -#endif - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(optional&& rhs) & - { - return has_value() ? *this : std::move(rhs); - } - - constexpr optional disjunction(optional&& rhs) const& - { - return has_value() ? *this : std::move(rhs); - } - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(optional&& rhs) && - { - return has_value() ? std::move(*this) : std::move(rhs); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr optional disjunction(optional&& rhs) const&& - { - return has_value() ? std::move(*this) : std::move(rhs); - } -#endif - - /// Takes the value out of the optional, leaving it empty - optional take() - { - optional ret = std::move(*this); - reset(); - return ret; - } - - using value_type = T; - - /// Constructs an optional that does not contain a value. - constexpr optional() noexcept = default; - - constexpr optional(nullopt_t) noexcept {} - - /// Copy constructor - /// - /// If `rhs` contains a value, the stored value is direct-initialized with - /// it. Otherwise, the constructed optional is empty. - TL_OPTIONAL_11_CONSTEXPR optional(const optional& rhs) = default; - - /// Move constructor - /// - /// If `rhs` contains a value, the stored value is direct-initialized with - /// it. Otherwise, the constructed optional is empty. - TL_OPTIONAL_11_CONSTEXPR optional(optional&& rhs) = default; - - /// Constructs the stored value in-place using the given arguments. - template - constexpr explicit optional( - detail::enable_if_t::value, in_place_t>, - Args&&... args) - : base(in_place, std::forward(args)...) - { - } - - template - TL_OPTIONAL_11_CONSTEXPR explicit optional( - detail::enable_if_t< - std::is_constructible&, Args&&...>::value, - in_place_t>, - std::initializer_list il, - Args&&... args) - { - this->construct(il, std::forward(args)...); - } - - /// Constructs the stored value with `u`. - template::value>* = nullptr, - detail::enable_forward_value* = nullptr> - constexpr optional(U&& u) - : base(in_place, std::forward(u)) - { - } - - template::value>* = nullptr, - detail::enable_forward_value* = nullptr> - constexpr explicit optional(U&& u) - : base(in_place, std::forward(u)) - { - } - - /// Converting copy constructor. - template< - class U, - detail::enable_from_other* = nullptr, - detail::enable_if_t::value>* = nullptr> - optional(const optional& rhs) - { - if (rhs.has_value()) { - this->construct(*rhs); - } - } - - template< - class U, - detail::enable_from_other* = nullptr, - detail::enable_if_t::value>* = nullptr> - explicit optional(const optional& rhs) - { - if (rhs.has_value()) { - this->construct(*rhs); - } - } - - /// Converting move constructor. - template* = nullptr, - detail::enable_if_t::value>* = nullptr> - optional(optional&& rhs) - { - if (rhs.has_value()) { - this->construct(std::move(*rhs)); - } - } - - template* = nullptr, - detail::enable_if_t::value>* = nullptr> - explicit optional(optional&& rhs) - { - if (rhs.has_value()) { - this->construct(std::move(*rhs)); - } - } - - /// Destroys the stored value if there is one. - ~optional() = default; - - /// Assignment to empty. - /// - /// Destroys the current value if there is one. - optional& operator=(nullopt_t) noexcept - { - if (has_value()) { - this->m_value.~T(); - this->m_has_value = false; - } - - return *this; - } - - /// Copy assignment. - /// - /// Copies the value from `rhs` if there is one. Otherwise resets the stored - /// value in `*this`. - optional& operator=(const optional& rhs) = default; - - /// Move assignment. - /// - /// Moves the value from `rhs` if there is one. Otherwise resets the stored - /// value in `*this`. - optional& operator=(optional&& rhs) = default; - - /// Assigns the stored value from `u`, destroying the old value if there was - /// one. - template* = nullptr> - optional& operator=(U&& u) - { - if (has_value()) { - this->m_value = std::forward(u); - } else { - this->construct(std::forward(u)); - } - - return *this; - } - - /// Converting copy assignment operator. - /// - /// Copies the value from `rhs` if there is one. Otherwise resets the stored - /// value in `*this`. - template* = nullptr> - optional& operator=(const optional& rhs) - { - if (has_value()) { - if (rhs.has_value()) { - this->m_value = *rhs; - } else { - this->hard_reset(); - } - } - - else if (rhs.has_value()) { - this->construct(*rhs); - } - - return *this; - } - - // TODO check exception guarantee - /// Converting move assignment operator. - /// - /// Moves the value from `rhs` if there is one. Otherwise resets the stored - /// value in `*this`. - template* = nullptr> - optional& operator=(optional&& rhs) - { - if (has_value()) { - if (rhs.has_value()) { - this->m_value = std::move(*rhs); - } else { - this->hard_reset(); - } - } - - else if (rhs.has_value()) { - this->construct(std::move(*rhs)); - } - - return *this; - } - - /// Constructs the value in-place, destroying the current one if there is - /// one. - template - T& emplace(Args&&... args) - { - static_assert(std::is_constructible::value, - "T must be constructible with Args"); - - *this = nullopt; - this->construct(std::forward(args)...); - return value(); - } - - template - detail::enable_if_t< - std::is_constructible&, Args&&...>::value, - T&> - emplace(std::initializer_list il, Args&&... args) - { - *this = nullopt; - this->construct(il, std::forward(args)...); - return value(); - } - - /// Swaps this optional with the other. - /// - /// If neither optionals have a value, nothing happens. - /// If both have a value, the values are swapped. - /// If one has a value, it is moved to the other and the movee is left - /// valueless. - void swap(optional& rhs) noexcept( - std::is_nothrow_move_constructible::value && - detail::is_nothrow_swappable::value) - { - using std::swap; - if (has_value()) { - if (rhs.has_value()) { - swap(**this, *rhs); - } else { - new (std::addressof(rhs.m_value)) T(std::move(this->m_value)); - this->m_value.T::~T(); - } - } else if (rhs.has_value()) { - new (std::addressof(this->m_value)) T(std::move(rhs.m_value)); - rhs.m_value.T::~T(); - } - swap(this->m_has_value, rhs.m_has_value); - } - - /// Returns a pointer to the stored value - constexpr const T* operator->() const - { - return std::addressof(this->m_value); - } - - TL_OPTIONAL_11_CONSTEXPR T* operator->() - { - return std::addressof(this->m_value); - } - - /// Returns the stored value - TL_OPTIONAL_11_CONSTEXPR T& operator*() & { return this->m_value; } - - constexpr const T& operator*() const& { return this->m_value; } - - TL_OPTIONAL_11_CONSTEXPR T&& operator*() && - { - return std::move(this->m_value); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr const T&& operator*() const&& { return std::move(this->m_value); } -#endif - - /// Returns whether or not the optional has a value - constexpr bool has_value() const noexcept { return this->m_has_value; } - - constexpr explicit operator bool() const noexcept - { - return this->m_has_value; - } - - /// Returns the contained value if there is one, otherwise throws - /// bad_optional_access - TL_OPTIONAL_11_CONSTEXPR T& value() & - { - if (has_value()) - return this->m_value; - throw bad_optional_access(); - } - TL_OPTIONAL_11_CONSTEXPR const T& value() const& - { - if (has_value()) - return this->m_value; - throw bad_optional_access(); - } - TL_OPTIONAL_11_CONSTEXPR T&& value() && - { - if (has_value()) - return std::move(this->m_value); - throw bad_optional_access(); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - TL_OPTIONAL_11_CONSTEXPR const T&& value() const&& - { - if (has_value()) - return std::move(this->m_value); - throw bad_optional_access(); - } -#endif - - /// Returns the stored value if there is one, otherwise returns `u` - template - constexpr T value_or(U&& u) const& - { - static_assert(std::is_copy_constructible::value && - std::is_convertible::value, - "T must be copy constructible and convertible from U"); - return has_value() ? **this : static_cast(std::forward(u)); - } - - template - TL_OPTIONAL_11_CONSTEXPR T value_or(U&& u) && - { - static_assert(std::is_move_constructible::value && - std::is_convertible::value, - "T must be move constructible and convertible from U"); - return has_value() ? std::move(**this) : static_cast(std::forward(u)); - } - - /// Destroys the stored value if one exists, making the optional empty - void reset() noexcept - { - if (has_value()) { - this->m_value.~T(); - this->m_has_value = false; - } - } -}; // namespace tl - -/// Compares two optional objects -template -inline constexpr bool -operator==(const optional& lhs, const optional& rhs) -{ - return lhs.has_value() == rhs.has_value() && - (!lhs.has_value() || *lhs == *rhs); -} -template -inline constexpr bool -operator!=(const optional& lhs, const optional& rhs) -{ - return lhs.has_value() != rhs.has_value() || - (lhs.has_value() && *lhs != *rhs); -} -template -inline constexpr bool -operator<(const optional& lhs, const optional& rhs) -{ - return rhs.has_value() && (!lhs.has_value() || *lhs < *rhs); -} -template -inline constexpr bool -operator>(const optional& lhs, const optional& rhs) -{ - return lhs.has_value() && (!rhs.has_value() || *lhs > *rhs); -} -template -inline constexpr bool -operator<=(const optional& lhs, const optional& rhs) -{ - return !lhs.has_value() || (rhs.has_value() && *lhs <= *rhs); -} -template -inline constexpr bool -operator>=(const optional& lhs, const optional& rhs) -{ - return !rhs.has_value() || (lhs.has_value() && *lhs >= *rhs); -} - -/// Compares an optional to a `nullopt` -template -inline constexpr bool -operator==(const optional& lhs, nullopt_t) noexcept -{ - return !lhs.has_value(); -} -template -inline constexpr bool -operator==(nullopt_t, const optional& rhs) noexcept -{ - return !rhs.has_value(); -} -template -inline constexpr bool -operator!=(const optional& lhs, nullopt_t) noexcept -{ - return lhs.has_value(); -} -template -inline constexpr bool -operator!=(nullopt_t, const optional& rhs) noexcept -{ - return rhs.has_value(); -} -template -inline constexpr bool -operator<(const optional&, nullopt_t) noexcept -{ - return false; -} -template -inline constexpr bool -operator<(nullopt_t, const optional& rhs) noexcept -{ - return rhs.has_value(); -} -template -inline constexpr bool -operator<=(const optional& lhs, nullopt_t) noexcept -{ - return !lhs.has_value(); -} -template -inline constexpr bool -operator<=(nullopt_t, const optional&) noexcept -{ - return true; -} -template -inline constexpr bool -operator>(const optional& lhs, nullopt_t) noexcept -{ - return lhs.has_value(); -} -template -inline constexpr bool -operator>(nullopt_t, const optional&) noexcept -{ - return false; -} -template -inline constexpr bool -operator>=(const optional&, nullopt_t) noexcept -{ - return true; -} -template -inline constexpr bool -operator>=(nullopt_t, const optional& rhs) noexcept -{ - return !rhs.has_value(); -} - -/// Compares the optional with a value. -template -inline constexpr bool -operator==(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs == rhs : false; -} -template -inline constexpr bool -operator==(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs == *rhs : false; -} -template -inline constexpr bool -operator!=(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs != rhs : true; -} -template -inline constexpr bool -operator!=(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs != *rhs : true; -} -template -inline constexpr bool -operator<(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs < rhs : true; -} -template -inline constexpr bool -operator<(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs < *rhs : false; -} -template -inline constexpr bool -operator<=(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs <= rhs : true; -} -template -inline constexpr bool -operator<=(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs <= *rhs : false; -} -template -inline constexpr bool -operator>(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs > rhs : false; -} -template -inline constexpr bool -operator>(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs > *rhs : true; -} -template -inline constexpr bool -operator>=(const optional& lhs, const U& rhs) -{ - return lhs.has_value() ? *lhs >= rhs : false; -} -template -inline constexpr bool -operator>=(const U& lhs, const optional& rhs) -{ - return rhs.has_value() ? lhs >= *rhs : true; -} - -template::value>* = nullptr, - detail::enable_if_t::value>* = nullptr> -void -swap(optional& lhs, optional& rhs) noexcept(noexcept(lhs.swap(rhs))) -{ - return lhs.swap(rhs); -} - -namespace detail { -struct i_am_secret -{}; -} // namespace detail - -template< - class T = detail::i_am_secret, - class U, - class Ret = detail::conditional_t::value, - detail::decay_t, - T>> -inline constexpr optional -make_optional(U&& v) -{ - return optional(std::forward(v)); -} - -template -inline constexpr optional -make_optional(Args&&... args) -{ - return optional(in_place, std::forward(args)...); -} -template -inline constexpr optional -make_optional(std::initializer_list il, Args&&... args) -{ - return optional(in_place, il, std::forward(args)...); -} - -#if __cplusplus >= 201703L -template -optional(T) -> optional; -#endif - -/// \exclude -namespace detail { -#ifdef TL_OPTIONAL_CXX14 -template(), - *std::declval())), - detail::enable_if_t::value>* = nullptr> -constexpr auto -optional_map_impl(Opt&& opt, F&& f) -{ - return opt.has_value() - ? detail::invoke(std::forward(f), *std::forward(opt)) - : optional(nullopt); -} - -template(), - *std::declval())), - detail::enable_if_t::value>* = nullptr> -auto -optional_map_impl(Opt&& opt, F&& f) -{ - if (opt.has_value()) { - detail::invoke(std::forward(f), *std::forward(opt)); - return make_optional(monostate{}); - } - - return optional(nullopt); -} -#else -template(), - *std::declval())), - detail::enable_if_t::value>* = nullptr> - -constexpr auto -optional_map_impl(Opt&& opt, F&& f) -> optional -{ - return opt.has_value() - ? detail::invoke(std::forward(f), *std::forward(opt)) - : optional(nullopt); -} - -template(), - *std::declval())), - detail::enable_if_t::value>* = nullptr> - -auto -optional_map_impl(Opt&& opt, F&& f) -> optional -{ - if (opt.has_value()) { - detail::invoke(std::forward(f), *std::forward(opt)); - return monostate{}; - } - - return nullopt; -} -#endif -} // namespace detail - -/// Specialization for when `T` is a reference. `optional` acts similarly -/// to a `T*`, but provides more operations and shows intent more clearly. -template -class optional -{ -public: -// The different versions for C++14 and 11 are needed because deduced return -// types are not SFINAE-safe. This provides better support for things like -// generic lambdas. C.f. -// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0826r0.html -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - - /// Carries out some operation which returns an optional on the stored - /// object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto and_then(F&& f) & - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto and_then(F&& f) && - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - constexpr auto and_then(F&& f) const& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr auto and_then(F&& f) const&& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } -#endif -#else - /// Carries out some operation which returns an optional on the stored - /// object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR detail::invoke_result_t and_then(F&& f) & - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - TL_OPTIONAL_11_CONSTEXPR detail::invoke_result_t and_then(F&& f) && - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - - template - constexpr detail::invoke_result_t and_then(F&& f) const& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), **this) - : result(nullopt); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr detail::invoke_result_t and_then(F&& f) const&& - { - using result = detail::invoke_result_t; - static_assert(detail::is_optional::value, - "F must return an optional"); - - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : result(nullopt); - } -#endif -#endif - -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto map(F&& f) & - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto map(F&& f) && - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr auto map(F&& f) const& - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - template - constexpr auto map(F&& f) const&& - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } -#else - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl( - std::declval(), - std::declval())) - map(F&& f) & - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl( - std::declval(), - std::declval())) - map(F&& f) && - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr decltype(detail::optional_map_impl(std::declval(), - std::declval())) - map(F&& f) const& - { - return detail::optional_map_impl(*this, std::forward(f)); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr decltype(detail::optional_map_impl(std::declval(), - std::declval())) map(F&& f) - const&& - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } -#endif -#endif - -#if defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC49) && \ - !defined(TL_OPTIONAL_GCC54) && !defined(TL_OPTIONAL_GCC55) - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR auto transform(F&& f) & - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - template - TL_OPTIONAL_11_CONSTEXPR auto transform(F&& f) && - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr auto transform(F&& f) const& - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - template - constexpr auto transform(F&& f) const&& - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } -#else - /// Carries out some operation on the stored object if there is one. - template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl( - std::declval(), - std::declval())) - transform(F&& f) & - { - return detail::optional_map_impl(*this, std::forward(f)); - } - - /// \group map - /// \synopsis template auto transform(F &&f) &&; - template - TL_OPTIONAL_11_CONSTEXPR decltype(detail::optional_map_impl( - std::declval(), - std::declval())) - transform(F&& f) && - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } - - template - constexpr decltype(detail::optional_map_impl(std::declval(), - std::declval())) - transform(F&& f) const& - { - return detail::optional_map_impl(*this, std::forward(f)); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - constexpr decltype(detail::optional_map_impl( - std::declval(), - std::declval())) transform(F&& f) const&& - { - return detail::optional_map_impl(std::move(*this), std::forward(f)); - } -#endif -#endif - - /// Calls `f` if the optional is empty - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) & - { - if (has_value()) - return *this; - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) & - { - return has_value() ? *this : std::forward(f)(); - } - - template* = nullptr> - optional or_else(F&& f) && - { - if (has_value()) - return std::move(*this); - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) && - { - return has_value() ? std::move(*this) : std::forward(f)(); - } - - template* = nullptr> - optional or_else(F&& f) const& - { - if (has_value()) - return *this; - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional TL_OPTIONAL_11_CONSTEXPR or_else(F&& f) const& - { - return has_value() ? *this : std::forward(f)(); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template* = nullptr> - optional or_else(F&& f) const&& - { - if (has_value()) - return std::move(*this); - - std::forward(f)(); - return nullopt; - } - - template* = nullptr> - optional or_else(F&& f) const&& - { - return has_value() ? std::move(*this) : std::forward(f)(); - } -#endif - - /// Maps the stored value with `f` if there is one, otherwise returns `u` - template - U map_or(F&& f, U&& u) & - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u); - } - - template - U map_or(F&& f, U&& u) && - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u); - } - - template - U map_or(F&& f, U&& u) const& - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - U map_or(F&& f, U&& u) const&& - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u); - } -#endif - - /// Maps the stored value with `f` if there is one, otherwise calls - /// `u` and returns the result. - template - detail::invoke_result_t map_or_else(F&& f, U&& u) & - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u)(); - } - - template - detail::invoke_result_t map_or_else(F&& f, U&& u) && - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u)(); - } - - template - detail::invoke_result_t map_or_else(F&& f, U&& u) const& - { - return has_value() ? detail::invoke(std::forward(f), **this) - : std::forward(u)(); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - template - detail::invoke_result_t map_or_else(F&& f, U&& u) const&& - { - return has_value() ? detail::invoke(std::forward(f), std::move(**this)) - : std::forward(u)(); - } -#endif - - /// Returns `u` if `*this` has a value, otherwise an empty optional. - template - constexpr optional::type> conjunction(U&& u) const - { - using result = optional>; - return has_value() ? result{ u } : result{ nullopt }; - } - - /// Returns `rhs` if `*this` is empty, otherwise the current value. - TL_OPTIONAL_11_CONSTEXPR optional disjunction(const optional& rhs) & - { - return has_value() ? *this : rhs; - } - - constexpr optional disjunction(const optional& rhs) const& - { - return has_value() ? *this : rhs; - } - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(const optional& rhs) && - { - return has_value() ? std::move(*this) : rhs; - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr optional disjunction(const optional& rhs) const&& - { - return has_value() ? std::move(*this) : rhs; - } -#endif - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(optional&& rhs) & - { - return has_value() ? *this : std::move(rhs); - } - - constexpr optional disjunction(optional&& rhs) const& - { - return has_value() ? *this : std::move(rhs); - } - - TL_OPTIONAL_11_CONSTEXPR optional disjunction(optional&& rhs) && - { - return has_value() ? std::move(*this) : std::move(rhs); - } - -#ifndef TL_OPTIONAL_NO_CONSTRR - constexpr optional disjunction(optional&& rhs) const&& - { - return has_value() ? std::move(*this) : std::move(rhs); - } -#endif - - /// Takes the value out of the optional, leaving it empty - optional take() - { - optional ret = std::move(*this); - reset(); - return ret; - } - - using value_type = T&; - - /// Constructs an optional that does not contain a value. - constexpr optional() noexcept - : m_value(nullptr) - { - } - - constexpr optional(nullopt_t) noexcept - : m_value(nullptr) - { - } - - /// Copy constructor - /// - /// If `rhs` contains a value, the stored value is direct-initialized with - /// it. Otherwise, the constructed optional is empty. - TL_OPTIONAL_11_CONSTEXPR optional(const optional& rhs) noexcept = default; - - /// Move constructor - /// - /// If `rhs` contains a value, the stored value is direct-initialized with - /// it. Otherwise, the constructed optional is empty. - TL_OPTIONAL_11_CONSTEXPR optional(optional&& rhs) = default; - - /// Constructs the stored value with `u`. - template>::value>* = nullptr> - constexpr optional(U&& u) noexcept - : m_value(std::addressof(u)) - { - static_assert(std::is_lvalue_reference::value, "U must be an lvalue"); - } - - template - constexpr explicit optional(const optional& rhs) noexcept - : optional(*rhs) - { - } - - /// No-op - ~optional() = default; - - /// Assignment to empty. - /// - /// Destroys the current value if there is one. - optional& operator=(nullopt_t) noexcept - { - m_value = nullptr; - return *this; - } - - /// Copy assignment. - /// - /// Rebinds this optional to the referee of `rhs` if there is one. Otherwise - /// resets the stored value in `*this`. - optional& operator=(const optional& rhs) = default; - - /// Rebinds this optional to `u`. - template>::value>* = nullptr> - optional& operator=(U&& u) - { - static_assert(std::is_lvalue_reference::value, "U must be an lvalue"); - m_value = std::addressof(u); - return *this; - } - - /// Converting copy assignment operator. - /// - /// Rebinds this optional to the referee of `rhs` if there is one. Otherwise - /// resets the stored value in `*this`. - template - optional& operator=(const optional& rhs) noexcept - { - m_value = std::addressof(rhs.value()); - return *this; - } - - /// Rebinds this optional to `u`. - template>::value>* = nullptr> - optional& emplace(U&& u) noexcept - { - return *this = std::forward(u); - } - - void swap(optional& rhs) noexcept { std::swap(m_value, rhs.m_value); } - - /// Returns a pointer to the stored value - constexpr const T* operator->() const noexcept { return m_value; } - - TL_OPTIONAL_11_CONSTEXPR T* operator->() noexcept { return m_value; } - - /// Returns the stored value - TL_OPTIONAL_11_CONSTEXPR T& operator*() noexcept { return *m_value; } - - constexpr const T& operator*() const noexcept { return *m_value; } - - constexpr bool has_value() const noexcept { return m_value != nullptr; } - - constexpr explicit operator bool() const noexcept - { - return m_value != nullptr; - } - - /// Returns the contained value if there is one, otherwise throws - /// bad_optional_access - TL_OPTIONAL_11_CONSTEXPR T& value() - { - if (has_value()) - return *m_value; - throw bad_optional_access(); - } - TL_OPTIONAL_11_CONSTEXPR const T& value() const - { - if (has_value()) - return *m_value; - throw bad_optional_access(); - } - - /// Returns the stored value if there is one, otherwise returns `u` - template - constexpr T value_or(U&& u) const& noexcept - { - static_assert(std::is_copy_constructible::value && - std::is_convertible::value, - "T must be copy constructible and convertible from U"); - return has_value() ? **this : static_cast(std::forward(u)); - } - - /// \group value_or - template - TL_OPTIONAL_11_CONSTEXPR T value_or(U&& u) && noexcept - { - static_assert(std::is_move_constructible::value && - std::is_convertible::value, - "T must be move constructible and convertible from U"); - return has_value() ? **this : static_cast(std::forward(u)); - } - - /// Destroys the stored value if one exists, making the optional empty - void reset() noexcept { m_value = nullptr; } - -private: - T* m_value; -}; // namespace tl - -} // namespace tl - -namespace std { -// TODO SFINAE -template -struct hash> -{ - ::std::size_t operator()(const tl::optional& o) const - { - if (!o.has_value()) - return 0; - - return std::hash>()(*o); - } -}; -} // namespace std - -#endif diff --git a/include/proxsuite/linalg/sparse/factorize.hpp b/include/proxsuite/linalg/sparse/factorize.hpp index 225a82f7b..78ade7863 100644 --- a/include/proxsuite/linalg/sparse/factorize.hpp +++ b/include/proxsuite/linalg/sparse/factorize.hpp @@ -392,7 +392,7 @@ ereach(usize& count, usize(len) * sizeof(I)); // move down the top of the stack - top = util::wrapping_plus(top, -len); + top -= len; } for (usize q = top; q < n; ++q) { diff --git a/include/proxsuite/linalg/veg/tuple.hpp b/include/proxsuite/linalg/veg/tuple.hpp index 6e7dc1ca2..a3ad0e3e7 100644 --- a/include/proxsuite/linalg/veg/tuple.hpp +++ b/include/proxsuite/linalg/veg/tuple.hpp @@ -754,16 +754,9 @@ struct cat proxsuite::linalg::veg::meta::false_type /*unused*/, Tuples&&... tups) VEG_NOEXCEPT -> Concat { -#if defined(_MSC_VER) || (defined(__clang__) && __clang_major__ >= 19) || \ - (defined(__APPLE__) && defined(__clang__) && __clang_major__ >= 17) return cat::from_ref_to_result( Tag>{}, cat::apply(_detail::_tuple::tuple_fwd(VEG_FWD(tups))...)); -#else - return cat::template from_ref_to_result( - Tag>{}, - cat::apply(_detail::_tuple::tuple_fwd(VEG_FWD(tups))...)); -#endif } template diff --git a/include/proxsuite/proxqp/dense/backward_data.hpp b/include/proxsuite/proxqp/dense/backward_data.hpp index 7ebe8734b..00f6aefbd 100644 --- a/include/proxsuite/proxqp/dense/backward_data.hpp +++ b/include/proxsuite/proxqp/dense/backward_data.hpp @@ -8,7 +8,6 @@ #define PROXSUITE_PROXQP_DENSE_BACKWARD_DATA_HPP #include -#include #include "proxsuite/linalg/veg/type_traits/core.hpp" #include "proxsuite/proxqp/dense/fwd.hpp" diff --git a/include/proxsuite/proxqp/sparse/workspace.hpp b/include/proxsuite/proxqp/sparse/workspace.hpp index 5d763e3ad..5bc485dcf 100644 --- a/include/proxsuite/proxqp/sparse/workspace.hpp +++ b/include/proxsuite/proxqp/sparse/workspace.hpp @@ -491,12 +491,12 @@ struct Workspace } } - auto lnnz = isize(zero_extend(ldl.col_ptrs[n_tot])); + const auto local_lnnz = isize(zero_extend(ldl.col_ptrs[n_tot])); // if ldlt is too sparse - // do_ldlt = !overflow && lnnz < (10000000); + // do_ldlt = !overflow && local_lnnz < (10000000); if (settings.sparse_backend == SparseBackend::Automatic) { - do_ldlt = !overflow && lnnz < 10000000; + do_ldlt = !overflow && local_lnnz < 10000000; } else if (settings.sparse_backend == SparseBackend::SparseCholesky) { do_ldlt = true; } else { diff --git a/include/proxsuite/proxqp/utils/random_qp_problems.hpp b/include/proxsuite/proxqp/utils/random_qp_problems.hpp index e08641d47..9b2f8b885 100644 --- a/include/proxsuite/proxqp/utils/random_qp_problems.hpp +++ b/include/proxsuite/proxqp/utils/random_qp_problems.hpp @@ -72,33 +72,48 @@ using proxqp::u64; is not available. Therefore, we use a random number generator from the stdlib instead of our custom Lehmer random number generator. The necessary lehmer functions used in in our code are remplaced with calls to the stdlib.*/ -std::mt19937 gen(1234); -std::uniform_real_distribution<> uniform_dist(0.0, 1.0); -std::normal_distribution normal_dist; +inline auto +get_gen() -> std::mt19937& +{ + static std::mt19937 gen(1234); + return gen; +} +inline auto +get_uniform_dist() -> std::uniform_real_distribution<>& +{ + static std::uniform_real_distribution<> uniform_dist(0.0, 1.0); + return uniform_dist; +} +inline auto +get_normal_dist() -> std::normal_distribution& +{ + static std::normal_distribution normal_dist; + return normal_dist; +} using u128 = u64; inline auto uniform_rand() -> double { - double output = double(uniform_dist(gen)); + double output = double(get_uniform_dist()(get_gen())); return output; } inline auto lehmer_global() -> u128& { - static u64 output = gen(); + static u64 output = get_gen()(); return output; } inline void set_seed(u64 seed) { - gen.seed(seed); + get_gen().seed(seed); } inline auto normal_rand() -> double { - return normal_dist(gen); + return get_normal_dist()(get_gen()); } #else using u128 = __uint128_t; diff --git a/pixi.lock b/pixi.lock new file mode 100644 index 000000000..709b2d73e --- /dev/null +++ b/pixi.lock @@ -0,0 +1,5889 @@ +version: 6 +environments: + default: + channels: + - url: https://conda.anaconda.org/conda-forge/ + options: + pypi-prerelease-mode: if-necessary-or-explicit + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/at-spi2-atk-2.38.0-h0630a04_3.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/at-spi2-core-2.40.3-h0630a04_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/atk-1.0-2.38.0-h04ea711_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils-2.45-default_h4852527_104.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.45-default_hfdba357_104.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.45-default_h4852527_104.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hda65f42_8.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.34.6-hb03c661_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.11.0-h4d9bdce_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cairo-1.18.4-h3394656_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/catch2-3.8.0-h84d6215_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ccache-4.11.3-h80c52d3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cereal-1.3.2-hd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-4.2.1-hc85cc9f_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/conda-gcc-specs-14.3.0-he8ccf15_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.11.0-hfcd1e18_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/dbus-1.16.2-h24cb091_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/doxygen-1.13.2-h8e693c7_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/eigen-3.4.0-h171cf75_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/epoxy-1.5.10-hb03c661_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.15.0-h7e30c49_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-hc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/freetype-2.14.1-ha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/fribidi-1.0.16-hb03c661_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-14.3.0-h0dff253_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-14.3.0-he8b2097_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-14.3.0-h298d278_15.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gdk-pixbuf-2.44.4-h2b0a6b4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/glib-tools-2.86.3-hf516916_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/graphite2-1.3.14-hecca717_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/graphviz-13.1.2-h87b6fe6_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gtk3-3.24.43-h993cebd_6.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gts-0.7.6-h977cf35_4.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-14.3.0-h76987e4_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-14.3.0-h2185e75_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-14.3.0-hdb5f4f1_15.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-12.2.0-h15599e2_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.14.6-nompi_h1b119a7_104.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/hicolor-icon-theme-0.17-ha770c72_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-4.18.0-he073ed8_8.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.3-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.3-h659f571_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.45-default_hbd61a6d_104.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/lerc-4.0.0-h0aef613_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libaec-1.1.4-h3f801dc_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.11.0-4_h4a7cf45_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.11.0-4_h0358290_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcups-2.3.3-hb8b1518_5.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.17.0-h4e3cde8_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.25-h17f619e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libdrm-2.4.125-hb03c661_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20250104-pl5321h7949ede_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libegl-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libegl-devel-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.3-hecca717_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.5.2-h9ec8514_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libfreetype-2.14.1-ha770c72_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libfreetype6-2.14.1-h73754d4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-15.2.0-he0feb66_16.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-14.3.0-hf649bbc_116.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-15.2.0-h69a702a_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgd-2.3.3-h6f5c62b_11.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-15.2.0-h69a702a_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-15.2.0-h69a702a_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-15.2.0-h68bc16d_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgl-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgl-devel-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libglib-2.86.3-h6548e54_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libglvnd-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libglx-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libglx-devel-1.7.0-ha4b6fd6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-15.2.0-he0feb66_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libhiredis-1.0.2-h2cc385e_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.18-h3b78370_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libjpeg-turbo-3.1.2-hb03c661_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.11.0-4_h47877c9_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libmatio-1.5.29-h2580756_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.67.0-had1ee68_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_4.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libpciaccess-0.18-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libpng-1.6.53-h421ea60_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.60.0-h61e6d4b_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-14.3.0-h8f1669f_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.51.1-h0c1763c_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.1-hcf80075_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-15.2.0-h934c35e_16.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-14.3.0-h9f08a49_116.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-15.2.0-hdf11a46_16.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libtiff-4.7.1-h9d88235_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.41.2-h5347b49_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.51.0-hb03c661_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.6.0-hd42ef1d_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.17.0-h8a09558_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxkbcommon-1.13.1-hca5e8e5_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxml2-16-2.15.1-ha9997c6_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.15.1-h26afc86_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nanobind-2.10.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ninja-1.13.2-h171cf75_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py312heda63a1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.6.0-h26f9b46_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.56.4-hadf4263_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.47-haa7fec5_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pixman-0.46.4-h54a6638_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/prek-0.2.21-hb17b654_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-hb9d3cd8_1002.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.12-hd63d673_1_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.6-hb9d3cd8_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/scipy-1.16.3-py312h7a1785b_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/simde-0.8.2-h84d6215_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.28-h4ee821c_8.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_ha0e22de_103.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/wayland-1.24.0-hd6090a7_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xkeyboard-config-2.46-hb03c661_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libice-1.1.2-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libsm-1.2.6-he73a12e_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.8.12-h4f16b4b_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.12-hb03c661_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxcomposite-0.4.6-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxcursor-1.2.3-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdamage-1.1.6-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdmcp-1.1.5-hb03c661_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.6-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxfixes-6.0.2-hb03c661_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxi-1.8.2-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxinerama-1.1.5-h5888daf_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrandr-1.5.4-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.12-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxtst-1.2.5-hb9d3cd8_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxxf86vm-1.1.6-hb9d3cd8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-xorgproto-2024.1-hb9d3cd8_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.7-hb78ec9c_6.conda + osx-64: + - conda: https://conda.anaconda.org/conda-forge/osx-64/_openmp_mutex-4.5-7_kmp_llvm.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/atk-1.0-2.38.0-h4bec284_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h500dc9f_8.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.34.6-hb5e19a0_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/c-compiler-1.11.0-h7a00415_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cairo-1.18.4-h950ec3b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/catch2-3.8.0-h9275861_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ccache-4.11.3-h33566b8_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cctools-1030.6.3-llvm19_1_h67a6458_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cctools_impl_osx-64-1030.6.3-llvm19_1_h3b512aa_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cctools_osx-64-1030.6.3-llvm19_1_h8f0d4bb_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cereal-1.3.2-hd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/clang-19-19.1.7-default_hc369343_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clang-19.1.7-default_h1323312_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clang_impl_osx-64-19.1.7-hc73cdc9_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clang_osx-64-19.1.7-h7e5c614_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx-19.1.7-default_h1c12a56_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx_impl_osx-64-19.1.7-hb295874_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx_osx-64-19.1.7-h7e5c614_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cmake-4.2.1-h29fc008_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/compiler-rt-19.1.7-he914875_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-64-19.1.7-h138dee1_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/cxx-compiler-1.11.0-h307afc9_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/doxygen-1.13.2-h27064b9_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/eigen-3.4.0-hfc0b2d5_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/epoxy-1.5.10-h8616949_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/fontconfig-2.15.0-h37eeddb_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-hc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/freetype-2.14.1-h694c41f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/fribidi-1.0.16-h8616949_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/gdk-pixbuf-2.44.4-h07555a4_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/glib-tools-2.86.3-h8650975_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/graphite2-1.3.14-h21dd04a_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/graphviz-13.1.2-h42bfd48_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/gtk3-3.24.43-h5e629aa_6.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/gts-0.7.6-h53e17e3_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/harfbuzz-12.2.0-hc5d3ef4_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/hdf5-1.14.6-nompi_hc1508a4_104.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/hicolor-icon-theme-0.17-h694c41f_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/icu-75.1-h120a0e1_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/krb5-1.21.3-h37d8d59_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ld64-956.6-llvm19_1_hc3792c1_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ld64_osx-64-956.6-llvm19_1_h466f870_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/lerc-4.0.0-hcca01a6_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libaec-1.1.4-ha6bc127_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libblas-3.11.0-4_he492b99_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.11.0-4_h9b27e0a_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libclang-cpp19.1-19.1.7-default_hc369343_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcurl-8.17.0-h7dd4100_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-21.1.7-h3d58e20_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-devel-19.1.7-h7c275be_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libcxx-headers-19.1.7-h707e725_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libdeflate-1.25-h517ebb2_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20250104-pl5321ha958ccf_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-h10d778d_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.7.3-heffb93a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.5.2-h750e83c_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libfreetype-2.14.1-h694c41f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libfreetype6-2.14.1-h6912278_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgcc-15.2.0-h08519bb_15.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgd-2.3.3-h8555400_11.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran-15.2.0-h7e5c614_15.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-15.2.0-hd16e46c_15.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libglib-2.86.3-hf241ffe_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libhiredis-1.0.2-h2beb688_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/libiconv-1.18-h57a12c2_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libintl-0.25.1-h3184127_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libjpeg-turbo-3.1.2-h8616949_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.11.0-4_h859234e_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libllvm19-19.1.7-h56e7563_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/liblzma-5.8.1-hd471939_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libmatio-1.5.29-hfe3de8b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.67.0-h3338091_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.30-openmp_h6006d49_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libpng-1.6.53-h380d223_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/librsvg-2.60.0-h2da6fc3_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.51.1-h6cc646a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.11.1-hed3591d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libtiff-4.7.1-ha0a348c_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libuv-1.51.0-h58003a5_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libwebp-base-1.6.0-hb807250_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libxml2-16-2.15.1-ha1d9b0f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libxml2-2.15.1-h7b7ecba_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-21.1.7-h472b3d1_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-tools-19-19.1.7-h879f4bc_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-tools-19.1.7-hb0207f0_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nanobind-2.10.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/ninja-1.13.2-hfc0b2d5_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/numpy-1.26.4-py312he3a82b2_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.6.0-h230baf5_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/pango-1.56.4-h6ef8af8_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/pcre2-10.47-h13923f0_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/pixman-0.46.4-ha059160_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/prek-0.2.21-h3c2ae71_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.12.12-h74c2667_1_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/readline-8.2-h7cca4af_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/rhash-1.4.6-h6e16a3a_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/scipy-1.16.3-py312he2acf2f_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sdkroot_env_osx-64-14.5-hbf94ba6_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/sigtool-0.1.3-h88f4db0_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/simde-0.8.2-h37c8870_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/tapi-1600.0.11.8-h8d8e812_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-hf689a15_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-1.3.1-hd23fc13_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda + osx-arm64: + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/_openmp_mutex-4.5-7_kmp_llvm.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/atk-1.0-2.38.0-hd03087b_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-hd037594_8.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.34.6-hc919400_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-compiler-1.11.0-h61f9b84_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cairo-1.18.4-h6a3b0d2_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/catch2-3.8.0-ha393de7_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ccache-4.11.3-hd7c7cec_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools-1030.6.3-llvm19_1_hd01ab73_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools_impl_osx-arm64-1030.6.3-llvm19_1_h8c76c84_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools_osx-arm64-1030.6.3-llvm19_1_h6d92914_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cereal-1.3.2-hd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang-19-19.1.7-default_h73dfc95_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang-19.1.7-default_hf9bcbb7_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang_impl_osx-arm64-19.1.7-h76e6a08_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang_osx-arm64-19.1.7-h07b0088_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx-19.1.7-default_h36137df_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx_impl_osx-arm64-19.1.7-h276745f_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx_osx-arm64-19.1.7-h07b0088_27.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cmake-4.2.1-h54ad630_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/compiler-rt-19.1.7-h855ad52_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-arm64-19.1.7-he32a8d3_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/cxx-compiler-1.11.0-h88570a1_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/doxygen-1.13.2-h493aca8_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/eigen-3.4.0-h49c215f_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/epoxy-1.5.10-hc919400_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/fontconfig-2.15.0-h1383a14_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-hc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/freetype-2.14.1-hce30654_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/fribidi-1.0.16-hc919400_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/gdk-pixbuf-2.44.4-h7542897_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/glib-tools-2.86.3-hb9d6e3a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/graphite2-1.3.14-hec049ff_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/graphviz-13.1.2-hcd33d8b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/gtk3-3.24.43-h5febe37_6.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/gts-0.7.6-he42f4ea_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/harfbuzz-12.2.0-haf38c7b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/hdf5-1.14.6-nompi_hd3baa01_104.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/hicolor-icon-theme-0.17-hce30654_2.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/icu-75.1-hfee45f7_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/krb5-1.21.3-h237132a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ld64-956.6-llvm19_1_he86490a_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ld64_osx-arm64-956.6-llvm19_1_h6922315_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/lerc-4.0.0-hd64df32_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libaec-1.1.4-h51d1e36_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libblas-3.11.0-4_h51639a9_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcblas-3.11.0-4_hb0561ab_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libclang-cpp19.1-19.1.7-default_h73dfc95_5.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcurl-8.17.0-hdece5d2_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-21.1.7-hf598326_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-devel-19.1.7-h6dc3340_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/libcxx-headers-19.1.7-h707e725_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libdeflate-1.25-hc11a715_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libedit-3.1.20250104-pl5321hafb1f1b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libev-4.33-h93a5062_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libexpat-2.7.3-haf25636_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libffi-3.5.2-he5f378a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libfreetype-2.14.1-hce30654_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libfreetype6-2.14.1-h6da58f4_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgcc-15.2.0-hcbb3090_16.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgd-2.3.3-hb2c3a21_11.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran-15.2.0-h07b0088_16.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran5-15.2.0-hdae7583_16.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libglib-2.86.3-hfe11c1f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libhiredis-1.0.2-hbec66e7_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libiconv-1.18-h23cfdf5_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libintl-0.25.1-h493aca8_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libjpeg-turbo-3.1.2-hc919400_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblapack-3.11.0-4_hd9741b5_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libllvm19-19.1.7-h8e0c9ce_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblzma-5.8.1-h39f12f2_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libmatio-1.5.29-hb3c5b3c_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libnghttp2-1.67.0-hc438710_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libopenblas-0.3.30-openmp_ha158390_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libpng-1.6.53-hfab5511_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/librsvg-2.60.0-h5c55ec3_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.51.1-h9a5124b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libssh2-1.11.1-h1590b86_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libtiff-4.7.1-h4030677_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libuv-1.51.0-h6caf38d_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libwebp-base-1.6.0-h07db88b_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libxml2-16-2.15.1-h0ff4647_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libxml2-2.15.1-h9329255_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.3.1-h8359307_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-21.1.7-h4a912ad_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-tools-19-19.1.7-h91fd4e7_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-tools-19.1.7-h855ad52_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nanobind-2.10.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ninja-1.13.2-h49c215f_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/numpy-1.26.4-py312h8442bc7_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.6.0-h5503f6c_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pango-1.56.4-h875632e_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pcre2-10.47-h30297fc_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pixman-0.46.4-h81086ad_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/prek-0.2.21-h8d80559_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/python-3.12.12-h18782d2_1_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/readline-8.2-h1d1bf99_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/rhash-1.4.6-h5505292_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/scipy-1.16.3-py312ha6bbf71_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sdkroot_env_osx-arm64-14.5-hfa17104_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/sigtool-0.1.3-h44b9a77_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/simde-0.8.2-h7b3277c_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/tapi-1600.0.11.8-h997e182_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-h892fb3f_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda + win-64: + - conda: https://conda.anaconda.org/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/bzip2-1.0.8-h0ad9c76_8.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-h4c7d964_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/cairo-1.18.4-h5782bbf_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/catch2-3.8.0-hc790b64_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ccache-4.11.3-h12b022e_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cereal-1.3.2-hd8ed1ab_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/cmake-4.2.1-hdcbee5b_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/cxx-compiler-1.11.0-h1c1089f_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/doxygen-1.13.2-hbf3f430_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/eigen-3.4.0-h477610d_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_3.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/fontconfig-2.15.0-h765892d_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-hc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/freetype-2.14.1-h57928b3_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/fribidi-1.0.16-hfd05255_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/getopt-win32-0.1-h6a83c73_3.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/graphite2-1.3.14-hac47afa_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/graphviz-13.1.2-ha5e8f4b_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/gts-0.7.6-h6b5321d_4.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/harfbuzz-12.2.0-h5f2951f_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/hdf5-1.14.6-nompi_h89f0904_104.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/icu-75.1-he0c23c2_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/krb5-1.21.3-hdf4eb48_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/lerc-4.0.0-h6470a55_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libaec-1.1.4-h20038f6_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libblas-3.11.0-4_hf2e6a31_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libcblas-3.11.0-4_h2a3cdd5_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libcurl-8.17.0-h43ecb02_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libdeflate-1.25-h51727cc_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libexpat-2.7.3-hac47afa_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libffi-3.5.2-h52bdfb6_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libfreetype-2.14.1-h57928b3_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libfreetype6-2.14.1-hdbac1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libgcc-15.2.0-h8ee18e1_16.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libgd-2.3.3-h7208af6_11.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libglib-2.86.3-h0c9aed9_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libgomp-15.2.0-h8ee18e1_16.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libhiredis-1.0.2-h0e60522_0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/win-64/libhwloc-2.12.1-default_h4379cf1_1003.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libiconv-1.18-hc1393d2_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libintl-0.22.5-h5728263_3.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libjpeg-turbo-3.1.2-hfd05255_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/liblapack-3.11.0-4_hf9ab0e9_mkl.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/liblzma-5.8.1-h2466b09_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libmatio-1.5.29-h138d27d_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libpng-1.6.53-h7351971_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.51.1-hf5d6505_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libssh2-1.11.1-h9aa295b_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libtiff-4.7.1-h8f73337_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libuv-1.51.0-hfd05255_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libwebp-base-1.6.0-h4d5522a_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libwinpthread-12.0.0.r4.gg4f2fc60ca-h57928b3_10.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libxcb-1.17.0-h0e4246c_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libxml2-16-2.15.1-h06f855e_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libxml2-2.15.1-ha29bfb0_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/llvm-openmp-21.1.7-h4fa8253_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/mkl-2025.3.0-hac47afa_454.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/nanobind-2.10.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ninja-1.13.2-h477610d_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/numpy-1.26.4-py312h8753938_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/openssl-3.6.0-h725018a_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.56.4-h03d888a_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/pcre2-10.47-hd2b5f0e_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/pixman-0.46.4-h5112557_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/prek-0.2.21-h18a1a76_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/pthread-stubs-0.4-h0e40799_1002.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/python-3.12.12-h0159041_1_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/scipy-1.16.3-py312hd0164fe_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/simde-0.8.2-hc790b64_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/tbb-2022.3.0-hd094cb3_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/tk-8.6.13-h2c6b04d_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.26100.0-h57928b3_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-h2b53caa_33.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.44.35208-h818238b_33.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vcomp14-14.44.35208-h818238b_33.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.44.35208-h38c0c73_33.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/vs2022_win-64-19.44.35207-ha74f236_33.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/vswhere-3.1.7-h40126e0_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libice-1.1.2-h0e40799_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libsm-1.2.6-h0e40799_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libx11-1.8.12-hf48077a_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxau-1.0.12-hba3369d_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxdmcp-1.1.5-hba3369d_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxext-1.3.6-h0e40799_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxpm-3.5.17-h0e40799_1.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxt-1.3.1-h0e40799_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/zlib-1.3.1-h2466b09_2.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda +packages: +- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: https://conda.anaconda.org/conda-forge/osx-64/_openmp_mutex-4.5-7_kmp_llvm.conda + build_number: 7 + sha256: 30006902a9274de8abdad5a9f02ef7c8bb3d69a503486af0c1faee30b023e5b7 + md5: eaac87c21aff3ed21ad9656697bb8326 + depends: + - llvm-openmp >=9.0.1 + license: BSD-3-Clause + license_family: BSD + size: 8328 + timestamp: 1764092562779 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/_openmp_mutex-4.5-7_kmp_llvm.conda + build_number: 7 + sha256: 7acaa2e0782cad032bdaf756b536874346ac1375745fb250e9bdd6a48a7ab3cd + md5: a44032f282e7d2acdeb1c240308052dd + depends: + - llvm-openmp >=9.0.1 + license: BSD-3-Clause + license_family: BSD + size: 8325 + timestamp: 1764092507920 +- conda: https://conda.anaconda.org/conda-forge/win-64/_openmp_mutex-4.5-2_gnu.conda + build_number: 8 + sha256: 1a62cd1f215fe0902e7004089693a78347a30ad687781dfda2289cab000e652d + md5: 37e16618af5c4851a3f3d66dd0e11141 + depends: + - libgomp >=7.5.0 + - libwinpthread >=12.0.0.r2.ggc561118da + constrains: + - openmp_impl 9999 + - msys2-conda-epoch <0.0a0 + license: BSD-3-Clause + license_family: BSD + size: 49468 + timestamp: 1718213032772 +- conda: https://conda.anaconda.org/conda-forge/noarch/adwaita-icon-theme-49.0-unix_0.conda + sha256: a362b4f5c96a0bf4def96be1a77317e2730af38915eb9bec85e2a92836501ed7 + md5: b3f0179590f3c0637b7eb5309898f79e + depends: + - __unix + - hicolor-icon-theme + - librsvg + license: LGPL-3.0-or-later OR CC-BY-SA-3.0 + license_family: LGPL + size: 631452 + timestamp: 1758743294412 +- conda: https://conda.anaconda.org/conda-forge/linux-64/at-spi2-atk-2.38.0-h0630a04_3.tar.bz2 + sha256: 26ab9386e80bf196e51ebe005da77d57decf6d989b4f34d96130560bc133479c + md5: 6b889f174df1e0f816276ae69281af4d + depends: + - at-spi2-core >=2.40.0,<2.41.0a0 + - atk-1.0 >=2.36.0 + - dbus >=1.13.6,<2.0a0 + - libgcc-ng >=9.3.0 + - libglib >=2.68.1,<3.0a0 + license: LGPL-2.1-or-later + license_family: LGPL + size: 339899 + timestamp: 1619122953439 +- conda: https://conda.anaconda.org/conda-forge/linux-64/at-spi2-core-2.40.3-h0630a04_0.tar.bz2 + sha256: c4f9b66bd94c40d8f1ce1fad2d8b46534bdefda0c86e3337b28f6c25779f258d + md5: 8cb2fc4cd6cc63f1369cfa318f581cc3 + depends: + - dbus >=1.13.6,<2.0a0 + - libgcc-ng >=9.3.0 + - libglib >=2.68.3,<3.0a0 + - xorg-libx11 + - xorg-libxi + - xorg-libxtst + license: LGPL-2.1-or-later + license_family: LGPL + size: 658390 + timestamp: 1625848454791 +- conda: https://conda.anaconda.org/conda-forge/linux-64/atk-1.0-2.38.0-h04ea711_2.conda + sha256: df682395d05050cd1222740a42a551281210726a67447e5258968dd55854302e + md5: f730d54ba9cd543666d7220c9f7ed563 + depends: + - libgcc-ng >=12 + - libglib >=2.80.0,<3.0a0 + - libstdcxx-ng >=12 + constrains: + - atk-1.0 2.38.0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 355900 + timestamp: 1713896169874 +- conda: https://conda.anaconda.org/conda-forge/osx-64/atk-1.0-2.38.0-h4bec284_2.conda + sha256: a5972a943764e46478c966b26be61de70dcd7d0cfda4bd0b0c46916ae32e0492 + md5: d9684247c943d492d9aac8687bc5db77 + depends: + - __osx >=10.9 + - libcxx >=16 + - libglib >=2.80.0,<3.0a0 + - libintl >=0.22.5,<1.0a0 + constrains: + - atk-1.0 2.38.0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 349989 + timestamp: 1713896423623 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/atk-1.0-2.38.0-hd03087b_2.conda + sha256: b0747f9b1bc03d1932b4d8c586f39a35ac97e7e72fe6e63f2b2a2472d466f3c1 + md5: 57301986d02d30d6805fdce6c99074ee + depends: + - __osx >=11.0 + - libcxx >=16 + - libglib >=2.80.0,<3.0a0 + - libintl >=0.22.5,<1.0a0 + constrains: + - atk-1.0 2.38.0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 347530 + timestamp: 1713896411580 +- conda: https://conda.anaconda.org/conda-forge/linux-64/binutils-2.45-default_h4852527_104.conda + sha256: 1625ea421e0f44dbdde01e3e7d2c4958bea6c55731e6ac6954ba912d339982c2 + md5: d351e4894d6c4d9d8775bf169a97089d + depends: + - binutils_impl_linux-64 >=2.45,<2.46.0a0 + license: GPL-3.0-only + license_family: GPL + size: 35316 + timestamp: 1764007880473 +- conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.45-default_hfdba357_104.conda + sha256: 054a77ccab631071a803737ea8e5d04b5b18e57db5b0826a04495bd3fdf39a7c + md5: a7a67bf132a4a2dea92a7cb498cdc5b1 + depends: + - ld_impl_linux-64 2.45 default_hbd61a6d_104 + - sysroot_linux-64 + - zstd >=1.5.7,<1.6.0a0 + license: GPL-3.0-only + license_family: GPL + size: 3747046 + timestamp: 1764007847963 +- conda: https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.45-default_h4852527_104.conda + sha256: ed23fee4db69ad82320cca400fc77404c3874cd866606651a20bf743acd1a9b1 + md5: e30e71d685e23cc1e5ac1c1990ba1f81 + depends: + - binutils_impl_linux-64 2.45 default_hfdba357_104 + license: GPL-3.0-only + license_family: GPL + size: 36180 + timestamp: 1764007883258 +- conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hda65f42_8.conda + sha256: c30daba32ddebbb7ded490f0e371eae90f51e72db620554089103b4a6934b0d5 + md5: 51a19bba1b8ebfb60df25cde030b7ebc + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: bzip2-1.0.6 + license_family: BSD + size: 260341 + timestamp: 1757437258798 +- conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h500dc9f_8.conda + sha256: 8f50b58efb29c710f3cecf2027a8d7325ba769ab10c746eff75cea3ac050b10c + md5: 97c4b3bd8a90722104798175a1bdddbf + depends: + - __osx >=10.13 + license: bzip2-1.0.6 + license_family: BSD + size: 132607 + timestamp: 1757437730085 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-hd037594_8.conda + sha256: b456200636bd5fecb2bec63f7e0985ad2097cf1b83d60ce0b6968dffa6d02aa1 + md5: 58fd217444c2a5701a44244faf518206 + depends: + - __osx >=11.0 + license: bzip2-1.0.6 + license_family: BSD + size: 125061 + timestamp: 1757437486465 +- conda: https://conda.anaconda.org/conda-forge/win-64/bzip2-1.0.8-h0ad9c76_8.conda + sha256: d882712855624641f48aa9dc3f5feea2ed6b4e6004585d3616386a18186fe692 + md5: 1077e9333c41ff0be8edd1a5ec0ddace + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: bzip2-1.0.6 + license_family: BSD + size: 55977 + timestamp: 1757437738856 +- conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.34.6-hb03c661_0.conda + sha256: cc9accf72fa028d31c2a038460787751127317dcfa991f8d1f1babf216bb454e + md5: 920bb03579f15389b9e512095ad995b7 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 207882 + timestamp: 1765214722852 +- conda: https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.34.6-hb5e19a0_0.conda + sha256: 2f5bc0292d595399df0d168355b4e9820affc8036792d6984bd751fdda2bcaea + md5: fc9a153c57c9f070bebaa7eef30a8f17 + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 186122 + timestamp: 1765215100384 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.34.6-hc919400_0.conda + sha256: 2995f2aed4e53725e5efbc28199b46bf311c3cab2648fc4f10c2227d6d5fa196 + md5: bcb3cba70cf1eec964a03b4ba7775f01 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 180327 + timestamp: 1765215064054 +- conda: https://conda.anaconda.org/conda-forge/linux-64/c-compiler-1.11.0-h4d9bdce_0.conda + sha256: 8e7a40f16400d7839c82581410aa05c1f8324a693c9d50079f8c50dc9fb241f0 + md5: abd85120de1187b0d1ec305c2173c71b + depends: + - binutils + - gcc + - gcc_linux-64 14.* + license: BSD-3-Clause + license_family: BSD + size: 6693 + timestamp: 1753098721814 +- conda: https://conda.anaconda.org/conda-forge/osx-64/c-compiler-1.11.0-h7a00415_0.conda + sha256: 2bd1cf3d26789b7e1d04e914ccd169bd618fceed68abf7b6a305266b88dcf861 + md5: 2b23ec416cef348192a5a17737ddee60 + depends: + - cctools >=949.0.1 + - clang_osx-64 19.* + - ld64 >=530 + - llvm-openmp + license: BSD-3-Clause + license_family: BSD + size: 6695 + timestamp: 1753098825695 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-compiler-1.11.0-h61f9b84_0.conda + sha256: b51bd1551cfdf41500f732b4bd1e4e70fb1e74557165804a648f32fa9c671eec + md5: 148516e0c9edf4e9331a4d53ae806a9b + depends: + - cctools >=949.0.1 + - clang_osx-arm64 19.* + - ld64 >=530 + - llvm-openmp + license: BSD-3-Clause + license_family: BSD + size: 6697 + timestamp: 1753098737760 +- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-h4c7d964_0.conda + sha256: 686a13bd2d4024fc99a22c1e0e68a7356af3ed3304a8d3ff6bb56249ad4e82f0 + md5: f98fb7db808b94bc1ec5b0e62f9f1069 + depends: + - __win + license: ISC + size: 152827 + timestamp: 1762967310929 +- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.11.12-hbd8a1cb_0.conda + sha256: b986ba796d42c9d3265602bc038f6f5264095702dd546c14bc684e60c385e773 + md5: f0991f0f84902f6b6009b4d2350a83aa + depends: + - __unix + license: ISC + size: 152432 + timestamp: 1762967197890 +- conda: https://conda.anaconda.org/conda-forge/linux-64/cairo-1.18.4-h3394656_0.conda + sha256: 3bd6a391ad60e471de76c0e9db34986c4b5058587fbf2efa5a7f54645e28c2c7 + md5: 09262e66b19567aff4f592fb53b28760 + depends: + - __glibc >=2.17,<3.0.a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libgcc >=13 + - libglib >=2.82.2,<3.0a0 + - libpng >=1.6.47,<1.7.0a0 + - libstdcxx >=13 + - libxcb >=1.17.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pixman >=0.44.2,<1.0a0 + - xorg-libice >=1.1.2,<2.0a0 + - xorg-libsm >=1.2.5,<2.0a0 + - xorg-libx11 >=1.8.11,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxrender >=0.9.12,<0.10.0a0 + license: LGPL-2.1-only or MPL-1.1 + size: 978114 + timestamp: 1741554591855 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cairo-1.18.4-h950ec3b_0.conda + sha256: d4297c3a9bcff9add3c5a46c6e793b88567354828bcfdb6fc9f6b1ab34aa4913 + md5: 32403b4ef529a2018e4d8c4f2a719f16 + depends: + - __osx >=10.13 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libcxx >=18 + - libexpat >=2.6.4,<3.0a0 + - libglib >=2.82.2,<3.0a0 + - libpng >=1.6.47,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - pixman >=0.44.2,<1.0a0 + license: LGPL-2.1-only or MPL-1.1 + size: 893252 + timestamp: 1741554808521 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cairo-1.18.4-h6a3b0d2_0.conda + sha256: 00439d69bdd94eaf51656fdf479e0c853278439d22ae151cabf40eb17399d95f + md5: 38f6df8bc8c668417b904369a01ba2e2 + depends: + - __osx >=11.0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libcxx >=18 + - libexpat >=2.6.4,<3.0a0 + - libglib >=2.82.2,<3.0a0 + - libpng >=1.6.47,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - pixman >=0.44.2,<1.0a0 + license: LGPL-2.1-only or MPL-1.1 + size: 896173 + timestamp: 1741554795915 +- conda: https://conda.anaconda.org/conda-forge/win-64/cairo-1.18.4-h5782bbf_0.conda + sha256: b9f577bddb033dba4533e851853924bfe7b7c1623d0697df382eef177308a917 + md5: 20e32ced54300292aff690a69c5e7b97 + depends: + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libglib >=2.82.2,<3.0a0 + - libpng >=1.6.47,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - pixman >=0.44.2,<1.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: LGPL-2.1-only or MPL-1.1 + size: 1524254 + timestamp: 1741555212198 +- conda: https://conda.anaconda.org/conda-forge/linux-64/catch2-3.8.0-h84d6215_0.conda + sha256: cf21c527c0a880b839e29fc35fcc3cfaf5811b1a5c6afc653b309d23148169b6 + md5: a4e9adc77b94f8a265a9f91cfbdca8e9 + depends: + - __glibc >=2.17,<3.0.a0 + license: BSL-1.0 + size: 649592 + timestamp: 1736183002075 +- conda: https://conda.anaconda.org/conda-forge/osx-64/catch2-3.8.0-h9275861_0.conda + sha256: ee08f4b6b95559a0aea9d0edb3ae82abef74743d18fc0d3519d485d081385c52 + md5: 6abe08b4cb4538779f4e76dcad6d59a0 + depends: + - __osx >=10.13 + license: BSL-1.0 + size: 544287 + timestamp: 1736183076850 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/catch2-3.8.0-ha393de7_0.conda + sha256: f04c5ff8a906700b43544b89c9567ece6b6dc22eb9198e30042344c99cc88ab0 + md5: 46c4cc35f5769ece21774d2fead22fae + depends: + - __osx >=11.0 + license: BSL-1.0 + size: 544258 + timestamp: 1736183069430 +- conda: https://conda.anaconda.org/conda-forge/win-64/catch2-3.8.0-hc790b64_0.conda + sha256: 76b6341f2c3843d1c0090dd468e3af11f29d1c9f5ccc9fbedab0f0c7768b4356 + md5: 8c1e09f7bdb66877f24f2f6685c25c0b + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSL-1.0 + size: 1652455 + timestamp: 1736183077482 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ccache-4.11.3-h80c52d3_0.conda + sha256: ac9464a60a7b085b5a999aaf33d882705390d7749b35e320f639614ae0cc9474 + md5: eb517c6a2b960c3ccb6f1db1005f063a + depends: + - libgcc >=13 + - libstdcxx >=13 + - libgcc >=13 + - __glibc >=2.17,<3.0.a0 + - zstd >=1.5.7,<1.6.0a0 + - libhiredis >=1.0.2,<1.1.0a0 + license: GPL-3.0-only + license_family: GPL + size: 708908 + timestamp: 1746271484780 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ccache-4.11.3-h33566b8_0.conda + sha256: 18a6e6056717c1b160055aa889793bf8b1a25d92c4e7cc51c1cf6d094967f888 + md5: b65cad834bd6c1f660c101cca09430bf + depends: + - __osx >=10.13 + - libcxx >=18 + - libhiredis >=1.0.2,<1.1.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: GPL-3.0-only + license_family: GPL + size: 613659 + timestamp: 1746271525759 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ccache-4.11.3-hd7c7cec_0.conda + sha256: ea06d8117291952c2c4cc8435080a0d3afd411b8751a85c3bbd288735fb5d4f4 + md5: 7fe1ee81492f43731ea583b4bee50b8b + depends: + - libcxx >=18 + - __osx >=11.0 + - zstd >=1.5.7,<1.6.0a0 + - libhiredis >=1.0.2,<1.1.0a0 + license: GPL-3.0-only + license_family: GPL + size: 564069 + timestamp: 1746271610324 +- conda: https://conda.anaconda.org/conda-forge/win-64/ccache-4.11.3-h12b022e_0.conda + sha256: 8f2c7d62466fee70a9ff587365a170d851126c8ee18ecd4c806d3b53b1397499 + md5: 3f74f1227d497b1fedb29bb1adda6af2 + depends: + - ucrt + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + - ucrt >=10.0.20348.0 + - libhiredis >=1.0.2,<1.1.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: GPL-3.0-only + license_family: GPL + size: 663569 + timestamp: 1746271514872 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cctools-1030.6.3-llvm19_1_h67a6458_1.conda + sha256: 022d1510394e6f87f9c0f5e4093f7def220b4f73b9c4082a5032600983f43e90 + md5: c49fac70cb3983cdc72b73e065818547 + depends: + - cctools_impl_osx-64 1030.6.3 llvm19_1_h3b512aa_1 + - ld64 956.6 llvm19_1_hc3792c1_1 + - libllvm19 >=19.1.7,<19.2.0a0 + license: APSL-2.0 + license_family: Other + size: 23796 + timestamp: 1764352039846 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools-1030.6.3-llvm19_1_hd01ab73_1.conda + sha256: 033496e014776d9898b328d09a5416056d88698ffe404b460f595fca4708cdb2 + md5: 4df7fec2dac84a966f9de8addd561561 + depends: + - cctools_impl_osx-arm64 1030.6.3 llvm19_1_h8c76c84_1 + - ld64 956.6 llvm19_1_he86490a_1 + - libllvm19 >=19.1.7,<19.2.0a0 + license: APSL-2.0 + license_family: Other + size: 23893 + timestamp: 1764351984540 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cctools_impl_osx-64-1030.6.3-llvm19_1_h3b512aa_1.conda + sha256: ed7298e419b36aed5c8d915dc79936f0a95603666bf4e57c5df7022bad524462 + md5: 83c976080e0875efe1592a01de00f529 + depends: + - __osx >=10.13 + - ld64_osx-64 >=956.6,<956.7.0a0 + - libcxx + - libllvm19 >=19.1.7,<19.2.0a0 + - libzlib >=1.3.1,<2.0a0 + - llvm-tools 19.1.* + - sigtool + constrains: + - cctools 1030.6.3.* + - clang 19.1.* + - ld64 956.6.* + license: APSL-2.0 + license_family: Other + size: 742502 + timestamp: 1764351982024 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools_impl_osx-arm64-1030.6.3-llvm19_1_h8c76c84_1.conda + sha256: 5e05ba274cc02999ba55b18707f569ae989001990c9224f1cb5d24e5e41abab1 + md5: 296de61644a3372f5cf13f266eb6ad88 + depends: + - __osx >=11.0 + - ld64_osx-arm64 >=956.6,<956.7.0a0 + - libcxx + - libllvm19 >=19.1.7,<19.2.0a0 + - libzlib >=1.3.1,<2.0a0 + - llvm-tools 19.1.* + - sigtool + constrains: + - clang 19.1.* + - ld64 956.6.* + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 748995 + timestamp: 1764351939668 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cctools_osx-64-1030.6.3-llvm19_1_h8f0d4bb_1.conda + sha256: c7d38c684bee7fd107a8da6fc1729d39708f20d8d281f987f20584827effc8e5 + md5: faa9269cd8b17ee3d3721ddabfb72af2 + depends: + - cctools_impl_osx-64 1030.6.3 llvm19_1_h3b512aa_1 + - ld64_osx-64 956.6 llvm19_1_h466f870_1 + constrains: + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 22806 + timestamp: 1764352046500 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cctools_osx-arm64-1030.6.3-llvm19_1_h6d92914_1.conda + sha256: afd2a39a526a5a80abb4315e427afa18db33cf4ae82bd8d1437f2effb8d816dd + md5: e9d1109b5313ca4969210c3bedec6f0b + depends: + - cctools_impl_osx-arm64 1030.6.3 llvm19_1_h8c76c84_1 + - ld64_osx-arm64 956.6 llvm19_1_h6922315_1 + constrains: + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 22887 + timestamp: 1764351991415 +- conda: https://conda.anaconda.org/conda-forge/noarch/cereal-1.3.2-hd8ed1ab_0.tar.bz2 + sha256: 7a5658be83dd9a3c0202dc47483304c8e0f5814a45699b2d86e1c3877eb8ae7a + md5: 02af9a05bd50bb5ad948c71df6e9c09a + license: BSD-3-Clause + license_family: BSD + size: 204827 + timestamp: 1646057445170 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clang-19.1.7-default_h1323312_5.conda + sha256: 5bcabcc3a5689bc47dbd6a58a3a785f8fe3f4e91410a299392d9cdf7ae7c16d6 + md5: 5bd21a5ea37ab0fbe1d9cbba4e0e7c80 + depends: + - clang-19 19.1.7 default_hc369343_5 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 24455 + timestamp: 1759436889569 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang-19.1.7-default_hf9bcbb7_5.conda + sha256: 6e9cb7e80a41dbbfd95e86d87c8e5dafc3171aadda16ca33a1e2136748267318 + md5: 6773a2b7d7d1b0a8d0e0f3bf4e928936 + depends: + - clang-19 19.1.7 default_h73dfc95_5 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 24502 + timestamp: 1759435412103 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clang-19-19.1.7-default_hc369343_5.conda + sha256: 2631c79a027ee8b9c2d4d0a458f0588e8fe03fe1dfb3e3bcd47e7b0f4d0d2175 + md5: b37d33a750251c79214c812eca726241 + depends: + - __osx >=10.13 + - libclang-cpp19.1 19.1.7 default_hc369343_5 + - libcxx >=19.1.7 + - libllvm19 >=19.1.7,<19.2.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 765727 + timestamp: 1759436729883 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang-19-19.1.7-default_h73dfc95_5.conda + sha256: f1c8f4e8735918aacd7cab058fff389fc639d4537221753f0e9b44e120892f9a + md5: 561b822bdb2c1bb41e16e59a090f1e36 + depends: + - __osx >=11.0 + - libclang-cpp19.1 19.1.7 default_h73dfc95_5 + - libcxx >=19.1.7 + - libllvm19 >=19.1.7,<19.2.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 763853 + timestamp: 1759435247449 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clang_impl_osx-64-19.1.7-hc73cdc9_27.conda + sha256: 91949f054bea546c96ccd0a464fb971f55c147fcfcf1683c3d6df222fb2649df + md5: 0f5c599f789d15ddf11cb0e343588743 + depends: + - cctools_impl_osx-64 + - clang 19.1.7.* + - compiler-rt 19.1.7.* + - ld64_osx-64 + - llvm-tools 19.1.7.* + license: BSD-3-Clause + license_family: BSD + size: 17820 + timestamp: 1764625406755 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang_impl_osx-arm64-19.1.7-h76e6a08_27.conda + sha256: c2a769bca158b4e96caf6927a533468be3755fdcdb3e9ffd903d656864248978 + md5: 2fb912af00fa523f5968855053bebd13 + depends: + - cctools_impl_osx-arm64 + - clang 19.1.7.* + - compiler-rt 19.1.7.* + - ld64_osx-arm64 + - llvm-tools 19.1.7.* + license: BSD-3-Clause + license_family: BSD + size: 17929 + timestamp: 1764805936442 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clang_osx-64-19.1.7-h7e5c614_27.conda + sha256: e29dd3ebc13e3e33e17c2ed1561eb52a1308c9c1a7b91c88038172427a158506 + md5: 81dff8cc175be65e604e3ccea6da31e5 + depends: + - cctools_osx-64 + - clang_impl_osx-64 19.1.7 hc73cdc9_27 + - sdkroot_env_osx-64 + license: BSD-3-Clause + license_family: BSD + size: 20676 + timestamp: 1764625412796 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clang_osx-arm64-19.1.7-h07b0088_27.conda + sha256: a24d4db1aeb7a5af638a0f329d5048334efe436c0df3a6174fca9d5cdc58a293 + md5: 0c9ac1e5d33185824ced44ce0aeab0b2 + depends: + - cctools_osx-arm64 + - clang_impl_osx-arm64 19.1.7 h76e6a08_27 + - sdkroot_env_osx-arm64 + license: BSD-3-Clause + license_family: BSD + size: 20687 + timestamp: 1764805944215 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx-19.1.7-default_h1c12a56_5.conda + sha256: 6553c7b6a898bd00c218656d3438dc3a70f2bb79f795ce461792c55304558af2 + md5: 6b6f3133d60b448c0f12885f53d5ed09 + depends: + - clang 19.1.7 default_h1323312_5 + - libcxx-devel 19.1.* + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 24505 + timestamp: 1759436910517 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx-19.1.7-default_h36137df_5.conda + sha256: f8f94321aee9ad83cb1cdf90660885fccb482c34c82ba84c2c167d452376834f + md5: c11a3a5a0cdb74d8ce58c6eac8d1f662 + depends: + - clang 19.1.7 default_hf9bcbb7_5 + - libcxx-devel 19.1.* + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 24587 + timestamp: 1759435427954 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx_impl_osx-64-19.1.7-hb295874_27.conda + sha256: a341859ba006115a3cfb317e965fa2d7e5a98cbe528243fc5d2cc4e332ffedfb + md5: 68725df746a09ac0e478257d428cacd4 + depends: + - clang_osx-64 19.1.7 h7e5c614_27 + - clangxx 19.1.7.* + - libcxx >=19 + - libllvm19 >=19.1.7,<19.2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 17941 + timestamp: 1764625475254 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx_impl_osx-arm64-19.1.7-h276745f_27.conda + sha256: 377bc9cfe951cd033dff0a58a7a1f369f5fe81924acb424c79a0df3fb742c008 + md5: 834e2e73c7a45604603b5e586f53a377 + depends: + - clang_osx-arm64 19.1.7 h07b0088_27 + - clangxx 19.1.7.* + - libcxx >=19 + - libllvm19 >=19.1.7,<19.2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 18109 + timestamp: 1764806027775 +- conda: https://conda.anaconda.org/conda-forge/osx-64/clangxx_osx-64-19.1.7-h7e5c614_27.conda + sha256: 7dd3a43f5928d0142b5a20a8ea51a1890efe230aefd8a2626ebfdf1a9f3868c1 + md5: 5694e4751c86342d62ccf766c5113d8e + depends: + - cctools_osx-64 + - clang_osx-64 19.1.7 h7e5c614_27 + - clangxx_impl_osx-64 19.1.7 hb295874_27 + - sdkroot_env_osx-64 + license: BSD-3-Clause + license_family: BSD + size: 19513 + timestamp: 1764625479964 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/clangxx_osx-arm64-19.1.7-h07b0088_27.conda + sha256: c139935517fbe55365f7df91bba9753f6ec1015224e144b547f77b27832d9fda + md5: de5434190db50b34f78341ae3c58cb1b + depends: + - cctools_osx-arm64 + - clang_osx-arm64 19.1.7 h07b0088_27 + - clangxx_impl_osx-arm64 19.1.7 h276745f_27 + - sdkroot_env_osx-arm64 + license: BSD-3-Clause + license_family: BSD + size: 19489 + timestamp: 1764806032158 +- conda: https://conda.anaconda.org/conda-forge/linux-64/cmake-4.2.1-hc85cc9f_0.conda + sha256: 655db6eddb370306d6d0ed3ac1d679ca044e45e03a43fc98cccfc5cafc341c5f + md5: e4afa0cb7943cc9810546f70f02223d5 + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libexpat >=2.7.3,<3.0a0 + - libgcc >=14 + - liblzma >=5.8.1,<6.0a0 + - libstdcxx >=14 + - libuv >=1.51.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - rhash >=1.4.6,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: BSD-3-Clause + license_family: BSD + size: 22303088 + timestamp: 1765229009574 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cmake-4.2.1-h29fc008_0.conda + sha256: 989feb0c5aedeb03dc35e7e0dd90281563b3ad4f7b95b04d46e1bffe862aacbe + md5: e2966bf6d01371caad0980c1e300dd89 + depends: + - __osx >=10.13 + - bzip2 >=1.0.8,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libcxx >=19 + - libexpat >=2.7.3,<3.0a0 + - liblzma >=5.8.1,<6.0a0 + - libuv >=1.51.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - rhash >=1.4.6,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: BSD-3-Clause + license_family: BSD + size: 18958048 + timestamp: 1765229793999 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cmake-4.2.1-h54ad630_0.conda + sha256: a881f3379ff18a98bbc2456e9a74d748bdbd930799c2b98dd266733b0d8fbd90 + md5: 11a1d109b6d7882b5f2f93fe9824af4a + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libcxx >=19 + - libexpat >=2.7.3,<3.0a0 + - liblzma >=5.8.1,<6.0a0 + - libuv >=1.51.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - rhash >=1.4.6,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: BSD-3-Clause + license_family: BSD + size: 17740888 + timestamp: 1765231308407 +- conda: https://conda.anaconda.org/conda-forge/win-64/cmake-4.2.1-hdcbee5b_0.conda + sha256: 03d85d6493ad6c410708f243aeb680c491075c89f0cae7e3afab718f27f28967 + md5: dd8c71fb422275f652743068455e9acd + depends: + - bzip2 >=1.0.8,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libexpat >=2.7.3,<3.0a0 + - liblzma >=5.8.1,<6.0a0 + - libuv >=1.51.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc14_runtime >=14.44.35208 + - zstd >=1.5.7,<1.6.0a0 + license: BSD-3-Clause + license_family: BSD + size: 15739640 + timestamp: 1765230626010 +- conda: https://conda.anaconda.org/conda-forge/osx-64/compiler-rt-19.1.7-he914875_1.conda + sha256: 28e5f0a6293acba68ebc54694a2fc40b1897202735e8e8cbaaa0e975ba7b235b + md5: e6b9e71e5cb08f9ed0185d31d33a074b + depends: + - __osx >=10.13 + - clang 19.1.7.* + - compiler-rt_osx-64 19.1.7.* + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 96722 + timestamp: 1757412473400 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/compiler-rt-19.1.7-h855ad52_1.conda + sha256: b58a481828aee699db7f28bfcbbe72fb133277ac60831dfe70ee2465541bcb93 + md5: 39451684370ae65667fa5c11222e43f7 + depends: + - __osx >=11.0 + - clang 19.1.7.* + - compiler-rt_osx-arm64 19.1.7.* + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 97085 + timestamp: 1757411887557 +- conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-64-19.1.7-h138dee1_1.conda + sha256: e6effe89523fc6143819f7a68372b28bf0c176af5b050fe6cf75b62e9f6c6157 + md5: 32deecb68e11352deaa3235b709ddab2 + depends: + - clang 19.1.7.* + constrains: + - compiler-rt 19.1.7 + - clangxx 19.1.7 + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 10425780 + timestamp: 1757412396490 +- conda: https://conda.anaconda.org/conda-forge/noarch/compiler-rt_osx-arm64-19.1.7-he32a8d3_1.conda + sha256: 8c32a3db8adf18ed58197e8895ce4f24a83ed63c817512b9a26724753b116f2a + md5: 8d99c82e0f5fed6cc36fcf66a11e03f0 + depends: + - clang 19.1.7.* + constrains: + - compiler-rt 19.1.7 + - clangxx 19.1.7 + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 10490535 + timestamp: 1757411851093 +- conda: https://conda.anaconda.org/conda-forge/linux-64/conda-gcc-specs-14.3.0-he8ccf15_16.conda + sha256: 387cd20bc18c9cabae357fec1b73f691b8b6a6bafbf843b8ff17241eae0dd1d5 + md5: 77e54ea3bd0888e65ed821f19f5d23ad + depends: + - gcc_impl_linux-64 >=14.3.0,<14.3.1.0a0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 31314 + timestamp: 1765256147792 +- conda: https://conda.anaconda.org/conda-forge/linux-64/cxx-compiler-1.11.0-hfcd1e18_0.conda + sha256: 3fcc97ae3e89c150401a50a4de58794ffc67b1ed0e1851468fcc376980201e25 + md5: 5da8c935dca9186673987f79cef0b2a5 + depends: + - c-compiler 1.11.0 h4d9bdce_0 + - gxx + - gxx_linux-64 14.* + license: BSD-3-Clause + license_family: BSD + size: 6635 + timestamp: 1753098722177 +- conda: https://conda.anaconda.org/conda-forge/osx-64/cxx-compiler-1.11.0-h307afc9_0.conda + sha256: d6976f8d8b51486072abfe1e76a733688380dcbd1a8e993a43d59b80f7288478 + md5: 463bb03bb27f9edc167fb3be224efe96 + depends: + - c-compiler 1.11.0 h7a00415_0 + - clangxx_osx-64 19.* + license: BSD-3-Clause + license_family: BSD + size: 6732 + timestamp: 1753098827160 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/cxx-compiler-1.11.0-h88570a1_0.conda + sha256: 99800d97a3a2ee9920dfc697b6d4c64e46dc7296c78b1b6c746ff1c24dea5e6c + md5: 043afed05ca5a0f2c18252ae4378bdee + depends: + - c-compiler 1.11.0 h61f9b84_0 + - clangxx_osx-arm64 19.* + license: BSD-3-Clause + license_family: BSD + size: 6715 + timestamp: 1753098739952 +- conda: https://conda.anaconda.org/conda-forge/win-64/cxx-compiler-1.11.0-h1c1089f_0.conda + sha256: c888f4fe9ec117c1c01bfaa4c722ca475ebbb341c92d1718afa088bb0d710619 + md5: 4d94d3c01add44dc9d24359edf447507 + depends: + - vs2022_win-64 + license: BSD-3-Clause + license_family: BSD + size: 6957 + timestamp: 1753098809481 +- conda: https://conda.anaconda.org/conda-forge/linux-64/dbus-1.16.2-h24cb091_1.conda + sha256: 8bb557af1b2b7983cf56292336a1a1853f26555d9c6cecf1e5b2b96838c9da87 + md5: ce96f2f470d39bd96ce03945af92e280 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libstdcxx >=14 + - libzlib >=1.3.1,<2.0a0 + - libglib >=2.86.2,<3.0a0 + - libexpat >=2.7.3,<3.0a0 + license: AFL-2.1 OR GPL-2.0-or-later + size: 447649 + timestamp: 1764536047944 +- conda: https://conda.anaconda.org/conda-forge/linux-64/doxygen-1.13.2-h8e693c7_0.conda + sha256: 349c4c872357b4a533e127b2ade8533796e8e062abc2cd685756a1a063ae1e35 + md5: 0869f41ea5c64643dd2f5b47f32709ca + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libiconv >=1.17,<2.0a0 + - libstdcxx >=13 + license: GPL-2.0-only + license_family: GPL + size: 13148627 + timestamp: 1738164137421 +- conda: https://conda.anaconda.org/conda-forge/osx-64/doxygen-1.13.2-h27064b9_0.conda + sha256: 3eae05a4e8453698a52a265455a7045c70570e312db82c0829d33c576471da08 + md5: c8504720e9ad1565788e8bf91bfb0aeb + depends: + - __osx >=10.13 + - libcxx >=18 + - libiconv >=1.17,<2.0a0 + license: GPL-2.0-only + license_family: GPL + size: 11693372 + timestamp: 1738164323712 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/doxygen-1.13.2-h493aca8_0.conda + sha256: 2327ad4e6214accc1e71aea371aee9b9fed864ec36c20f829fd1cb71d4c85202 + md5: 3f5795e9004521711fa3a586b65fde05 + depends: + - __osx >=11.0 + - libcxx >=18 + - libiconv >=1.17,<2.0a0 + license: GPL-2.0-only + license_family: GPL + size: 11260324 + timestamp: 1738164659 +- conda: https://conda.anaconda.org/conda-forge/win-64/doxygen-1.13.2-hbf3f430_0.conda + sha256: 7a0fd40fd704e97a8f6533a081ba29579766d7a60bcb8e5de76679b066c4a72e + md5: 5cb2e11931773612d7a24b53f0c57594 + depends: + - libiconv >=1.17,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: GPL-2.0-only + license_family: GPL + size: 9219343 + timestamp: 1738165042524 +- conda: https://conda.anaconda.org/conda-forge/linux-64/eigen-3.4.0-h171cf75_1.conda + sha256: fee3738c2431c13f4930778e9d7daca9328e7e2f2a38928cf6ca5a0daa86474a + md5: ea2db216eae84bc83b0b2961f38f5c0d + depends: + - libstdcxx >=14 + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + license: MPL-2.0 + license_family: MOZILLA + size: 1169164 + timestamp: 1759819831835 +- conda: https://conda.anaconda.org/conda-forge/osx-64/eigen-3.4.0-hfc0b2d5_1.conda + sha256: 929bf0e15495bff2a08dfc372860c10efd829b9d66a7441bbfd565b6b8c8cf5a + md5: 7e58d0dcc1f43ed4baf6d3156630cc68 + depends: + - __osx >=10.13 + - libcxx >=19 + license: MPL-2.0 + license_family: MOZILLA + size: 1169455 + timestamp: 1759819901548 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/eigen-3.4.0-h49c215f_1.conda + sha256: 045b7e0994cc5740984551a79a56f7ff905a8deebcbdc02d6a28ad3ccae0abce + md5: cceeb206b14c099ff52dc5a67b096904 + depends: + - __osx >=11.0 + - libcxx >=19 + license: MPL-2.0 + license_family: MOZILLA + size: 1169935 + timestamp: 1759819925766 +- conda: https://conda.anaconda.org/conda-forge/win-64/eigen-3.4.0-h477610d_1.conda + sha256: 39d6fa1245ef8c226ff3e485e947770e3b9c7d65fed6c42bd297e2b218b4ddab + md5: 8ac3430db715982d054a004133ae8ae2 + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + license: MPL-2.0 + license_family: MOZILLA + size: 1166663 + timestamp: 1759819842269 +- conda: https://conda.anaconda.org/conda-forge/linux-64/epoxy-1.5.10-hb03c661_2.conda + sha256: a5b51e491fec22bcc1765f5b2c8fff8a97428e9a5a7ee6730095fb9d091b0747 + md5: 057083b06ccf1c2778344b6dabace38b + depends: + - __glibc >=2.17,<3.0.a0 + - libdrm >=2.4.125,<2.5.0a0 + - libegl >=1.7.0,<2.0a0 + - libegl-devel + - libgcc >=14 + - libgl >=1.7.0,<2.0a0 + - libgl-devel + - libglx >=1.7.0,<2.0a0 + - libglx-devel + - xorg-libx11 >=1.8.12,<2.0a0 + - xorg-libxdamage >=1.1.6,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxfixes >=6.0.1,<7.0a0 + - xorg-libxxf86vm >=1.1.6,<2.0a0 + license: MIT + license_family: MIT + size: 411735 + timestamp: 1758743520805 +- conda: https://conda.anaconda.org/conda-forge/osx-64/epoxy-1.5.10-h8616949_2.conda + sha256: d5c466bddf423a788ce5c39af20af41ebaf3de9dc9e807098fc9bf45c3c7db45 + md5: efe7fa6c60b20cb0a3a22e8c3e7b721e + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 283016 + timestamp: 1758743470535 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/epoxy-1.5.10-hc919400_2.conda + sha256: ba685b87529c95a4bf9de140a33d703d57dc46b036e9586ed26890de65c1c0d5 + md5: 3b87dabebe54c6d66a07b97b53ac5874 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 296347 + timestamp: 1758743805063 +- conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2 + sha256: 58d7f40d2940dd0a8aa28651239adbf5613254df0f75789919c4e6762054403b + md5: 0c96522c6bdaed4b1566d11387caaf45 + license: BSD-3-Clause + license_family: BSD + size: 397370 + timestamp: 1566932522327 +- conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2 + sha256: c52a29fdac682c20d252facc50f01e7c2e7ceac52aa9817aaf0bb83f7559ec5c + md5: 34893075a5c9e55cdafac56607368fc6 + license: OFL-1.1 + license_family: Other + size: 96530 + timestamp: 1620479909603 +- conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2 + sha256: 00925c8c055a2275614b4d983e1df637245e19058d79fc7dd1a93b8d9fb4b139 + md5: 4d59c254e01d9cde7957100457e2d5fb + license: OFL-1.1 + license_family: Other + size: 700814 + timestamp: 1620479612257 +- conda: https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_3.conda + sha256: 2821ec1dc454bd8b9a31d0ed22a7ce22422c0aef163c59f49dfdf915d0f0ca14 + md5: 49023d73832ef61042f6a237cb2687e7 + license: LicenseRef-Ubuntu-Font-Licence-Version-1.0 + license_family: Other + size: 1620504 + timestamp: 1727511233259 +- conda: https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.15.0-h7e30c49_1.conda + sha256: 7093aa19d6df5ccb6ca50329ef8510c6acb6b0d8001191909397368b65b02113 + md5: 8f5b0b297b59e1ac160ad4beec99dbee + depends: + - __glibc >=2.17,<3.0.a0 + - freetype >=2.12.1,<3.0a0 + - libexpat >=2.6.3,<3.0a0 + - libgcc >=13 + - libuuid >=2.38.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 265599 + timestamp: 1730283881107 +- conda: https://conda.anaconda.org/conda-forge/osx-64/fontconfig-2.15.0-h37eeddb_1.conda + sha256: 61a9aa1d2dd115ffc1ab372966dc8b1ac7b69870e6b1744641da276b31ea5c0b + md5: 84ccec5ee37eb03dd352db0a3f89ada3 + depends: + - __osx >=10.13 + - freetype >=2.12.1,<3.0a0 + - libexpat >=2.6.3,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 232313 + timestamp: 1730283983397 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/fontconfig-2.15.0-h1383a14_1.conda + sha256: f79d3d816fafbd6a2b0f75ebc3251a30d3294b08af9bb747194121f5efa364bc + md5: 7b29f48742cea5d1ccb5edd839cb5621 + depends: + - __osx >=11.0 + - freetype >=2.12.1,<3.0a0 + - libexpat >=2.6.3,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 234227 + timestamp: 1730284037572 +- conda: https://conda.anaconda.org/conda-forge/win-64/fontconfig-2.15.0-h765892d_1.conda + sha256: ed122fc858fb95768ca9ca77e73c8d9ddc21d4b2e13aaab5281e27593e840691 + md5: 9bb0026a2131b09404c59c4290c697cd + depends: + - freetype >=2.12.1,<3.0a0 + - libexpat >=2.6.3,<3.0a0 + - libiconv >=1.17,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 192355 + timestamp: 1730284147944 +- conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-ecosystem-1-0.tar.bz2 + sha256: a997f2f1921bb9c9d76e6fa2f6b408b7fa549edd349a77639c9fe7a23ea93e61 + md5: fee5683a3f04bd15cbd8318b096a27ab + depends: + - fonts-conda-forge + license: BSD-3-Clause + license_family: BSD + size: 3667 + timestamp: 1566974674465 +- conda: https://conda.anaconda.org/conda-forge/noarch/fonts-conda-forge-1-hc364b38_1.conda + sha256: 54eea8469786bc2291cc40bca5f46438d3e062a399e8f53f013b6a9f50e98333 + md5: a7970cd949a077b7cb9696379d338681 + depends: + - font-ttf-ubuntu + - font-ttf-inconsolata + - font-ttf-dejavu-sans-mono + - font-ttf-source-code-pro + license: BSD-3-Clause + license_family: BSD + size: 4059 + timestamp: 1762351264405 +- conda: https://conda.anaconda.org/conda-forge/linux-64/freetype-2.14.1-ha770c72_0.conda + sha256: bf8e4dffe46f7d25dc06f31038cacb01672c47b9f45201f065b0f4d00ab0a83e + md5: 4afc585cd97ba8a23809406cd8a9eda8 + depends: + - libfreetype 2.14.1 ha770c72_0 + - libfreetype6 2.14.1 h73754d4_0 + license: GPL-2.0-only OR FTL + size: 173114 + timestamp: 1757945422243 +- conda: https://conda.anaconda.org/conda-forge/osx-64/freetype-2.14.1-h694c41f_0.conda + sha256: 9f8282510db291496e89618fc66a58a1124fe7a6276fbd57ed18c602ce2576e9 + md5: ca641fdf8b7803f4b7212b6d66375930 + depends: + - libfreetype 2.14.1 h694c41f_0 + - libfreetype6 2.14.1 h6912278_0 + license: GPL-2.0-only OR FTL + size: 173969 + timestamp: 1757945973505 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/freetype-2.14.1-hce30654_0.conda + sha256: 14427aecd72e973a73d5f9dfd0e40b6bc3791d253de09b7bf233f6a9a190fd17 + md5: 1ec9a1ee7a2c9339774ad9bb6fe6caec + depends: + - libfreetype 2.14.1 hce30654_0 + - libfreetype6 2.14.1 h6da58f4_0 + license: GPL-2.0-only OR FTL + size: 173399 + timestamp: 1757947175403 +- conda: https://conda.anaconda.org/conda-forge/win-64/freetype-2.14.1-h57928b3_0.conda + sha256: a9b3313edea0bf14ea6147ea43a1059d0bf78771a1336d2c8282891efc57709a + md5: d69c21967f35eb2ce7f1f85d6b6022d3 + depends: + - libfreetype 2.14.1 h57928b3_0 + - libfreetype6 2.14.1 hdbac1cb_0 + license: GPL-2.0-only OR FTL + size: 184553 + timestamp: 1757946164012 +- conda: https://conda.anaconda.org/conda-forge/linux-64/fribidi-1.0.16-hb03c661_0.conda + sha256: 858283ff33d4c033f4971bf440cebff217d5552a5222ba994c49be990dacd40d + md5: f9f81ea472684d75b9dd8d0b328cf655 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: LGPL-2.1-or-later + size: 61244 + timestamp: 1757438574066 +- conda: https://conda.anaconda.org/conda-forge/osx-64/fribidi-1.0.16-h8616949_0.conda + sha256: 53dd0a6c561cf31038633aaa0d52be05da1f24e86947f06c4e324606c72c7413 + md5: 4422491d30462506b9f2d554ab55e33d + depends: + - __osx >=10.13 + license: LGPL-2.1-or-later + size: 60923 + timestamp: 1757438791418 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/fribidi-1.0.16-hc919400_0.conda + sha256: d856dc6744ecfba78c5f7df3378f03a75c911aadac803fa2b41a583667b4b600 + md5: 04bdce8d93a4ed181d1d726163c2d447 + depends: + - __osx >=11.0 + license: LGPL-2.1-or-later + size: 59391 + timestamp: 1757438897523 +- conda: https://conda.anaconda.org/conda-forge/win-64/fribidi-1.0.16-hfd05255_0.conda + sha256: 15011071ee56c216ffe276c8d734427f1f893f275ef733f728d13f610ed89e6e + md5: c27bd87e70f970010c1c6db104b88b18 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: LGPL-2.1-or-later + size: 64394 + timestamp: 1757438741305 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gcc-14.3.0-h0dff253_16.conda + sha256: 4581ce836a04a591a2622c2a0f15b81d7a87cec614facb3a405c070c8fdb7ac8 + md5: dcaf539ffe75649239192101037f1406 + depends: + - conda-gcc-specs + - gcc_impl_linux-64 14.3.0 he8b2097_16 + license: BSD-3-Clause + size: 29022 + timestamp: 1765256332962 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-14.3.0-he8b2097_16.conda + sha256: 4acf50b7d5673250d585a256a40aabdd922e0947ca12cdbad0cef960ee1a9509 + md5: d274bf1343507683e6eb2954d1871569 + depends: + - binutils_impl_linux-64 >=2.45 + - libgcc >=14.3.0 + - libgcc-devel_linux-64 14.3.0 hf649bbc_116 + - libgomp >=14.3.0 + - libsanitizer 14.3.0 h8f1669f_16 + - libstdcxx >=14.3.0 + - libstdcxx-devel_linux-64 14.3.0 h9f08a49_116 + - sysroot_linux-64 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 75290045 + timestamp: 1765256021903 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-14.3.0-h298d278_15.conda + sha256: 87e526cf4a64bfd4cd003a0748cfc0c3193f56cbff39a568bab000617fa0f620 + md5: 7154d88055825c8ef8530fb1f4ea7075 + depends: + - gcc_impl_linux-64 14.3.0.* + - binutils_linux-64 + - sysroot_linux-64 + license: BSD-3-Clause + size: 28824 + timestamp: 1765306123456 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gdk-pixbuf-2.44.4-h2b0a6b4_0.conda + sha256: f47222f58839bcc77c15f11a8814c1d8cb8080c5ca6ba83398a12b640fd3c85c + md5: c379d67c686fb83475c1a6ed41cc41ff + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libglib >=2.86.0,<3.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libpng >=1.6.50,<1.7.0a0 + - libtiff >=4.7.1,<4.8.0a0 + license: LGPL-2.1-or-later + license_family: LGPL + size: 572093 + timestamp: 1761082340749 +- conda: https://conda.anaconda.org/conda-forge/osx-64/gdk-pixbuf-2.44.4-h07555a4_0.conda + sha256: f1d85cf18cba23f9fac3c01f5aaf0a8d44822b531d3fc132f81e7cf25f589a4e + md5: bb9e17e69566ded88342156e58de3f87 + depends: + - __osx >=10.13 + - libglib >=2.86.0,<3.0a0 + - libintl >=0.25.1,<1.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libpng >=1.6.50,<1.7.0a0 + - libtiff >=4.7.1,<4.8.0a0 + license: LGPL-2.1-or-later + license_family: LGPL + size: 548999 + timestamp: 1761082565353 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/gdk-pixbuf-2.44.4-h7542897_0.conda + sha256: 1164ba63360736439c6e50f2d390e93f04df86901e7711de41072a32d9b8bfc9 + md5: 0b349c0400357e701cf2fa69371e5d39 + depends: + - __osx >=11.0 + - libglib >=2.86.0,<3.0a0 + - libintl >=0.25.1,<1.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libpng >=1.6.50,<1.7.0a0 + - libtiff >=4.7.1,<4.8.0a0 + license: LGPL-2.1-or-later + license_family: LGPL + size: 544149 + timestamp: 1761082904334 +- conda: https://conda.anaconda.org/conda-forge/win-64/getopt-win32-0.1-h6a83c73_3.conda + sha256: d04c4a6c11daa72c4a0242602e1d00c03291ef66ca2d7cd0e171088411d57710 + md5: 49c36fcad2e9af6b91e91f2ce5be8ebd + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + license: LGPL-3.0-only + license_family: LGPL + size: 26238 + timestamp: 1750744808182 +- conda: https://conda.anaconda.org/conda-forge/linux-64/glib-tools-2.86.3-hf516916_0.conda + sha256: 591e948c56f40e7fbcbd63362814736d9c9a3f0cd3cf4284002eff0bec7abe4e + md5: fd6acbf37b40cbe919450fa58309fbe1 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libglib 2.86.3 h6548e54_0 + license: LGPL-2.1-or-later + size: 116337 + timestamp: 1765221915390 +- conda: https://conda.anaconda.org/conda-forge/osx-64/glib-tools-2.86.3-h8650975_0.conda + sha256: f8563491a04c1aa2ccc2d730382949797316674d1c9bdde42f023924081e8295 + md5: 16ce4f8eddf8ad9233631f79404a4267 + depends: + - __osx >=10.13 + - libglib 2.86.3 hf241ffe_0 + - libintl >=0.25.1,<1.0a0 + license: LGPL-2.1-or-later + size: 102445 + timestamp: 1765222621327 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/glib-tools-2.86.3-hb9d6e3a_0.conda + sha256: a4630914a543d7ae6bdce031f63da32af039d4d7d76b445b4f5d09f0b6e4ddcb + md5: 07cf8a6e2d3f9c25ee3f123bf955b34b + depends: + - __osx >=11.0 + - libglib 2.86.3 hfe11c1f_0 + - libintl >=0.25.1,<1.0a0 + license: LGPL-2.1-or-later + size: 101482 + timestamp: 1765223225700 +- conda: https://conda.anaconda.org/conda-forge/linux-64/graphite2-1.3.14-hecca717_2.conda + sha256: 25ba37da5c39697a77fce2c9a15e48cf0a84f1464ad2aafbe53d8357a9f6cc8c + md5: 2cd94587f3a401ae05e03a6caf09539d + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libstdcxx >=14 + license: LGPL-2.0-or-later + license_family: LGPL + size: 99596 + timestamp: 1755102025473 +- conda: https://conda.anaconda.org/conda-forge/osx-64/graphite2-1.3.14-h21dd04a_2.conda + sha256: c356eb7a42775bd2bae243d9987436cd1a442be214b1580251bb7fdc136d804b + md5: ba63822087afc37e01bf44edcc2479f3 + depends: + - __osx >=10.13 + - libcxx >=19 + license: LGPL-2.0-or-later + license_family: LGPL + size: 85465 + timestamp: 1755102182985 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/graphite2-1.3.14-hec049ff_2.conda + sha256: c507ae9989dbea7024aa6feaebb16cbf271faac67ac3f0342ef1ab747c20475d + md5: 0fc46fee39e88bbcf5835f71a9d9a209 + depends: + - __osx >=11.0 + - libcxx >=19 + license: LGPL-2.0-or-later + license_family: LGPL + size: 81202 + timestamp: 1755102333712 +- conda: https://conda.anaconda.org/conda-forge/win-64/graphite2-1.3.14-hac47afa_2.conda + sha256: 5f1714b07252f885a62521b625898326ade6ca25fbc20727cfe9a88f68a54bfd + md5: b785694dd3ec77a011ccf0c24725382b + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: LGPL-2.0-or-later + license_family: LGPL + size: 96336 + timestamp: 1755102441729 +- conda: https://conda.anaconda.org/conda-forge/linux-64/graphviz-13.1.2-h87b6fe6_0.conda + sha256: efbd7d483f3d79b7882515ccf229eceb7f4ff636ea2019044e98243722f428be + md5: 0adddc9b820f596638d8b0ff9e3b4823 + depends: + - __glibc >=2.17,<3.0.a0 + - adwaita-icon-theme + - cairo >=1.18.4,<2.0a0 + - fonts-conda-ecosystem + - gdk-pixbuf >=2.42.12,<3.0a0 + - gtk3 >=3.24.43,<4.0a0 + - gts >=0.7.6,<0.8.0a0 + - libexpat >=2.7.1,<3.0a0 + - libgcc >=14 + - libgd >=2.3.3,<2.4.0a0 + - libglib >=2.84.3,<3.0a0 + - librsvg >=2.58.4,<3.0a0 + - libstdcxx >=14 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + license: EPL-1.0 + license_family: Other + size: 2427887 + timestamp: 1754732581595 +- conda: https://conda.anaconda.org/conda-forge/osx-64/graphviz-13.1.2-h42bfd48_0.conda + sha256: dae3d09e93c1221d63a2bc10fa2919504fd846891e1196b62b0a6f5953c8fe1c + md5: 18d8fd0b5eac07127635b37f1e72e1b0 + depends: + - __osx >=10.13 + - adwaita-icon-theme + - cairo >=1.18.4,<2.0a0 + - fonts-conda-ecosystem + - gdk-pixbuf >=2.42.12,<3.0a0 + - gtk3 >=3.24.43,<4.0a0 + - gts >=0.7.6,<0.8.0a0 + - libcxx >=19 + - libexpat >=2.7.1,<3.0a0 + - libgd >=2.3.3,<2.4.0a0 + - libglib >=2.84.3,<3.0a0 + - librsvg >=2.58.4,<3.0a0 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + license: EPL-1.0 + license_family: Other + size: 2287587 + timestamp: 1754732429816 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/graphviz-13.1.2-hcd33d8b_0.conda + sha256: f25e1828d02ebd78214966f483cfca5ac6a7b18824369c748d8cda99c66ff588 + md5: 81ab85a5a8481667660c7ce6e84bd681 + depends: + - __osx >=11.0 + - adwaita-icon-theme + - cairo >=1.18.4,<2.0a0 + - fonts-conda-ecosystem + - gdk-pixbuf >=2.42.12,<3.0a0 + - gtk3 >=3.24.43,<4.0a0 + - gts >=0.7.6,<0.8.0a0 + - libcxx >=19 + - libexpat >=2.7.1,<3.0a0 + - libgd >=2.3.3,<2.4.0a0 + - libglib >=2.84.3,<3.0a0 + - librsvg >=2.58.4,<3.0a0 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + license: EPL-1.0 + license_family: Other + size: 2201370 + timestamp: 1754732518951 +- conda: https://conda.anaconda.org/conda-forge/win-64/graphviz-13.1.2-ha5e8f4b_0.conda + sha256: aef252782fcfd8ebffdcc49c525702db33127535d13d7b00808bbc40919caaed + md5: a1599e42b950661f58f219f3fbe87fde + depends: + - cairo >=1.18.4,<2.0a0 + - getopt-win32 >=0.1,<0.1.1.0a0 + - gts >=0.7.6,<0.8.0a0 + - libexpat >=2.7.1,<3.0a0 + - libgd >=2.3.3,<2.4.0a0 + - libglib >=2.84.3,<3.0a0 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: EPL-1.0 + license_family: Other + size: 1208526 + timestamp: 1754732367050 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gtk3-3.24.43-h993cebd_6.conda + sha256: 004688fbb2c479b200a6d85ef38c3129fcd4ce13537b7ee2371d962b372761c1 + md5: f9f33c65b20e6a61f21714785e3613ec + depends: + - __glibc >=2.17,<3.0.a0 + - at-spi2-atk >=2.38.0,<3.0a0 + - atk-1.0 >=2.38.0 + - cairo >=1.18.4,<2.0a0 + - epoxy >=1.5.10,<1.6.0a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - fribidi >=1.0.16,<2.0a0 + - gdk-pixbuf >=2.44.4,<3.0a0 + - glib-tools + - harfbuzz >=11.5.1 + - hicolor-icon-theme + - libcups >=2.3.3,<2.4.0a0 + - libcups >=2.3.3,<3.0a0 + - libexpat >=2.7.1,<3.0a0 + - libgcc >=14 + - libglib >=2.86.0,<3.0a0 + - liblzma >=5.8.1,<6.0a0 + - libxkbcommon >=1.12.2,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + - wayland >=1.24.0,<2.0a0 + - xorg-libx11 >=1.8.12,<2.0a0 + - xorg-libxcomposite >=0.4.6,<1.0a0 + - xorg-libxcursor >=1.2.3,<2.0a0 + - xorg-libxdamage >=1.1.6,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxfixes >=6.0.2,<7.0a0 + - xorg-libxi >=1.8.2,<2.0a0 + - xorg-libxinerama >=1.1.5,<1.2.0a0 + - xorg-libxrandr >=1.5.4,<2.0a0 + - xorg-libxrender >=0.9.12,<0.10.0a0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 5587108 + timestamp: 1761327349586 +- conda: https://conda.anaconda.org/conda-forge/osx-64/gtk3-3.24.43-h5e629aa_6.conda + sha256: 5911ee39ababbd29794f958b129fd0254eb106ea4b4f750a03306c251bb20bae + md5: dbd0346e44fcbda7fe4f6eaf42597ef9 + depends: + - __osx >=10.13 + - atk-1.0 >=2.38.0 + - cairo >=1.18.4,<2.0a0 + - epoxy >=1.5.10,<1.6.0a0 + - fribidi >=1.0.16,<2.0a0 + - gdk-pixbuf >=2.44.4,<3.0a0 + - glib-tools + - harfbuzz >=11.5.1 + - hicolor-icon-theme + - libexpat >=2.7.1,<3.0a0 + - libglib >=2.86.0,<3.0a0 + - libintl >=0.25.1,<1.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 4922163 + timestamp: 1761327865236 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/gtk3-3.24.43-h5febe37_6.conda + sha256: bd66a3325bf3ce63ada3bf12eaafcfe036698741ee4bb595e83e5fdd3dba9f3d + md5: a99f96906158ebae5e3c0904bcd45145 + depends: + - __osx >=11.0 + - atk-1.0 >=2.38.0 + - cairo >=1.18.4,<2.0a0 + - epoxy >=1.5.10,<1.6.0a0 + - fribidi >=1.0.16,<2.0a0 + - gdk-pixbuf >=2.44.4,<3.0a0 + - glib-tools + - harfbuzz >=11.5.1 + - hicolor-icon-theme + - libexpat >=2.7.1,<3.0a0 + - libglib >=2.86.0,<3.0a0 + - libintl >=0.25.1,<1.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + - pango >=1.56.4,<2.0a0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 4768791 + timestamp: 1761328318680 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gts-0.7.6-h977cf35_4.conda + sha256: b5cd16262fefb836f69dc26d879b6508d29f8a5c5948a966c47fe99e2e19c99b + md5: 4d8df0b0db060d33c9a702ada998a8fe + depends: + - libgcc-ng >=12 + - libglib >=2.76.3,<3.0a0 + - libstdcxx-ng >=12 + license: LGPL-2.0-or-later + license_family: LGPL + size: 318312 + timestamp: 1686545244763 +- conda: https://conda.anaconda.org/conda-forge/osx-64/gts-0.7.6-h53e17e3_4.conda + sha256: d5b82a36f7e9d7636b854e56d1b4fe01c4d895128a7b73e2ec6945b691ff3314 + md5: 848cc963fcfbd063c7a023024aa3bec0 + depends: + - libcxx >=15.0.7 + - libglib >=2.76.3,<3.0a0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 280972 + timestamp: 1686545425074 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/gts-0.7.6-he42f4ea_4.conda + sha256: e0f8c7bc1b9ea62ded78ffa848e37771eeaaaf55b3146580513c7266862043ba + md5: 21b4dd3098f63a74cf2aa9159cbef57d + depends: + - libcxx >=15.0.7 + - libglib >=2.76.3,<3.0a0 + license: LGPL-2.0-or-later + license_family: LGPL + size: 304331 + timestamp: 1686545503242 +- conda: https://conda.anaconda.org/conda-forge/win-64/gts-0.7.6-h6b5321d_4.conda + sha256: b79755d2f9fc2113b6949bfc170c067902bc776e2c20da26e746e780f4f5a2d4 + md5: a41f14768d5e377426ad60c613f2923b + depends: + - libglib >=2.76.3,<3.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: LGPL-2.0-or-later + license_family: LGPL + size: 188688 + timestamp: 1686545648050 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-14.3.0-h76987e4_16.conda + sha256: 5a4174e7723a95eca2305f4e4b3d19fa8c714eadd921b993e1a893fe47e5d3d7 + md5: a3aa64ee3486f51eb61018939c88ef12 + depends: + - gcc 14.3.0 h0dff253_16 + - gxx_impl_linux-64 14.3.0 h2185e75_16 + license: BSD-3-Clause + size: 28403 + timestamp: 1765256369945 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-14.3.0-h2185e75_16.conda + sha256: 71a6672af972c4d072d79514e9755c9e9ea359d46613fd9333adcb3b08c0c008 + md5: 8729b9d902631b9ee604346a90a50031 + depends: + - gcc_impl_linux-64 14.3.0 he8b2097_16 + - libstdcxx-devel_linux-64 14.3.0 h9f08a49_116 + - sysroot_linux-64 + - tzdata + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 15255410 + timestamp: 1765256273332 +- conda: https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-14.3.0-hdb5f4f1_15.conda + sha256: d64a4afd400306e7692d494744a414e1bc09783c2fbf6b0358b32a63a13945f8 + md5: 9a242c1265c796f30fcdd04066d0ea5d + depends: + - gxx_impl_linux-64 14.3.0.* + - gcc_linux-64 ==14.3.0 h298d278_15 + - binutils_linux-64 + - sysroot_linux-64 + license: BSD-3-Clause + size: 27421 + timestamp: 1765306123460 +- conda: https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-12.2.0-h15599e2_0.conda + sha256: 6bd8b22beb7d40562b2889dc68232c589ff0d11a5ad3addd41a8570d11f039d9 + md5: b8690f53007e9b5ee2c2178dd4ac778c + depends: + - __glibc >=2.17,<3.0.a0 + - cairo >=1.18.4,<2.0a0 + - graphite2 >=1.3.14,<2.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.7.1,<3.0a0 + - libfreetype >=2.14.1 + - libfreetype6 >=2.14.1 + - libgcc >=14 + - libglib >=2.86.1,<3.0a0 + - libstdcxx >=14 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 2411408 + timestamp: 1762372726141 +- conda: https://conda.anaconda.org/conda-forge/osx-64/harfbuzz-12.2.0-hc5d3ef4_0.conda + sha256: 352c0fe4445599c3081a41e16b91d66041f9115b9490b7f3daea63897f593385 + md5: 05a72f9d35dddd5bf534d7da4929297c + depends: + - __osx >=10.13 + - cairo >=1.18.4,<2.0a0 + - graphite2 >=1.3.14,<2.0a0 + - icu >=75.1,<76.0a0 + - libcxx >=19 + - libexpat >=2.7.1,<3.0a0 + - libfreetype >=2.14.1 + - libfreetype6 >=2.14.1 + - libglib >=2.86.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 1875555 + timestamp: 1762373120771 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/harfbuzz-12.2.0-haf38c7b_0.conda + sha256: 2f8d95fe1cb655fe3bac114062963f08cc77b31b042027ef7a04ebde3ce21594 + md5: 1c7ff9d458dd8220ac2ee71dd4af1be5 + depends: + - __osx >=11.0 + - cairo >=1.18.4,<2.0a0 + - graphite2 >=1.3.14,<2.0a0 + - icu >=75.1,<76.0a0 + - libcxx >=19 + - libexpat >=2.7.1,<3.0a0 + - libfreetype >=2.14.1 + - libfreetype6 >=2.14.1 + - libglib >=2.86.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 1537764 + timestamp: 1762373922469 +- conda: https://conda.anaconda.org/conda-forge/win-64/harfbuzz-12.2.0-h5f2951f_0.conda + sha256: db73714c7f7e0c47b3b9db9302a83f2deb6f8d6081716d35710ef3c6756af6c3 + md5: e798ef748fc564e42f381d3d276850f0 + depends: + - cairo >=1.18.4,<2.0a0 + - graphite2 >=1.3.14,<2.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.7.1,<3.0a0 + - libfreetype >=2.14.1 + - libfreetype6 >=2.14.1 + - libglib >=2.86.1,<3.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 1138900 + timestamp: 1762373626704 +- conda: https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.14.6-nompi_h1b119a7_104.conda + sha256: 454e9724b322cee277abd7acf4f8d688e9c4ded006b6d5bc9fcc2a1ff907d27a + md5: 0857f4d157820dcd5625f61fdfefb780 + depends: + - __glibc >=2.17,<3.0.a0 + - libaec >=1.1.4,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libgcc >=14 + - libgfortran + - libgfortran5 >=14.3.0 + - libstdcxx >=14 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 3720961 + timestamp: 1764771748126 +- conda: https://conda.anaconda.org/conda-forge/osx-64/hdf5-1.14.6-nompi_hc1508a4_104.conda + sha256: aed322f0e8936960332305fbc213831a3cd301db5ea22c06e1293d953ddec563 + md5: 9425a5c53febdf71696aed291586d038 + depends: + - __osx >=10.13 + - libaec >=1.1.4,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libcxx >=19 + - libgfortran + - libgfortran5 >=14.3.0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 3528765 + timestamp: 1764773824647 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/hdf5-1.14.6-nompi_hd3baa01_104.conda + sha256: 3cd591334a838b127dfe8a626f38241892063eac8873abb93255962c71155533 + md5: 5a1cbaf2349dd2e6dd6cfaab378de51b + depends: + - __osx >=11.0 + - libaec >=1.1.4,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libcxx >=19 + - libgfortran + - libgfortran5 >=14.3.0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 3292042 + timestamp: 1764771887501 +- conda: https://conda.anaconda.org/conda-forge/win-64/hdf5-1.14.6-nompi_h89f0904_104.conda + sha256: cc948149f700033ff85ce4a1854edf6adcb5881391a3df5c40cbe2a793dd9f81 + md5: 9cc4a5567d46c7fcde99563e86522882 + depends: + - libaec >=1.1.4,<2.0a0 + - libcurl >=8.17.0,<9.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: BSD-3-Clause + license_family: BSD + size: 2028777 + timestamp: 1764771527382 +- conda: https://conda.anaconda.org/conda-forge/linux-64/hicolor-icon-theme-0.17-ha770c72_2.tar.bz2 + sha256: 336f29ceea9594f15cc8ec4c45fdc29e10796573c697ee0d57ebb7edd7e92043 + md5: bbf6f174dcd3254e19a2f5d2295ce808 + license: GPL-2.0-or-later + license_family: GPL + size: 13841 + timestamp: 1605162808667 +- conda: https://conda.anaconda.org/conda-forge/osx-64/hicolor-icon-theme-0.17-h694c41f_2.tar.bz2 + sha256: a5cb0c03d731bfb09b4262a3afdeae33bef98bc73972f1bd6b7e3fcd240bea41 + md5: f64218f19d9a441e80343cea13be1afb + license: GPL-2.0-or-later + license_family: GPL + size: 13821 + timestamp: 1605162984889 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/hicolor-icon-theme-0.17-hce30654_2.tar.bz2 + sha256: 286e33fb452f61133a3a61d002890235d1d1378554218ab063d6870416440281 + md5: 237b05b7eb284d7eebc3c5d93f5e4bca + license: GPL-2.0-or-later + license_family: GPL + size: 13800 + timestamp: 1611053664863 +- conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda + sha256: 71e750d509f5fa3421087ba88ef9a7b9be11c53174af3aa4d06aff4c18b38e8e + md5: 8b189310083baabfb622af68fd9d3ae3 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + - libstdcxx-ng >=12 + license: MIT + license_family: MIT + size: 12129203 + timestamp: 1720853576813 +- conda: https://conda.anaconda.org/conda-forge/osx-64/icu-75.1-h120a0e1_0.conda + sha256: 2e64307532f482a0929412976c8450c719d558ba20c0962832132fd0d07ba7a7 + md5: d68d48a3060eb5abdc1cdc8e2a3a5966 + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 11761697 + timestamp: 1720853679409 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/icu-75.1-hfee45f7_0.conda + sha256: 9ba12c93406f3df5ab0a43db8a4b4ef67a5871dfd401010fbe29b218b2cbe620 + md5: 5eb22c1d7b3fc4abb50d92d621583137 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 11857802 + timestamp: 1720853997952 +- conda: https://conda.anaconda.org/conda-forge/win-64/icu-75.1-he0c23c2_0.conda + sha256: 1d04369a1860a1e9e371b9fc82dd0092b616adcf057d6c88371856669280e920 + md5: 8579b6bb8d18be7c0b27fb08adeeeb40 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 14544252 + timestamp: 1720853966338 +- conda: https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-4.18.0-he073ed8_8.conda + sha256: 305c22a251db227679343fd73bfde121e555d466af86e537847f4c8b9436be0d + md5: ff007ab0f0fdc53d245972bba8a6d40c + constrains: + - sysroot_linux-64 ==2.28 + license: LGPL-2.0-or-later AND LGPL-2.0-or-later WITH exceptions AND GPL-2.0-or-later + license_family: GPL + size: 1272697 + timestamp: 1752669126073 +- conda: https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.3-hb9d3cd8_0.conda + sha256: 0960d06048a7185d3542d850986d807c6e37ca2e644342dd0c72feefcf26c2a4 + md5: b38117a3c920364aff79f870c984b4a3 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: LGPL-2.1-or-later + size: 134088 + timestamp: 1754905959823 +- conda: https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.3-h659f571_0.conda + sha256: 99df692f7a8a5c27cd14b5fb1374ee55e756631b9c3d659ed3ee60830249b238 + md5: 3f43953b7d3fb3aaa1d0d0723d91e368 + depends: + - keyutils >=1.6.1,<2.0a0 + - libedit >=3.1.20191231,<3.2.0a0 + - libedit >=3.1.20191231,<4.0a0 + - libgcc-ng >=12 + - libstdcxx-ng >=12 + - openssl >=3.3.1,<4.0a0 + license: MIT + license_family: MIT + size: 1370023 + timestamp: 1719463201255 +- conda: https://conda.anaconda.org/conda-forge/osx-64/krb5-1.21.3-h37d8d59_0.conda + sha256: 83b52685a4ce542772f0892a0f05764ac69d57187975579a0835ff255ae3ef9c + md5: d4765c524b1d91567886bde656fb514b + depends: + - __osx >=10.13 + - libcxx >=16 + - libedit >=3.1.20191231,<3.2.0a0 + - libedit >=3.1.20191231,<4.0a0 + - openssl >=3.3.1,<4.0a0 + license: MIT + license_family: MIT + size: 1185323 + timestamp: 1719463492984 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/krb5-1.21.3-h237132a_0.conda + sha256: 4442f957c3c77d69d9da3521268cad5d54c9033f1a73f99cde0a3658937b159b + md5: c6dc8a0fdec13a0565936655c33069a1 + depends: + - __osx >=11.0 + - libcxx >=16 + - libedit >=3.1.20191231,<3.2.0a0 + - libedit >=3.1.20191231,<4.0a0 + - openssl >=3.3.1,<4.0a0 + license: MIT + license_family: MIT + size: 1155530 + timestamp: 1719463474401 +- conda: https://conda.anaconda.org/conda-forge/win-64/krb5-1.21.3-hdf4eb48_0.conda + sha256: 18e8b3430d7d232dad132f574268f56b3eb1a19431d6d5de8c53c29e6c18fa81 + md5: 31aec030344e962fbd7dbbbbd68e60a9 + depends: + - openssl >=3.3.1,<4.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 712034 + timestamp: 1719463874284 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ld64-956.6-llvm19_1_hc3792c1_1.conda + sha256: caccb3177db88f2d66d3a079528d28dc6ad82e2564bbd0c1415ddf2b1ff323d2 + md5: c677bba21929007216a36f8dbe1bc9c5 + depends: + - ld64_osx-64 956.6 llvm19_1_h466f870_1 + - libllvm19 >=19.1.7,<19.2.0a0 + constrains: + - cctools_osx-64 1030.6.3.* + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 21141 + timestamp: 1764352011885 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ld64-956.6-llvm19_1_he86490a_1.conda + sha256: 5e5a9ad51ee0e05e2887c08c4ffc0dbe0ec9ab4d672aa5f63b5525c52a163506 + md5: 3a3ff7c8991ea2807eb13425733491c2 + depends: + - ld64_osx-arm64 956.6 llvm19_1_h6922315_1 + - libllvm19 >=19.1.7,<19.2.0a0 + constrains: + - cctools_osx-arm64 1030.6.3.* + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 21195 + timestamp: 1764351962956 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ld64_osx-64-956.6-llvm19_1_h466f870_1.conda + sha256: c4d208c1d3bddbcb792447567a7e62a9c36432abcbcddeb0bca25733145a01ca + md5: 83e4d60f77f239bf9a861343994af010 + depends: + - __osx >=10.13 + - libcxx + - libllvm19 >=19.1.7,<19.2.0a0 + - sigtool + - tapi >=1600.0.11.8,<1601.0a0 + constrains: + - clang 19.1.* + - cctools_impl_osx-64 1030.6.3.* + - cctools 1030.6.3.* + - ld64 956.6.* + license: APSL-2.0 + license_family: Other + size: 1113573 + timestamp: 1764351891537 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ld64_osx-arm64-956.6-llvm19_1_h6922315_1.conda + sha256: 53c2332de431c79dd536765a6c8e91a5667157025d075e1188ec4fa8ea1811fa + md5: 66697cc97d32afa29c17855b3d56680e + depends: + - __osx >=11.0 + - libcxx + - libllvm19 >=19.1.7,<19.2.0a0 + - sigtool + - tapi >=1600.0.11.8,<1601.0a0 + constrains: + - clang 19.1.* + - ld64 956.6.* + - cctools_impl_osx-arm64 1030.6.3.* + - cctools 1030.6.3.* + license: APSL-2.0 + license_family: Other + size: 1037455 + timestamp: 1764351880391 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.45-default_hbd61a6d_104.conda + sha256: 9e191baf2426a19507f1d0a17be0fdb7aa155cdf0f61d5a09c808e0a69464312 + md5: a6abd2796fc332536735f68ba23f7901 + depends: + - __glibc >=2.17,<3.0.a0 + - zstd >=1.5.7,<1.6.0a0 + constrains: + - binutils_impl_linux-64 2.45 + license: GPL-3.0-only + license_family: GPL + size: 725545 + timestamp: 1764007826689 +- conda: https://conda.anaconda.org/conda-forge/linux-64/lerc-4.0.0-h0aef613_1.conda + sha256: 412381a43d5ff9bbed82cd52a0bbca5b90623f62e41007c9c42d3870c60945ff + md5: 9344155d33912347b37f0ae6c410a835 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libstdcxx >=13 + license: Apache-2.0 + license_family: Apache + size: 264243 + timestamp: 1745264221534 +- conda: https://conda.anaconda.org/conda-forge/osx-64/lerc-4.0.0-hcca01a6_1.conda + sha256: cc1f1d7c30aa29da4474ec84026ec1032a8df1d7ec93f4af3b98bb793d01184e + md5: 21f765ced1a0ef4070df53cb425e1967 + depends: + - __osx >=10.13 + - libcxx >=18 + license: Apache-2.0 + license_family: Apache + size: 248882 + timestamp: 1745264331196 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/lerc-4.0.0-hd64df32_1.conda + sha256: 12361697f8ffc9968907d1a7b5830e34c670e4a59b638117a2cdfed8f63a38f8 + md5: a74332d9b60b62905e3d30709df08bf1 + depends: + - __osx >=11.0 + - libcxx >=18 + license: Apache-2.0 + license_family: Apache + size: 188306 + timestamp: 1745264362794 +- conda: https://conda.anaconda.org/conda-forge/win-64/lerc-4.0.0-h6470a55_1.conda + sha256: 868a3dff758cc676fa1286d3f36c3e0101cca56730f7be531ab84dc91ec58e9d + md5: c1b81da6d29a14b542da14a36c9fbf3f + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Apache-2.0 + license_family: Apache + size: 164701 + timestamp: 1745264384716 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libaec-1.1.4-h3f801dc_0.conda + sha256: 410ab78fe89bc869d435de04c9ffa189598ac15bb0fe1ea8ace8fb1b860a2aa3 + md5: 01ba04e414e47f95c03d6ddd81fd37be + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libstdcxx >=13 + license: BSD-2-Clause + license_family: BSD + size: 36825 + timestamp: 1749993532943 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libaec-1.1.4-ha6bc127_0.conda + sha256: f4fe00ef0df58b670696c62f2ec3f6484431acbf366ecfbcb71141c81439e331 + md5: 1a768b826dfc68e07786788d98babfc3 + depends: + - __osx >=10.13 + - libcxx >=18 + license: BSD-2-Clause + license_family: BSD + size: 30034 + timestamp: 1749993664561 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libaec-1.1.4-h51d1e36_0.conda + sha256: 0ea6b73b3fb1511615d9648186a7409e73b7a8d9b3d890d39df797730e3d1dbb + md5: 8ed0f86b7a5529b98ec73b43a53ce800 + depends: + - __osx >=11.0 + - libcxx >=18 + license: BSD-2-Clause + license_family: BSD + size: 30173 + timestamp: 1749993648288 +- conda: https://conda.anaconda.org/conda-forge/win-64/libaec-1.1.4-h20038f6_0.conda + sha256: 0be89085effce9fdcbb6aea7acdb157b18793162f68266ee0a75acf615d4929b + md5: 85a2bed45827d77d5b308cb2b165404f + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-2-Clause + license_family: BSD + size: 33847 + timestamp: 1749993666162 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.11.0-4_h4a7cf45_openblas.conda + build_number: 4 + sha256: f35fee1eb3fe1a80b2c8473f145a830cf6f98c3b15b232b256b93d44bd9c93b3 + md5: 14ff9fdfbd8bd590fca383b995470711 + depends: + - libopenblas >=0.3.30,<0.3.31.0a0 + - libopenblas >=0.3.30,<1.0a0 + constrains: + - liblapack 3.11.0 4*_openblas + - blas 2.304 openblas + - mkl <2026 + - libcblas 3.11.0 4*_openblas + - liblapacke 3.11.0 4*_openblas + license: BSD-3-Clause + license_family: BSD + size: 18529 + timestamp: 1764823833499 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libblas-3.11.0-4_he492b99_openblas.conda + build_number: 4 + sha256: 293e5290eee6d9be5a817ba4e1830ba18b04be9d619c2bdffeacf8ba3b0bef8d + md5: fa78d175db3b07d8eb963558e1bd9228 + depends: + - libopenblas >=0.3.30,<0.3.31.0a0 + - libopenblas >=0.3.30,<1.0a0 + constrains: + - mkl <2026 + - liblapack 3.11.0 4*_openblas + - libcblas 3.11.0 4*_openblas + - liblapacke 3.11.0 4*_openblas + - blas 2.304 openblas + license: BSD-3-Clause + license_family: BSD + size: 18702 + timestamp: 1764824607451 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libblas-3.11.0-4_h51639a9_openblas.conda + build_number: 4 + sha256: db31cdcd24b9f4be562c37a780d6a665f5eddc88a97d59997e293d91c522ffc1 + md5: f5c7d8c3256cd95d5ec31afc24c9dd30 + depends: + - libopenblas >=0.3.30,<0.3.31.0a0 + - libopenblas >=0.3.30,<1.0a0 + constrains: + - libcblas 3.11.0 4*_openblas + - blas 2.304 openblas + - liblapack 3.11.0 4*_openblas + - liblapacke 3.11.0 4*_openblas + - mkl <2026 + license: BSD-3-Clause + license_family: BSD + size: 18767 + timestamp: 1764824430403 +- conda: https://conda.anaconda.org/conda-forge/win-64/libblas-3.11.0-4_hf2e6a31_mkl.conda + build_number: 4 + sha256: 0c6ecdabcd3c5b92c7be68a65c30c29983040dd81f502d2e9ad3763fdbbabdef + md5: 97ec87aab53fb310e6c19cde2eec1de2 + depends: + - mkl >=2025.3.0,<2026.0a0 + constrains: + - liblapacke 3.11.0 4*_mkl + - libcblas 3.11.0 4*_mkl + - liblapack 3.11.0 4*_mkl + - blas 2.304 mkl + license: BSD-3-Clause + license_family: BSD + size: 67784 + timestamp: 1764824188313 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.11.0-4_h0358290_openblas.conda + build_number: 4 + sha256: 7abc88e2fdccddab27d2a889b9c9063df84a05766cc24828c9b5ca879f25c92c + md5: 25f5e5af61cee1ffedd9b4c9947d3af8 + depends: + - libblas 3.11.0 4_h4a7cf45_openblas + constrains: + - liblapack 3.11.0 4*_openblas + - blas 2.304 openblas + - liblapacke 3.11.0 4*_openblas + license: BSD-3-Clause + license_family: BSD + size: 18521 + timestamp: 1764823852735 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.11.0-4_h9b27e0a_openblas.conda + build_number: 4 + sha256: 2412cc96eda9455cdddc6221b023df738f4daef269007379d06cfe79cfd065be + md5: 4ebb29d020eb3c2c8ac9674d8cfa4a31 + depends: + - libblas 3.11.0 4_he492b99_openblas + constrains: + - liblapacke 3.11.0 4*_openblas + - liblapack 3.11.0 4*_openblas + - blas 2.304 openblas + license: BSD-3-Clause + license_family: BSD + size: 18690 + timestamp: 1764824633990 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcblas-3.11.0-4_hb0561ab_openblas.conda + build_number: 4 + sha256: fd57f4c8863ac78f42c55ee68351c963fe14fb3d46575c6f236082076690dd0f + md5: be77be52a6f01b46b1eb9aa5270023cc + depends: + - libblas 3.11.0 4_h51639a9_openblas + constrains: + - liblapack 3.11.0 4*_openblas + - blas 2.304 openblas + - liblapacke 3.11.0 4*_openblas + license: BSD-3-Clause + license_family: BSD + size: 18722 + timestamp: 1764824449333 +- conda: https://conda.anaconda.org/conda-forge/win-64/libcblas-3.11.0-4_h2a3cdd5_mkl.conda + build_number: 4 + sha256: 4cd0f2ec9823995a74b73c0119201dcf9a28444bdc2f0a824dfa938b5bdd5601 + md5: 64410b46ecf6fdfd19eb1d124d9eb450 + depends: + - libblas 3.11.0 4_hf2e6a31_mkl + constrains: + - liblapacke 3.11.0 4*_mkl + - liblapack 3.11.0 4*_mkl + - blas 2.304 mkl + license: BSD-3-Clause + license_family: BSD + size: 68001 + timestamp: 1764824219221 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libclang-cpp19.1-19.1.7-default_hc369343_5.conda + sha256: 16ff6eea7319f5e7a8091028e6ed66a33b0ea5a859075354b93674e6f0a1087a + md5: 51c684dbc10be31478e7fc0e85d27bfe + depends: + - __osx >=10.13 + - libcxx >=19.1.7 + - libllvm19 >=19.1.7,<19.2.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 14856234 + timestamp: 1759436552121 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libclang-cpp19.1-19.1.7-default_h73dfc95_5.conda + sha256: 6e62da7915a4a8b8bcd9a646e23c8a2180015d85a606c2a64e2385e6d0618949 + md5: 0b1110de04b80ea62e93fef6f8056fbb + depends: + - __osx >=11.0 + - libcxx >=19.1.7 + - libllvm19 >=19.1.7,<19.2.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 14064272 + timestamp: 1759435091038 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libcups-2.3.3-hb8b1518_5.conda + sha256: cb83980c57e311783ee831832eb2c20ecb41e7dee6e86e8b70b8cef0e43eab55 + md5: d4a250da4737ee127fb1fa6452a9002e + depends: + - __glibc >=2.17,<3.0.a0 + - krb5 >=1.21.3,<1.22.0a0 + - libgcc >=13 + - libstdcxx >=13 + - libzlib >=1.3.1,<2.0a0 + license: Apache-2.0 + license_family: Apache + size: 4523621 + timestamp: 1749905341688 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.17.0-h4e3cde8_1.conda + sha256: 2d7be2fe0f58a0945692abee7bb909f8b19284b518d958747e5ff51d0655c303 + md5: 117499f93e892ea1e57fdca16c2e8351 + depends: + - __glibc >=2.17,<3.0.a0 + - krb5 >=1.21.3,<1.22.0a0 + - libgcc >=14 + - libnghttp2 >=1.67.0,<2.0a0 + - libssh2 >=1.11.1,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: curl + license_family: MIT + size: 459417 + timestamp: 1765379027010 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libcurl-8.17.0-h7dd4100_1.conda + sha256: 80c7c8ff76eb699ec8d096dce80642b527fd8fc9dd72779bccec8d140c5b997a + md5: 9ddfaeed0eafce233ae8f4a430816aa5 + depends: + - __osx >=10.13 + - krb5 >=1.21.3,<1.22.0a0 + - libnghttp2 >=1.67.0,<2.0a0 + - libssh2 >=1.11.1,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: curl + license_family: MIT + size: 413119 + timestamp: 1765379670120 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcurl-8.17.0-hdece5d2_1.conda + sha256: 1a8a958448610ca3f8facddfe261fdbb010e7029a1571b84052ec9770fc0a36e + md5: 1d6e791c6e264ae139d469ce011aab51 + depends: + - __osx >=11.0 + - krb5 >=1.21.3,<1.22.0a0 + - libnghttp2 >=1.67.0,<2.0a0 + - libssh2 >=1.11.1,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: curl + license_family: MIT + size: 394471 + timestamp: 1765379821294 +- conda: https://conda.anaconda.org/conda-forge/win-64/libcurl-8.17.0-h43ecb02_1.conda + sha256: 5ebab5c980c09d31b35a25095b295124d89fd8bdffdb3487604218ad56512885 + md5: c02248f96a0073904bb085a437143895 + depends: + - krb5 >=1.21.3,<1.22.0a0 + - libssh2 >=1.11.1,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: curl + license_family: MIT + size: 379189 + timestamp: 1765379273605 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-21.1.7-h3d58e20_0.conda + sha256: 0ac1b1d1072a14fe8fd3a871c8ca0b411f0fdf30de70e5c95365a149bd923ac8 + md5: 67c086bf0efc67b54a235dd9184bd7a2 + depends: + - __osx >=10.13 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 571564 + timestamp: 1764676139160 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-21.1.7-hf598326_0.conda + sha256: 4bdbef0241b52e7a8552e8af7425f0b56d5621dd69df46c816546fefa17d77ab + md5: 0de94f39727c31c0447e408c5a210a56 + depends: + - __osx >=11.0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 568715 + timestamp: 1764676451068 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-devel-19.1.7-h7c275be_2.conda + sha256: 760af3509e723d8ee5a9baa7f923a213a758b3a09e41ffdaf10f3a474898ab3f + md5: 52031c3ab8857ea8bcc96fe6f1b6d778 + depends: + - libcxx >=19.1.7 + - libcxx-headers >=19.1.7,<19.1.8.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 23069 + timestamp: 1764648572536 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-devel-19.1.7-h6dc3340_2.conda + sha256: ec07ebaa226792f4e2bf0f5dba50325632a7474d5f04b951d8291be70af215da + md5: 9f7810b7c0a731dbc84d46d6005890ef + depends: + - libcxx >=19.1.7 + - libcxx-headers >=19.1.7,<19.1.8.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 23000 + timestamp: 1764648270121 +- conda: https://conda.anaconda.org/conda-forge/noarch/libcxx-headers-19.1.7-h707e725_2.conda + sha256: 36485e6807e03a4f15a8018ec982457a9de0a1318b4b49a44c5da75849dbe24f + md5: de91b5ce46dc7968b6e311f9add055a2 + depends: + - __unix + constrains: + - libcxx-devel 19.1.7 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 830747 + timestamp: 1764647922410 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.25-h17f619e_0.conda + sha256: aa8e8c4be9a2e81610ddf574e05b64ee131fab5e0e3693210c9d6d2fba32c680 + md5: 6c77a605a7a689d17d4819c0f8ac9a00 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 73490 + timestamp: 1761979956660 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libdeflate-1.25-h517ebb2_0.conda + sha256: 025f8b1e85dd8254e0ca65f011919fb1753070eb507f03bca317871a884d24de + md5: 31aa65919a729dc48180893f62c25221 + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 70840 + timestamp: 1761980008502 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libdeflate-1.25-hc11a715_0.conda + sha256: 5e0b6961be3304a5f027a8c00bd0967fc46ae162cffb7553ff45c70f51b8314c + md5: a6130c709305cd9828b4e1bd9ba0000c + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 55420 + timestamp: 1761980066242 +- conda: https://conda.anaconda.org/conda-forge/win-64/libdeflate-1.25-h51727cc_0.conda + sha256: 834e4881a18b690d5ec36f44852facd38e13afe599e369be62d29bd675f107ee + md5: e77030e67343e28b084fabd7db0ce43e + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: MIT + license_family: MIT + size: 156818 + timestamp: 1761979842440 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libdrm-2.4.125-hb03c661_1.conda + sha256: c076a213bd3676cc1ef22eeff91588826273513ccc6040d9bea68bccdc849501 + md5: 9314bc5a1fe7d1044dc9dfd3ef400535 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libpciaccess >=0.18,<0.19.0a0 + license: MIT + license_family: MIT + size: 310785 + timestamp: 1757212153962 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20250104-pl5321h7949ede_0.conda + sha256: d789471216e7aba3c184cd054ed61ce3f6dac6f87a50ec69291b9297f8c18724 + md5: c277e0a4d549b03ac1e9d6cbbe3d017b + depends: + - ncurses + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - ncurses >=6.5,<7.0a0 + license: BSD-2-Clause + license_family: BSD + size: 134676 + timestamp: 1738479519902 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20250104-pl5321ha958ccf_0.conda + sha256: 6cc49785940a99e6a6b8c6edbb15f44c2dd6c789d9c283e5ee7bdfedd50b4cd6 + md5: 1f4ed31220402fcddc083b4bff406868 + depends: + - ncurses + - __osx >=10.13 + - ncurses >=6.5,<7.0a0 + license: BSD-2-Clause + license_family: BSD + size: 115563 + timestamp: 1738479554273 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libedit-3.1.20250104-pl5321hafb1f1b_0.conda + sha256: 66aa216a403de0bb0c1340a88d1a06adaff66bae2cfd196731aa24db9859d631 + md5: 44083d2d2c2025afca315c7a172eab2b + depends: + - ncurses + - __osx >=11.0 + - ncurses >=6.5,<7.0a0 + license: BSD-2-Clause + license_family: BSD + size: 107691 + timestamp: 1738479560845 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libegl-1.7.0-ha4b6fd6_2.conda + sha256: 7fd5408d359d05a969133e47af580183fbf38e2235b562193d427bb9dad79723 + md5: c151d5eb730e9b7480e6d48c0fc44048 + depends: + - __glibc >=2.17,<3.0.a0 + - libglvnd 1.7.0 ha4b6fd6_2 + license: LicenseRef-libglvnd + size: 44840 + timestamp: 1731330973553 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libegl-devel-1.7.0-ha4b6fd6_2.conda + sha256: f6e7095260305dc05238062142fb8db4b940346329b5b54894a90610afa6749f + md5: b513eb83b3137eca1192c34bf4f013a7 + depends: + - __glibc >=2.17,<3.0.a0 + - libegl 1.7.0 ha4b6fd6_2 + - libgl-devel 1.7.0 ha4b6fd6_2 + - xorg-libx11 + license: LicenseRef-libglvnd + size: 30380 + timestamp: 1731331017249 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda + sha256: 1cd6048169fa0395af74ed5d8f1716e22c19a81a8a36f934c110ca3ad4dd27b4 + md5: 172bf1cd1ff8629f2b1179945ed45055 + depends: + - libgcc-ng >=12 + license: BSD-2-Clause + license_family: BSD + size: 112766 + timestamp: 1702146165126 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-h10d778d_2.conda + sha256: 0d238488564a7992942aa165ff994eca540f687753b4f0998b29b4e4d030ff43 + md5: 899db79329439820b7e8f8de41bca902 + license: BSD-2-Clause + license_family: BSD + size: 106663 + timestamp: 1702146352558 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libev-4.33-h93a5062_2.conda + sha256: 95cecb3902fbe0399c3a7e67a5bed1db813e5ab0e22f4023a5e0f722f2cc214f + md5: 36d33e440c31857372a72137f78bacf5 + license: BSD-2-Clause + license_family: BSD + size: 107458 + timestamp: 1702146414478 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.3-hecca717_0.conda + sha256: 1e1b08f6211629cbc2efe7a5bca5953f8f6b3cae0eeb04ca4dacee1bd4e2db2f + md5: 8b09ae86839581147ef2e5c5e229d164 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + constrains: + - expat 2.7.3.* + license: MIT + license_family: MIT + size: 76643 + timestamp: 1763549731408 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.7.3-heffb93a_0.conda + sha256: d11b3a6ce5b2e832f430fd112084533a01220597221bee16d6c7dc3947dffba6 + md5: 222e0732a1d0780a622926265bee14ef + depends: + - __osx >=10.13 + constrains: + - expat 2.7.3.* + license: MIT + license_family: MIT + size: 74058 + timestamp: 1763549886493 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libexpat-2.7.3-haf25636_0.conda + sha256: fce22610ecc95e6d149e42a42fbc3cc9d9179bd4eb6232639a60f06e080eec98 + md5: b79875dbb5b1db9a4a22a4520f918e1a + depends: + - __osx >=11.0 + constrains: + - expat 2.7.3.* + license: MIT + license_family: MIT + size: 67800 + timestamp: 1763549994166 +- conda: https://conda.anaconda.org/conda-forge/win-64/libexpat-2.7.3-hac47afa_0.conda + sha256: 844ab708594bdfbd7b35e1a67c379861bcd180d6efe57b654f482ae2f7f5c21e + md5: 8c9e4f1a0e688eef2e95711178061a0f + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - expat 2.7.3.* + license: MIT + license_family: MIT + size: 70137 + timestamp: 1763550049107 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.5.2-h9ec8514_0.conda + sha256: 25cbdfa65580cfab1b8d15ee90b4c9f1e0d72128f1661449c9a999d341377d54 + md5: 35f29eec58405aaf55e01cb470d8c26a + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 57821 + timestamp: 1760295480630 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.5.2-h750e83c_0.conda + sha256: 277dc89950f5d97f1683f26e362d6dca3c2efa16cb2f6fdb73d109effa1cd3d0 + md5: d214916b24c625bcc459b245d509f22e + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 52573 + timestamp: 1760295626449 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libffi-3.5.2-he5f378a_0.conda + sha256: 9b8acdf42df61b7bfe8bdc545c016c29e61985e79748c64ad66df47dbc2e295f + md5: 411ff7cd5d1472bba0f55c0faf04453b + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 40251 + timestamp: 1760295839166 +- conda: https://conda.anaconda.org/conda-forge/win-64/libffi-3.5.2-h52bdfb6_0.conda + sha256: ddff25aaa4f0aa535413f5d831b04073789522890a4d8626366e43ecde1534a3 + md5: ba4ad812d2afc22b9a34ce8327a0930f + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: MIT + license_family: MIT + size: 44866 + timestamp: 1760295760649 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libfreetype-2.14.1-ha770c72_0.conda + sha256: 4641d37faeb97cf8a121efafd6afd040904d4bca8c46798122f417c31d5dfbec + md5: f4084e4e6577797150f9b04a4560ceb0 + depends: + - libfreetype6 >=2.14.1 + license: GPL-2.0-only OR FTL + size: 7664 + timestamp: 1757945417134 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libfreetype-2.14.1-h694c41f_0.conda + sha256: 035e23ef87759a245d51890aedba0b494a26636784910c3730d76f3dc4482b1d + md5: e0e2edaf5e0c71b843e25a7ecc451cc9 + depends: + - libfreetype6 >=2.14.1 + license: GPL-2.0-only OR FTL + size: 7780 + timestamp: 1757945952392 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libfreetype-2.14.1-hce30654_0.conda + sha256: 9de25a86066f078822d8dd95a83048d7dc2897d5d655c0e04a8a54fca13ef1ef + md5: f35fb38e89e2776994131fbf961fa44b + depends: + - libfreetype6 >=2.14.1 + license: GPL-2.0-only OR FTL + size: 7810 + timestamp: 1757947168537 +- conda: https://conda.anaconda.org/conda-forge/win-64/libfreetype-2.14.1-h57928b3_0.conda + sha256: 2029702ec55e968ce18ec38cc8cf29f4c8c4989a0d51797164dab4f794349a64 + md5: 3235024fe48d4087721797ebd6c9d28c + depends: + - libfreetype6 >=2.14.1 + license: GPL-2.0-only OR FTL + size: 8109 + timestamp: 1757946135015 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libfreetype6-2.14.1-h73754d4_0.conda + sha256: 4a7af818a3179fafb6c91111752954e29d3a2a950259c14a2fc7ba40a8b03652 + md5: 8e7251989bca326a28f4a5ffbd74557a + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libpng >=1.6.50,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - freetype >=2.14.1 + license: GPL-2.0-only OR FTL + size: 386739 + timestamp: 1757945416744 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libfreetype6-2.14.1-h6912278_0.conda + sha256: f5f28092e368efc773bcd1c381d123f8b211528385a9353e36f8808d00d11655 + md5: dfbdc8fd781dc3111541e4234c19fdbd + depends: + - __osx >=10.13 + - libpng >=1.6.50,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - freetype >=2.14.1 + license: GPL-2.0-only OR FTL + size: 374993 + timestamp: 1757945949585 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libfreetype6-2.14.1-h6da58f4_0.conda + sha256: cc4aec4c490123c0f248c1acd1aeab592afb6a44b1536734e20937cda748f7cd + md5: 6d4ede03e2a8e20eb51f7f681d2a2550 + depends: + - __osx >=11.0 + - libpng >=1.6.50,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - freetype >=2.14.1 + license: GPL-2.0-only OR FTL + size: 346703 + timestamp: 1757947166116 +- conda: https://conda.anaconda.org/conda-forge/win-64/libfreetype6-2.14.1-hdbac1cb_0.conda + sha256: 223710600b1a5567163f7d66545817f2f144e4ef8f84e99e90f6b8a4e19cb7ad + md5: 6e7c5c5ab485057b5d07fd8188ba5c28 + depends: + - libpng >=1.6.50,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - freetype >=2.14.1 + license: GPL-2.0-only OR FTL + size: 340264 + timestamp: 1757946133889 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-15.2.0-he0feb66_16.conda + sha256: 6eed58051c2e12b804d53ceff5994a350c61baf117ec83f5f10c953a3f311451 + md5: 6d0363467e6ed84f11435eb309f2ff06 + depends: + - __glibc >=2.17,<3.0.a0 + - _openmp_mutex >=4.5 + constrains: + - libgcc-ng ==15.2.0=*_16 + - libgomp 15.2.0 he0feb66_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 1042798 + timestamp: 1765256792743 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libgcc-15.2.0-h08519bb_15.conda + sha256: e04b115ae32f8cbf95905971856ff557b296511735f4e1587b88abf519ff6fb8 + md5: c816665789d1e47cdfd6da8a81e1af64 + depends: + - _openmp_mutex + constrains: + - libgomp 15.2.0 15 + - libgcc-ng ==15.2.0=*_15 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 422960 + timestamp: 1764839601296 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgcc-15.2.0-hcbb3090_16.conda + sha256: 646c91dbc422fe92a5f8a3a5409c9aac66549f4ce8f8d1cab7c2aa5db789bb69 + md5: 8b216bac0de7a9d60f3ddeba2515545c + depends: + - _openmp_mutex + constrains: + - libgcc-ng ==15.2.0=*_16 + - libgomp 15.2.0 16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 402197 + timestamp: 1765258985740 +- conda: https://conda.anaconda.org/conda-forge/win-64/libgcc-15.2.0-h8ee18e1_16.conda + sha256: 24984e1e768440ba73021f08a1da0c1ec957b30d7071b9a89b877a273d17cae8 + md5: 1edb8bd8e093ebd31558008e9cb23b47 + depends: + - _openmp_mutex >=4.5 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + constrains: + - libgomp 15.2.0 h8ee18e1_16 + - libgcc-ng ==15.2.0=*_16 + - msys2-conda-epoch <0.0a0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 819696 + timestamp: 1765260437409 +- conda: https://conda.anaconda.org/conda-forge/noarch/libgcc-devel_linux-64-14.3.0-hf649bbc_116.conda + sha256: 812f2b3f523fc0aabaf4e5e1b44a029c5205671179e574dd32dc57b65e072e0f + md5: 0141e19cb0cd5602c49c84f920e81921 + depends: + - __unix + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 3082749 + timestamp: 1765255729247 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-15.2.0-h69a702a_16.conda + sha256: 5f07f9317f596a201cc6e095e5fc92621afca64829785e483738d935f8cab361 + md5: 5a68259fac2da8f2ee6f7bfe49c9eb8b + depends: + - libgcc 15.2.0 he0feb66_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 27256 + timestamp: 1765256804124 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgd-2.3.3-h6f5c62b_11.conda + sha256: 19e5be91445db119152217e8e8eec4fd0499d854acc7d8062044fb55a70971cd + md5: 68fc66282364981589ef36868b1a7c78 + depends: + - __glibc >=2.17,<3.0.a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libgcc >=13 + - libjpeg-turbo >=3.0.0,<4.0a0 + - libpng >=1.6.45,<1.7.0a0 + - libtiff >=4.7.0,<4.8.0a0 + - libwebp-base >=1.5.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + license: GD + license_family: BSD + size: 177082 + timestamp: 1737548051015 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libgd-2.3.3-h8555400_11.conda + sha256: af8ca696b229236e4a692220a26421a4f3d28a6ceff16723cd1fe12bc7e6517c + md5: 0eea404372aa41cf95e71c604534b2a2 + depends: + - __osx >=10.13 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libiconv >=1.17,<2.0a0 + - libjpeg-turbo >=3.0.0,<4.0a0 + - libpng >=1.6.45,<1.7.0a0 + - libtiff >=4.7.0,<4.8.0a0 + - libwebp-base >=1.5.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + license: GD + license_family: BSD + size: 162601 + timestamp: 1737548422107 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgd-2.3.3-hb2c3a21_11.conda + sha256: be038eb8dfe296509aee2df21184c72cb76285b0340448525664bc396aa6146d + md5: 4581aa3cfcd1a90967ed02d4a9f3db4b + depends: + - __osx >=11.0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libiconv >=1.17,<2.0a0 + - libjpeg-turbo >=3.0.0,<4.0a0 + - libpng >=1.6.45,<1.7.0a0 + - libtiff >=4.7.0,<4.8.0a0 + - libwebp-base >=1.5.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + license: GD + license_family: BSD + size: 156868 + timestamp: 1737548290283 +- conda: https://conda.anaconda.org/conda-forge/win-64/libgd-2.3.3-h7208af6_11.conda + sha256: 485a30af9e710feeda8d5b537b2db1e32e41f29ef24683bbe7deb6f7fd915825 + md5: 2070a706123b2d5e060b226a00e96488 + depends: + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - freetype >=2.12.1,<3.0a0 + - icu >=75.1,<76.0a0 + - libexpat >=2.6.4,<3.0a0 + - libjpeg-turbo >=3.0.0,<4.0a0 + - libpng >=1.6.45,<1.7.0a0 + - libtiff >=4.7.0,<4.8.0a0 + - libwebp-base >=1.5.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + - xorg-libxpm >=3.5.17,<4.0a0 + license: GD + license_family: BSD + size: 165838 + timestamp: 1737548342665 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-15.2.0-h69a702a_16.conda + sha256: 8a7b01e1ee1c462ad243524d76099e7174ebdd94ff045fe3e9b1e58db196463b + md5: 40d9b534410403c821ff64f00d0adc22 + depends: + - libgfortran5 15.2.0 h68bc16d_16 + constrains: + - libgfortran-ng ==15.2.0=*_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 27215 + timestamp: 1765256845586 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran-15.2.0-h7e5c614_15.conda + sha256: 7bb4d51348e8f7c1a565df95f4fc2a2021229d42300aab8366eda0ea1af90587 + md5: a089323fefeeaba2ae60e1ccebf86ddc + depends: + - libgfortran5 15.2.0 hd16e46c_15 + constrains: + - libgfortran-ng ==15.2.0=*_15 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 139002 + timestamp: 1764839892631 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran-15.2.0-h07b0088_16.conda + sha256: 68a6c1384d209f8654112c4c57c68c540540dd8e09e17dd1facf6cf3467798b5 + md5: 11e09edf0dde4c288508501fe621bab4 + depends: + - libgfortran5 15.2.0 hdae7583_16 + constrains: + - libgfortran-ng ==15.2.0=*_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 138630 + timestamp: 1765259217400 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-15.2.0-h69a702a_16.conda + sha256: dc13ce4ceecb5b3aaca4133731e459d1111961288a1e071cc18bd71d5a47e976 + md5: e5eb2ddedabd0063e442f230755d2062 + depends: + - libgfortran 15.2.0 h69a702a_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 27300 + timestamp: 1765257039455 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-15.2.0-h68bc16d_16.conda + sha256: d0e974ebc937c67ae37f07a28edace978e01dc0f44ee02f29ab8a16004b8148b + md5: 39183d4e0c05609fd65f130633194e37 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15.2.0 + constrains: + - libgfortran 15.2.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 2480559 + timestamp: 1765256819588 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-15.2.0-hd16e46c_15.conda + sha256: 456385a7d3357d5fdfc8e11bf18dcdf71753c4016c440f92a2486057524dd59a + md5: c2a6149bf7f82774a0118b9efef966dd + depends: + - libgcc >=15.2.0 + constrains: + - libgfortran 15.2.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 1061950 + timestamp: 1764839609607 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran5-15.2.0-hdae7583_16.conda + sha256: 9fb7f4ff219e3fb5decbd0ee90a950f4078c90a86f5d8d61ca608c913062f9b0 + md5: 265a9d03461da24884ecc8eb58396d57 + depends: + - libgcc >=15.2.0 + constrains: + - libgfortran 15.2.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 598291 + timestamp: 1765258993165 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgl-1.7.0-ha4b6fd6_2.conda + sha256: dc2752241fa3d9e40ce552c1942d0a4b5eeb93740c9723873f6fcf8d39ef8d2d + md5: 928b8be80851f5d8ffb016f9c81dae7a + depends: + - __glibc >=2.17,<3.0.a0 + - libglvnd 1.7.0 ha4b6fd6_2 + - libglx 1.7.0 ha4b6fd6_2 + license: LicenseRef-libglvnd + size: 134712 + timestamp: 1731330998354 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgl-devel-1.7.0-ha4b6fd6_2.conda + sha256: e281356c0975751f478c53e14f3efea6cd1e23c3069406d10708d6c409525260 + md5: 53e7cbb2beb03d69a478631e23e340e9 + depends: + - __glibc >=2.17,<3.0.a0 + - libgl 1.7.0 ha4b6fd6_2 + - libglx-devel 1.7.0 ha4b6fd6_2 + license: LicenseRef-libglvnd + size: 113911 + timestamp: 1731331012126 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libglib-2.86.3-h6548e54_0.conda + sha256: 82d6c2ee9f548c84220fb30fb1b231c64a53561d6e485447394f0a0eeeffe0e6 + md5: 034bea55a4feef51c98e8449938e9cee + depends: + - __glibc >=2.17,<3.0.a0 + - libffi >=3.5.2,<3.6.0a0 + - libgcc >=14 + - libiconv >=1.18,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - pcre2 >=10.47,<10.48.0a0 + constrains: + - glib 2.86.3 *_0 + license: LGPL-2.1-or-later + size: 3946542 + timestamp: 1765221858705 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libglib-2.86.3-hf241ffe_0.conda + sha256: d205ecdd0873dd92f7b55ac9b266b2eb09236ff5f3b26751579e435bbaed499c + md5: 584ce14b08050d3f1a25ab429b9360bc + depends: + - __osx >=10.13 + - libffi >=3.5.2,<3.6.0a0 + - libiconv >=1.18,<2.0a0 + - libintl >=0.25.1,<1.0a0 + - libzlib >=1.3.1,<2.0a0 + - pcre2 >=10.47,<10.48.0a0 + constrains: + - glib 2.86.3 *_0 + license: LGPL-2.1-or-later + size: 3708599 + timestamp: 1765222438844 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libglib-2.86.3-hfe11c1f_0.conda + sha256: 801c1835aa35a4f6e45e2192ad668bd7238d95c90ef8f02c52ce859c20117285 + md5: 057c7247514048ebdaf89373b263ebee + depends: + - __osx >=11.0 + - libffi >=3.5.2,<3.6.0a0 + - libiconv >=1.18,<2.0a0 + - libintl >=0.25.1,<1.0a0 + - libzlib >=1.3.1,<2.0a0 + - pcre2 >=10.47,<10.48.0a0 + constrains: + - glib 2.86.3 *_0 + license: LGPL-2.1-or-later + size: 3670602 + timestamp: 1765223125237 +- conda: https://conda.anaconda.org/conda-forge/win-64/libglib-2.86.3-h0c9aed9_0.conda + sha256: 84b74fc81fff745f3d21a26c317ace44269a563a42ead3500034c27e407e1021 + md5: c2d5b6b790ef21abac0b5331094ccb56 + depends: + - libffi >=3.5.2,<3.6.0a0 + - libiconv >=1.18,<2.0a0 + - libintl >=0.22.5,<1.0a0 + - libzlib >=1.3.1,<2.0a0 + - pcre2 >=10.47,<10.48.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - glib 2.86.3 *_0 + license: LGPL-2.1-or-later + size: 3818991 + timestamp: 1765222145992 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libglvnd-1.7.0-ha4b6fd6_2.conda + sha256: 1175f8a7a0c68b7f81962699751bb6574e6f07db4c9f72825f978e3016f46850 + md5: 434ca7e50e40f4918ab701e3facd59a0 + depends: + - __glibc >=2.17,<3.0.a0 + license: LicenseRef-libglvnd + size: 132463 + timestamp: 1731330968309 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libglx-1.7.0-ha4b6fd6_2.conda + sha256: 2d35a679624a93ce5b3e9dd301fff92343db609b79f0363e6d0ceb3a6478bfa7 + md5: c8013e438185f33b13814c5c488acd5c + depends: + - __glibc >=2.17,<3.0.a0 + - libglvnd 1.7.0 ha4b6fd6_2 + - xorg-libx11 >=1.8.10,<2.0a0 + license: LicenseRef-libglvnd + size: 75504 + timestamp: 1731330988898 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libglx-devel-1.7.0-ha4b6fd6_2.conda + sha256: 0a930e0148ab6e61089bbcdba25a2e17ee383e7de82e7af10cc5c12c82c580f3 + md5: 27ac5ae872a21375d980bd4a6f99edf3 + depends: + - __glibc >=2.17,<3.0.a0 + - libglx 1.7.0 ha4b6fd6_2 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-xorgproto + license: LicenseRef-libglvnd + size: 26388 + timestamp: 1731331003255 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-15.2.0-he0feb66_16.conda + sha256: 5b3e5e4e9270ecfcd48f47e3a68f037f5ab0f529ccb223e8e5d5ac75a58fc687 + md5: 26c46f90d0e727e95c6c9498a33a09f3 + depends: + - __glibc >=2.17,<3.0.a0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 603284 + timestamp: 1765256703881 +- conda: https://conda.anaconda.org/conda-forge/win-64/libgomp-15.2.0-h8ee18e1_16.conda + sha256: 9c86aadc1bd9740f2aca291da8052152c32dd1c617d5d4fd0f334214960649bb + md5: ab8189163748f95d4cb18ea1952943c3 + depends: + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + constrains: + - msys2-conda-epoch <0.0a0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 663567 + timestamp: 1765260367147 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libhiredis-1.0.2-h2cc385e_0.tar.bz2 + sha256: ee39c69df4fb39cfe1139ac4f7405bb066eba773e11ba3ab7c33835be00c2e48 + md5: b34907d3a81a3cd8095ee83d174c074a + depends: + - libgcc-ng >=9.4.0 + - libgfortran-ng + - libgfortran5 >=9.4.0 + - libstdcxx-ng >=9.4.0 + license: BSD-3-Clause + license_family: BSD + size: 147325 + timestamp: 1633982069195 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libhiredis-1.0.2-h2beb688_0.tar.bz2 + sha256: f5347083dad7527a5c1732fcf4df914e9b728aae6af6660856ac7954d28948be + md5: 524282b2c46c9dedf051b3bc2ae05494 + depends: + - libcxx >=11.1.0 + - libgfortran >=5 + - libgfortran5 >=9.3.0 + license: BSD-3-Clause + license_family: BSD + size: 53043 + timestamp: 1633982331651 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libhiredis-1.0.2-hbec66e7_0.tar.bz2 + sha256: a77b7097b3a557e8bc2c2a6e5257bde72e6c828ab8dd9996cec3895cc6cbcf9e + md5: 37ca71a16015b17397da4a5e6883f66f + depends: + - libcxx >=11.1.0 + - libgfortran >=5 + - libgfortran5 >=11.0.1.dev0 + license: BSD-3-Clause + license_family: BSD + size: 51945 + timestamp: 1633982449355 +- conda: https://conda.anaconda.org/conda-forge/win-64/libhiredis-1.0.2-h0e60522_0.tar.bz2 + sha256: 671f9ddab4cc4675e0a1e4a5c2a99c45ade031924556523fe999f13b22f23dc6 + md5: f92ce316734c9fa1e18f05b49b67cd56 + depends: + - vc >=14.1,<15.0a0 + - vs2015_runtime >=14.16.27012 + license: BSD-3-Clause + license_family: BSD + size: 56988 + timestamp: 1633982299028 +- conda: https://conda.anaconda.org/conda-forge/win-64/libhwloc-2.12.1-default_h4379cf1_1003.conda + sha256: 2d534c09f92966b885acb3f4a838f7055cea043165a03079a539b06c54e20a49 + md5: d1699ce4fe195a9f61264a1c29b87035 + depends: + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - libxml2 + - libxml2-16 >=2.14.6 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: BSD-3-Clause + license_family: BSD + size: 2412642 + timestamp: 1765090345611 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.18-h3b78370_2.conda + sha256: c467851a7312765447155e071752d7bf9bf44d610a5687e32706f480aad2833f + md5: 915f5995e94f60e9a4826e0b0920ee88 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: LGPL-2.1-only + size: 790176 + timestamp: 1754908768807 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libiconv-1.18-h57a12c2_2.conda + sha256: a1c8cecdf9966921e13f0ae921309a1f415dfbd2b791f2117cf7e8f5e61a48b6 + md5: 210a85a1119f97ea7887188d176db135 + depends: + - __osx >=10.13 + license: LGPL-2.1-only + size: 737846 + timestamp: 1754908900138 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libiconv-1.18-h23cfdf5_2.conda + sha256: de0336e800b2af9a40bdd694b03870ac4a848161b35c8a2325704f123f185f03 + md5: 4d5a7445f0b25b6a3ddbb56e790f5251 + depends: + - __osx >=11.0 + license: LGPL-2.1-only + size: 750379 + timestamp: 1754909073836 +- conda: https://conda.anaconda.org/conda-forge/win-64/libiconv-1.18-hc1393d2_2.conda + sha256: 0dcdb1a5f01863ac4e8ba006a8b0dc1a02d2221ec3319b5915a1863254d7efa7 + md5: 64571d1dd6cdcfa25d0664a5950fdaa2 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: LGPL-2.1-only + size: 696926 + timestamp: 1754909290005 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libintl-0.25.1-h3184127_1.conda + sha256: 8c352744517bc62d24539d1ecc813b9fdc8a785c780197c5f0b84ec5b0dfe122 + md5: a8e54eefc65645193c46e8b180f62d22 + depends: + - __osx >=10.13 + - libiconv >=1.18,<2.0a0 + license: LGPL-2.1-or-later + size: 96909 + timestamp: 1753343977382 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libintl-0.25.1-h493aca8_0.conda + sha256: 99d2cebcd8f84961b86784451b010f5f0a795ed1c08f1e7c76fbb3c22abf021a + md5: 5103f6a6b210a3912faf8d7db516918c + depends: + - __osx >=11.0 + - libiconv >=1.18,<2.0a0 + license: LGPL-2.1-or-later + size: 90957 + timestamp: 1751558394144 +- conda: https://conda.anaconda.org/conda-forge/win-64/libintl-0.22.5-h5728263_3.conda + sha256: c7e4600f28bcada8ea81456a6530c2329312519efcf0c886030ada38976b0511 + md5: 2cf0cf76cc15d360dfa2f17fd6cf9772 + depends: + - libiconv >=1.17,<2.0a0 + license: LGPL-2.1-or-later + size: 95568 + timestamp: 1723629479451 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libjpeg-turbo-3.1.2-hb03c661_0.conda + sha256: cc9aba923eea0af8e30e0f94f2ad7156e2984d80d1e8e7fe6be5a1f257f0eb32 + md5: 8397539e3a0bbd1695584fb4f927485a + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + constrains: + - jpeg <0.0.0a + license: IJG AND BSD-3-Clause AND Zlib + size: 633710 + timestamp: 1762094827865 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libjpeg-turbo-3.1.2-h8616949_0.conda + sha256: ebe2877abc046688d6ea299e80d8322d10c69763f13a102010f90f7168cc5f54 + md5: 48dda187f169f5a8f1e5e07701d5cdd9 + depends: + - __osx >=10.13 + constrains: + - jpeg <0.0.0a + license: IJG AND BSD-3-Clause AND Zlib + size: 586189 + timestamp: 1762095332781 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libjpeg-turbo-3.1.2-hc919400_0.conda + sha256: 6c061c56058bb10374daaef50e81b39cf43e8aee21f0037022c0c39c4f31872f + md5: f0695fbecf1006f27f4395d64bd0c4b8 + depends: + - __osx >=11.0 + constrains: + - jpeg <0.0.0a + license: IJG AND BSD-3-Clause AND Zlib + size: 551197 + timestamp: 1762095054358 +- conda: https://conda.anaconda.org/conda-forge/win-64/libjpeg-turbo-3.1.2-hfd05255_0.conda + sha256: 795e2d4feb2f7fc4a2c6e921871575feb32b8082b5760726791f080d1e2c2597 + md5: 56a686f92ac0273c0f6af58858a3f013 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - jpeg <0.0.0a + license: IJG AND BSD-3-Clause AND Zlib + size: 841783 + timestamp: 1762094814336 +- conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.11.0-4_h47877c9_openblas.conda + build_number: 4 + sha256: 5a6ed95bf093d709c8ba8373890773b912767eafdd2e8e4ad0fa6413d13ae3c9 + md5: 8ba8431802764597f400ee3e99026367 + depends: + - libblas 3.11.0 4_h4a7cf45_openblas + constrains: + - blas 2.304 openblas + - libcblas 3.11.0 4*_openblas + - liblapacke 3.11.0 4*_openblas + license: BSD-3-Clause + license_family: BSD + size: 18533 + timestamp: 1764823871307 +- conda: https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.11.0-4_h859234e_openblas.conda + build_number: 4 + sha256: cd490682199bd61c8db56cb72e71c154d91e8bf652cb28327690fa38246085d5 + md5: ebce74f166fc65413f751b8a125d4be3 + depends: + - libblas 3.11.0 4_he492b99_openblas + constrains: + - liblapacke 3.11.0 4*_openblas + - libcblas 3.11.0 4*_openblas + - blas 2.304 openblas + license: BSD-3-Clause + license_family: BSD + size: 18692 + timestamp: 1764824659093 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblapack-3.11.0-4_hd9741b5_openblas.conda + build_number: 4 + sha256: 63c9ac0c44c99fdf8de038b66f549d29a7b71e51223ad3fac1b4ba79080581c1 + md5: 3b949d8c584bc30932e41c755507bdc1 + depends: + - libblas 3.11.0 4_h51639a9_openblas + constrains: + - libcblas 3.11.0 4*_openblas + - blas 2.304 openblas + - liblapacke 3.11.0 4*_openblas + license: BSD-3-Clause + license_family: BSD + size: 18764 + timestamp: 1764824468301 +- conda: https://conda.anaconda.org/conda-forge/win-64/liblapack-3.11.0-4_hf9ab0e9_mkl.conda + build_number: 4 + sha256: d820333e9bac8381fb69e857d673c12d034bb45d0fe4818a1d12e1ec7a39e7df + md5: 67298727e96b60068a316d2f627e1e35 + depends: + - libblas 3.11.0 4_hf2e6a31_mkl + constrains: + - liblapacke 3.11.0 4*_mkl + - libcblas 3.11.0 4*_mkl + - blas 2.304 mkl + license: BSD-3-Clause + license_family: BSD + size: 80387 + timestamp: 1764824249543 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libllvm19-19.1.7-h56e7563_2.conda + sha256: 375a634873b7441d5101e6e2a9d3a42fec51be392306a03a2fa12ae8edecec1a + md5: 05a54b479099676e75f80ad0ddd38eff + depends: + - __osx >=10.13 + - libcxx >=19 + - libxml2 + - libxml2-16 >=2.14.5 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 28801374 + timestamp: 1757354631264 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libllvm19-19.1.7-h8e0c9ce_2.conda + sha256: 46f8ff3d86438c0af1bebe0c18261ce5de9878d58b4fe399a3a125670e4f0af5 + md5: d1d9b233830f6631800acc1e081a9444 + depends: + - __osx >=11.0 + - libcxx >=19 + - libxml2 + - libxml2-16 >=2.14.5 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 26914852 + timestamp: 1757353228286 +- conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda + sha256: f2591c0069447bbe28d4d696b7fcb0c5bd0b4ac582769b89addbcf26fb3430d8 + md5: 1a580f7796c7bf6393fddb8bbbde58dc + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - xz 5.8.1.* + license: 0BSD + size: 112894 + timestamp: 1749230047870 +- conda: https://conda.anaconda.org/conda-forge/osx-64/liblzma-5.8.1-hd471939_2.conda + sha256: 7e22fd1bdb8bf4c2be93de2d4e718db5c548aa082af47a7430eb23192de6bb36 + md5: 8468beea04b9065b9807fc8b9cdc5894 + depends: + - __osx >=10.13 + constrains: + - xz 5.8.1.* + license: 0BSD + size: 104826 + timestamp: 1749230155443 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblzma-5.8.1-h39f12f2_2.conda + sha256: 0cb92a9e026e7bd4842f410a5c5c665c89b2eb97794ffddba519a626b8ce7285 + md5: d6df911d4564d77c4374b02552cb17d1 + depends: + - __osx >=11.0 + constrains: + - xz 5.8.1.* + license: 0BSD + size: 92286 + timestamp: 1749230283517 +- conda: https://conda.anaconda.org/conda-forge/win-64/liblzma-5.8.1-h2466b09_2.conda + sha256: 55764956eb9179b98de7cc0e55696f2eff8f7b83fc3ebff5e696ca358bca28cc + md5: c15148b2e18da456f5108ccb5e411446 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - xz 5.8.1.* + license: 0BSD + size: 104935 + timestamp: 1749230611612 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libmatio-1.5.29-h2580756_0.conda + sha256: 5d3055c172aee16f2e142b361e36da627750ad2eb755894e38eac58f6b98d788 + md5: f6a81e7c0ed9b139cf4d5c46f5145a41 + depends: + - __glibc >=2.17,<3.0.a0 + - hdf5 >=1.14.6,<1.14.7.0a0 + - libgcc >=14 + - libzlib >=1.3.1,<2.0a0 + - zlib + license: BSD-2-Clause + license_family: BSD + size: 202711 + timestamp: 1762842140678 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libmatio-1.5.29-hfe3de8b_0.conda + sha256: 19bfc21d4effcbfd556ca6648aa77d761818551d25868501e1969e9268550a6d + md5: 3cb67b8c57700a37b777694f46673eb2 + depends: + - __osx >=10.13 + - hdf5 >=1.14.6,<1.14.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - zlib + license: BSD-2-Clause + license_family: BSD + size: 199022 + timestamp: 1762843037511 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libmatio-1.5.29-hb3c5b3c_0.conda + sha256: 5012b55c6cb5910f5d02455397852f4b2c5d4dbfa958d4af20847451af75d97e + md5: f467688f684607c053ccdcb6c8469637 + depends: + - __osx >=11.0 + - hdf5 >=1.14.6,<1.14.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - zlib + license: BSD-2-Clause + license_family: BSD + size: 176223 + timestamp: 1762842217414 +- conda: https://conda.anaconda.org/conda-forge/win-64/libmatio-1.5.29-h138d27d_0.conda + sha256: f9642c73e8028c422285af04507e933bf7458ca06433d8e642bf79599afa117d + md5: 31c6e5190c21b68dc9f6eaf85f29b773 + depends: + - hdf5 >=1.14.6,<1.14.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - zlib + license: BSD-2-Clause + license_family: BSD + size: 186568 + timestamp: 1762841991779 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.67.0-had1ee68_0.conda + sha256: a4a7dab8db4dc81c736e9a9b42bdfd97b087816e029e221380511960ac46c690 + md5: b499ce4b026493a13774bcf0f4c33849 + depends: + - __glibc >=2.17,<3.0.a0 + - c-ares >=1.34.5,<2.0a0 + - libev >=4.33,<4.34.0a0 + - libev >=4.33,<5.0a0 + - libgcc >=14 + - libstdcxx >=14 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.2,<4.0a0 + license: MIT + license_family: MIT + size: 666600 + timestamp: 1756834976695 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.67.0-h3338091_0.conda + sha256: c48d7e1cc927aef83ff9c48ae34dd1d7495c6ccc1edc4a3a6ba6aff1624be9ac + md5: e7630cef881b1174d40f3e69a883e55f + depends: + - __osx >=10.13 + - c-ares >=1.34.5,<2.0a0 + - libcxx >=19 + - libev >=4.33,<4.34.0a0 + - libev >=4.33,<5.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.2,<4.0a0 + license: MIT + license_family: MIT + size: 605680 + timestamp: 1756835898134 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libnghttp2-1.67.0-hc438710_0.conda + sha256: a07cb53b5ffa2d5a18afc6fd5a526a5a53dd9523fbc022148bd2f9395697c46d + md5: a4b4dd73c67df470d091312ab87bf6ae + depends: + - __osx >=11.0 + - c-ares >=1.34.5,<2.0a0 + - libcxx >=19 + - libev >=4.33,<4.34.0a0 + - libev >=4.33,<5.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.2,<4.0a0 + license: MIT + license_family: MIT + size: 575454 + timestamp: 1756835746393 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda + sha256: 927fe72b054277cde6cb82597d0fcf6baf127dcbce2e0a9d8925a68f1265eef5 + md5: d864d34357c3b65a4b731f78c0801dc4 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: LGPL-2.1-only + license_family: GPL + size: 33731 + timestamp: 1750274110928 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_4.conda + sha256: 199d79c237afb0d4780ccd2fbf829cea80743df60df4705202558675e07dd2c5 + md5: be43915efc66345cccb3c310b6ed0374 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libgfortran + - libgfortran5 >=14.3.0 + constrains: + - openblas >=0.3.30,<0.3.31.0a0 + license: BSD-3-Clause + license_family: BSD + size: 5927939 + timestamp: 1763114673331 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.30-openmp_h6006d49_4.conda + sha256: ba642353f7f41ab2d2eb6410fbe522238f0f4483bcd07df30b3222b4454ee7cd + md5: 9241a65e6e9605e4581a2a8005d7f789 + depends: + - __osx >=10.13 + - libgfortran + - libgfortran5 >=14.3.0 + - llvm-openmp >=19.1.7 + constrains: + - openblas >=0.3.30,<0.3.31.0a0 + license: BSD-3-Clause + license_family: BSD + size: 6268795 + timestamp: 1763117623665 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libopenblas-0.3.30-openmp_ha158390_3.conda + sha256: dcc626c7103503d1dfc0371687ad553cb948b8ed0249c2a721147bdeb8db4a73 + md5: a18a7f471c517062ee71b843ef95eb8a + depends: + - __osx >=11.0 + - libgfortran + - libgfortran5 >=14.3.0 + - llvm-openmp >=19.1.7 + constrains: + - openblas >=0.3.30,<0.3.31.0a0 + license: BSD-3-Clause + license_family: BSD + size: 4285762 + timestamp: 1761749506256 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libpciaccess-0.18-hb9d3cd8_0.conda + sha256: 0bd91de9b447a2991e666f284ae8c722ffb1d84acb594dbd0c031bd656fa32b2 + md5: 70e3400cbbfa03e96dcde7fc13e38c7b + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: MIT + license_family: MIT + size: 28424 + timestamp: 1749901812541 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libpng-1.6.53-h421ea60_0.conda + sha256: 8acdeb9a7e3d2630176ba8e947caf6bf4985a5148dec69b801e5eb797856688b + md5: 00d4e66b1f746cb14944cad23fffb405 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libzlib >=1.3.1,<2.0a0 + license: zlib-acknowledgement + size: 317748 + timestamp: 1764981060755 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libpng-1.6.53-h380d223_0.conda + sha256: 62a861e407bf0d0a2a983d0b0167ed263ae035cae7061976e9994f9963e6c68d + md5: 0cdbbd56f660997cfe5d33e516afac2f + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + license: zlib-acknowledgement + size: 298397 + timestamp: 1764981064303 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libpng-1.6.53-hfab5511_0.conda + sha256: 6793e7284e175c515fc6453be45c7c0febdea853657d246d8136fbda791dd0ad + md5: 62b6111feeffe607c3ecc8ca5bd1514b + depends: + - __osx >=11.0 + - libzlib >=1.3.1,<2.0a0 + license: zlib-acknowledgement + size: 288210 + timestamp: 1764981075326 +- conda: https://conda.anaconda.org/conda-forge/win-64/libpng-1.6.53-h7351971_0.conda + sha256: e5d061e7bdb2b97227b6955d1aa700a58a5703b5150ab0467cc37de609f277b6 + md5: fb6f43f6f08ca100cb24cff125ab0d9e + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - libzlib >=1.3.1,<2.0a0 + license: zlib-acknowledgement + size: 383702 + timestamp: 1764981078732 +- conda: https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.60.0-h61e6d4b_0.conda + sha256: 960b137673b2b8293e2a12d194add72967b3bf12fcdf691e7ad8bd5c8318cec3 + md5: 91e6d4d684e237fba31b9815c4b40edf + depends: + - __glibc >=2.17,<3.0.a0 + - cairo >=1.18.4,<2.0a0 + - gdk-pixbuf >=2.44.3,<3.0a0 + - libgcc >=14 + - libglib >=2.86.0,<3.0a0 + - libxml2-16 >=2.14.6 + - pango >=1.56.4,<2.0a0 + constrains: + - __glibc >=2.17 + license: LGPL-2.1-or-later + size: 3421977 + timestamp: 1759327942156 +- conda: https://conda.anaconda.org/conda-forge/osx-64/librsvg-2.60.0-h2da6fc3_0.conda + sha256: 9ac53c255af84a3913015796797785f6a94e12ea991e1c36735c5aefaf70ebca + md5: 0e5609c0f8e5421e43301bcc3c5e1985 + depends: + - __osx >=10.13 + - cairo >=1.18.4,<2.0a0 + - gdk-pixbuf >=2.44.3,<3.0a0 + - libglib >=2.86.0,<3.0a0 + - libxml2-16 >=2.14.6 + - pango >=1.56.4,<2.0a0 + constrains: + - __osx >=10.13 + license: LGPL-2.1-or-later + size: 2431321 + timestamp: 1759328795502 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/librsvg-2.60.0-h5c55ec3_0.conda + sha256: ca5a2de5d3f68e8d6443ea1bf193c1596a278e6f86018017c0ccd4928eaf8971 + md5: 05ad1d6b6fb3b384f7a07128025725cb + depends: + - __osx >=11.0 + - cairo >=1.18.4,<2.0a0 + - gdk-pixbuf >=2.44.3,<3.0a0 + - libglib >=2.86.0,<3.0a0 + - libxml2-16 >=2.14.6 + - pango >=1.56.4,<2.0a0 + constrains: + - __osx >=11.0 + license: LGPL-2.1-or-later + size: 2344343 + timestamp: 1759328503184 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-14.3.0-h8f1669f_16.conda + sha256: 21765d3fa780eb98055a9f40e9d4defa1eaffe254ee271a3e49555a89e37d6c9 + md5: 0617b134e4dc4474c1038707499f7eed + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14.3.0 + - libstdcxx >=14.3.0 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 7946383 + timestamp: 1765255939536 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.51.1-h0c1763c_0.conda + sha256: 6f0e8a812e8e33a4d8b7a0e595efe28373080d27b78ee4828aa4f6649a088454 + md5: 2e1b84d273b01835256e53fd938de355 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libzlib >=1.3.1,<2.0a0 + license: blessing + size: 938979 + timestamp: 1764359444435 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.51.1-h6cc646a_0.conda + sha256: 8460901daff15749354f0de143e766febf0682fe9201bf307ea84837707644d1 + md5: f71213ed0c51030cb17a77fc60a757f1 + depends: + - __osx >=10.13 + - icu >=75.1,<76.0a0 + - libzlib >=1.3.1,<2.0a0 + license: blessing + size: 991350 + timestamp: 1764359781222 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.51.1-h9a5124b_0.conda + sha256: a46b167447e2a9e38586320c30b29e3b68b6f7e6b873c18d6b1aa2efd2626917 + md5: 67e50e5bd4e5e2310d66b88c4da50096 + depends: + - __osx >=11.0 + - libzlib >=1.3.1,<2.0a0 + license: blessing + size: 906292 + timestamp: 1764359907797 +- conda: https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.51.1-hf5d6505_0.conda + sha256: a976c8b455d9023b83878609bd68c3b035b9839d592bd6c7be7552c523773b62 + md5: f92bef2f8e523bb0eabe60099683617a + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: blessing + size: 1291059 + timestamp: 1764359545703 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.1-hcf80075_0.conda + sha256: fa39bfd69228a13e553bd24601332b7cfeb30ca11a3ca50bb028108fe90a7661 + md5: eecce068c7e4eddeb169591baac20ac4 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.0,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 304790 + timestamp: 1745608545575 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.11.1-hed3591d_0.conda + sha256: 00654ba9e5f73aa1f75c1f69db34a19029e970a4aeb0fa8615934d8e9c369c3c + md5: a6cb15db1c2dc4d3a5f6cf3772e09e81 + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.0,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 284216 + timestamp: 1745608575796 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libssh2-1.11.1-h1590b86_0.conda + sha256: 8bfe837221390ffc6f111ecca24fa12d4a6325da0c8d131333d63d6c37f27e0a + md5: b68e8f66b94b44aaa8de4583d3d4cc40 + depends: + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.0,<4.0a0 + license: BSD-3-Clause + license_family: BSD + size: 279193 + timestamp: 1745608793272 +- conda: https://conda.anaconda.org/conda-forge/win-64/libssh2-1.11.1-h9aa295b_0.conda + sha256: cbdf93898f2e27cefca5f3fe46519335d1fab25c4ea2a11b11502ff63e602c09 + md5: 9dce2f112bfd3400f4f432b3d0ac07b2 + depends: + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.0,<4.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-3-Clause + license_family: BSD + size: 292785 + timestamp: 1745608759342 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-15.2.0-h934c35e_16.conda + sha256: 813427918316a00c904723f1dfc3da1bbc1974c5cfe1ed1e704c6f4e0798cbc6 + md5: 68f68355000ec3f1d6f26ea13e8f525f + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc 15.2.0 he0feb66_16 + constrains: + - libstdcxx-ng ==15.2.0=*_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 5856456 + timestamp: 1765256838573 +- conda: https://conda.anaconda.org/conda-forge/noarch/libstdcxx-devel_linux-64-14.3.0-h9f08a49_116.conda + sha256: 278a6b7ebb02f1e983db06c6091b130c9a99f967acb526eac1a67077fd863da8 + md5: badba6a9f0e90fdaff87b06b54736ea6 + depends: + - __unix + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 20538116 + timestamp: 1765255773242 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-15.2.0-hdf11a46_16.conda + sha256: 81f2f246c7533b41c5e0c274172d607829019621c4a0823b5c0b4a8c7028ee84 + md5: 1b3152694d236cf233b76b8c56bf0eae + depends: + - libstdcxx 15.2.0 h934c35e_16 + license: GPL-3.0-only WITH GCC-exception-3.1 + size: 27300 + timestamp: 1765256885128 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libtiff-4.7.1-h9d88235_1.conda + sha256: e5f8c38625aa6d567809733ae04bb71c161a42e44a9fa8227abe61fa5c60ebe0 + md5: cd5a90476766d53e901500df9215e927 + depends: + - __glibc >=2.17,<3.0.a0 + - lerc >=4.0.0,<5.0a0 + - libdeflate >=1.25,<1.26.0a0 + - libgcc >=14 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libstdcxx >=14 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: HPND + size: 435273 + timestamp: 1762022005702 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libtiff-4.7.1-ha0a348c_1.conda + sha256: e53424c34147301beae2cd9223ebf593720d94c038b3f03cacd0535e12c9668e + md5: 9d4344f94de4ab1330cdc41c40152ea6 + depends: + - __osx >=10.13 + - lerc >=4.0.0,<5.0a0 + - libcxx >=19 + - libdeflate >=1.25,<1.26.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: HPND + size: 404591 + timestamp: 1762022511178 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libtiff-4.7.1-h4030677_1.conda + sha256: e9248077b3fa63db94caca42c8dbc6949c6f32f94d1cafad127f9005d9b1507f + md5: e2a72ab2fa54ecb6abab2b26cde93500 + depends: + - __osx >=11.0 + - lerc >=4.0.0,<5.0a0 + - libcxx >=19 + - libdeflate >=1.25,<1.26.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libwebp-base >=1.6.0,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: HPND + size: 373892 + timestamp: 1762022345545 +- conda: https://conda.anaconda.org/conda-forge/win-64/libtiff-4.7.1-h8f73337_1.conda + sha256: f1b8cccaaeea38a28b9cd496694b2e3d372bb5be0e9377c9e3d14b330d1cba8a + md5: 549845d5133100142452812feb9ba2e8 + depends: + - lerc >=4.0.0,<5.0a0 + - libdeflate >=1.25,<1.26.0a0 + - libjpeg-turbo >=3.1.0,<4.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - zstd >=1.5.7,<1.6.0a0 + license: HPND + size: 993166 + timestamp: 1762022118895 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.41.2-h5347b49_1.conda + sha256: 030447cf827c471abd37092ab9714fde82b8222106f22fde94bc7a64e2704c40 + md5: 41f5c09a211985c3ce642d60721e7c3e + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: BSD-3-Clause + license_family: BSD + size: 40235 + timestamp: 1764790744114 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.51.0-hb03c661_1.conda + sha256: c180f4124a889ac343fc59d15558e93667d894a966ec6fdb61da1604481be26b + md5: 0f03292cc56bf91a077a134ea8747118 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 895108 + timestamp: 1753948278280 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libuv-1.51.0-h58003a5_1.conda + sha256: d90dd0eee6f195a5bd14edab4c5b33be3635b674b0b6c010fb942b956aa2254c + md5: fbfc6cf607ae1e1e498734e256561dc3 + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 422612 + timestamp: 1753948458902 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libuv-1.51.0-h6caf38d_1.conda + sha256: 042c7488ad97a5629ec0a991a8b2a3345599401ecc75ad6a5af73b60e6db9689 + md5: c0d87c3c8e075daf1daf6c31b53e8083 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 421195 + timestamp: 1753948426421 +- conda: https://conda.anaconda.org/conda-forge/win-64/libuv-1.51.0-hfd05255_1.conda + sha256: f03dc82e6fb1725788e73ae97f0cd3d820d5af0d351a274104a0767035444c59 + md5: 31e1545994c48efc3e6ea32ca02a8724 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: MIT + license_family: MIT + size: 297087 + timestamp: 1753948490874 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.6.0-hd42ef1d_0.conda + sha256: 3aed21ab28eddffdaf7f804f49be7a7d701e8f0e46c856d801270b470820a37b + md5: aea31d2e5b1091feca96fcfe945c3cf9 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + constrains: + - libwebp 1.6.0 + license: BSD-3-Clause + license_family: BSD + size: 429011 + timestamp: 1752159441324 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libwebp-base-1.6.0-hb807250_0.conda + sha256: 00dbfe574b5d9b9b2b519acb07545380a6bc98d1f76a02695be4995d4ec91391 + md5: 7bb6608cf1f83578587297a158a6630b + depends: + - __osx >=10.13 + constrains: + - libwebp 1.6.0 + license: BSD-3-Clause + license_family: BSD + size: 365086 + timestamp: 1752159528504 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libwebp-base-1.6.0-h07db88b_0.conda + sha256: a4de3f371bb7ada325e1f27a4ef7bcc81b2b6a330e46fac9c2f78ac0755ea3dd + md5: e5e7d467f80da752be17796b87fe6385 + depends: + - __osx >=11.0 + constrains: + - libwebp 1.6.0 + license: BSD-3-Clause + license_family: BSD + size: 294974 + timestamp: 1752159906788 +- conda: https://conda.anaconda.org/conda-forge/win-64/libwebp-base-1.6.0-h4d5522a_0.conda + sha256: 7b6316abfea1007e100922760e9b8c820d6fc19df3f42fb5aca684cfacb31843 + md5: f9bbae5e2537e3b06e0f7310ba76c893 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - libwebp 1.6.0 + license: BSD-3-Clause + license_family: BSD + size: 279176 + timestamp: 1752159543911 +- conda: https://conda.anaconda.org/conda-forge/win-64/libwinpthread-12.0.0.r4.gg4f2fc60ca-h57928b3_10.conda + sha256: 0fccf2d17026255b6e10ace1f191d0a2a18f2d65088fd02430be17c701f8ffe0 + md5: 8a86073cf3b343b87d03f41790d8b4e5 + depends: + - ucrt + constrains: + - pthreads-win32 <0.0a0 + - msys2-conda-epoch <0.0a0 + license: MIT AND BSD-3-Clause-Clear + size: 36621 + timestamp: 1759768399557 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.17.0-h8a09558_0.conda + sha256: 666c0c431b23c6cec6e492840b176dde533d48b7e6fb8883f5071223433776aa + md5: 92ed62436b625154323d40d5f2f11dd7 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - pthread-stubs + - xorg-libxau >=1.0.11,<2.0a0 + - xorg-libxdmcp + license: MIT + license_family: MIT + size: 395888 + timestamp: 1727278577118 +- conda: https://conda.anaconda.org/conda-forge/win-64/libxcb-1.17.0-h0e4246c_0.conda + sha256: 08dec73df0e161c96765468847298a420933a36bc4f09b50e062df8793290737 + md5: a69bbf778a462da324489976c84cfc8c + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - pthread-stubs + - ucrt >=10.0.20348.0 + - xorg-libxau >=1.0.11,<2.0a0 + - xorg-libxdmcp + license: MIT + license_family: MIT + size: 1208687 + timestamp: 1727279378819 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + sha256: 6ae68e0b86423ef188196fff6207ed0c8195dd84273cb5623b85aa08033a410c + md5: 5aa797f8787fe7a17d1b0821485b5adc + depends: + - libgcc-ng >=12 + license: LGPL-2.1-or-later + size: 100393 + timestamp: 1702724383534 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxkbcommon-1.13.1-hca5e8e5_0.conda + sha256: d2195b5fbcb0af1ff7b345efdf89290c279b8d1d74f325ae0ac98148c375863c + md5: 2bca1fbb221d9c3c8e3a155784bbc2e9 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libstdcxx >=14 + - libxcb >=1.17.0,<2.0a0 + - libxml2 + - libxml2-16 >=2.14.6 + - xkeyboard-config + - xorg-libxau >=1.0.12,<2.0a0 + license: MIT/X11 Derivative + license_family: MIT + size: 837922 + timestamp: 1764794163823 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.15.1-h26afc86_0.conda + sha256: ec0735ae56c3549149eebd7dc22c0bed91fd50c02eaa77ff418613ddda190aa8 + md5: e512be7dc1f84966d50959e900ca121f + depends: + - __glibc >=2.17,<3.0.a0 + - icu >=75.1,<76.0a0 + - libgcc >=14 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libxml2-16 2.15.1 ha9997c6_0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 45283 + timestamp: 1761015644057 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libxml2-2.15.1-h7b7ecba_0.conda + sha256: ddf87bf05955d7870a41ca6f0e9fbd7b896b5a26ec1a98cd990883ac0b4f99bb + md5: e7ed73b34f9d43d80b7e80eba9bce9f3 + depends: + - __osx >=10.13 + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libxml2-16 2.15.1 ha1d9b0f_0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 39985 + timestamp: 1761015935429 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libxml2-2.15.1-h9329255_0.conda + sha256: c409e384ddf5976a42959265100d6b2c652017d250171eb10bae47ef8166193f + md5: fb5ce61da27ee937751162f86beba6d1 + depends: + - __osx >=11.0 + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libxml2-16 2.15.1 h0ff4647_0 + - libzlib >=1.3.1,<2.0a0 + license: MIT + license_family: MIT + size: 40607 + timestamp: 1761016108361 +- conda: https://conda.anaconda.org/conda-forge/win-64/libxml2-2.15.1-ha29bfb0_0.conda + sha256: fb51b91a01eac9ee5e26c67f4e081f09f970c18a3da5231b8172919a1e1b3b6b + md5: 87116b9de9c1825c3fd4ef92c984877b + depends: + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libxml2-16 2.15.1 h06f855e_0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: MIT + license_family: MIT + size: 43042 + timestamp: 1761016261024 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxml2-16-2.15.1-ha9997c6_0.conda + sha256: 71436e72a286ef8b57d6f4287626ff91991eb03c7bdbe835280521791efd1434 + md5: e7733bc6785ec009e47a224a71917e84 + depends: + - __glibc >=2.17,<3.0.a0 + - icu >=75.1,<76.0a0 + - libgcc >=14 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - libxml2 2.15.1 + license: MIT + license_family: MIT + size: 556302 + timestamp: 1761015637262 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libxml2-16-2.15.1-ha1d9b0f_0.conda + sha256: e23c5ac1da7b9b65bd18bf32b68717cd9da0387941178cb4d8cc5513eb69a0a9 + md5: 453807a4b94005e7148f89f9327eb1b7 + depends: + - __osx >=10.13 + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - libxml2 2.15.1 + license: MIT + license_family: MIT + size: 494318 + timestamp: 1761015899881 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libxml2-16-2.15.1-h0ff4647_0.conda + sha256: ebe2dd9da94280ad43da936efa7127d329b559f510670772debc87602b49b06d + md5: 438c97d1e9648dd7342f86049dd44638 + depends: + - __osx >=11.0 + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + constrains: + - libxml2 2.15.1 + license: MIT + license_family: MIT + size: 464952 + timestamp: 1761016087733 +- conda: https://conda.anaconda.org/conda-forge/win-64/libxml2-16-2.15.1-h06f855e_0.conda + sha256: 3f65ea0f04c7738116e74ca87d6e40f8ba55b3df31ef42b8cb4d78dd96645e90 + md5: 4a5ea6ec2055ab0dfd09fd0c498f834a + depends: + - icu >=75.1,<76.0a0 + - libiconv >=1.18,<2.0a0 + - liblzma >=5.8.1,<6.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - libxml2 2.15.1 + license: MIT + license_family: MIT + size: 518616 + timestamp: 1761016240185 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 + md5: edb0dca6bc32e4f4789199455a1dbeb8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 60963 + timestamp: 1727963148474 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.1-hd23fc13_2.conda + sha256: 8412f96504fc5993a63edf1e211d042a1fd5b1d51dedec755d2058948fcced09 + md5: 003a54a4e32b02f7355b50a837e699da + depends: + - __osx >=10.13 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 57133 + timestamp: 1727963183990 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.3.1-h8359307_2.conda + sha256: ce34669eadaba351cd54910743e6a2261b67009624dbc7daeeafdef93616711b + md5: 369964e85dc26bfe78f41399b366c435 + depends: + - __osx >=11.0 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 46438 + timestamp: 1727963202283 +- conda: https://conda.anaconda.org/conda-forge/win-64/libzlib-1.3.1-h2466b09_2.conda + sha256: ba945c6493449bed0e6e29883c4943817f7c79cbff52b83360f7b341277c6402 + md5: 41fbfac52c601159df6c01f875de31b9 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - zlib 1.3.1 *_2 + license: Zlib + license_family: Other + size: 55476 + timestamp: 1727963768015 +- conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-21.1.7-h472b3d1_0.conda + sha256: 5ae51ca08ac19ce5504b8201820ba6387365662033f20af2150ae7949f3f308a + md5: c9f0fc88c8f46637392b95bef78dc036 + depends: + - __osx >=10.13 + constrains: + - openmp 21.1.7|21.1.7.* + - intel-openmp <0.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 311027 + timestamp: 1764721464764 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-21.1.7-h4a912ad_0.conda + sha256: 002695e79b0e4c2d117a8bd190ffd62ef3d74a4cae002afa580bd1f98f9560a3 + md5: 05d475f50ddcc2173a6beece9960c6cb + depends: + - __osx >=11.0 + constrains: + - openmp 21.1.7|21.1.7.* + - intel-openmp <0.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 286129 + timestamp: 1764721670250 +- conda: https://conda.anaconda.org/conda-forge/win-64/llvm-openmp-21.1.7-h4fa8253_0.conda + sha256: 79121242419bf8b485c313fa28697c5c61ec207afa674eac997b3cb2fd1ff892 + md5: 5823741f7af732cd56036ae392396ec6 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - intel-openmp <0.0a0 + - openmp 21.1.7|21.1.7.* + license: Apache-2.0 WITH LLVM-exception + license_family: APACHE + size: 347969 + timestamp: 1764722187332 +- conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-tools-19.1.7-hb0207f0_2.conda + sha256: 8d042ee522bc9eb12c061f5f7e53052aeb4f13e576e624c8bebaf493725b95a0 + md5: 0f79b23c03d80f22ce4fe0022d12f6d2 + depends: + - __osx >=10.13 + - libllvm19 19.1.7 h56e7563_2 + - llvm-tools-19 19.1.7 h879f4bc_2 + constrains: + - llvmdev 19.1.7 + - llvm 19.1.7 + - clang 19.1.7 + - clang-tools 19.1.7 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 87962 + timestamp: 1757355027273 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-tools-19.1.7-h855ad52_2.conda + sha256: 09750c33b5d694c494cad9eafda56c61a62622264173d760341b49fb001afe82 + md5: 3e3ac06efc5fdc1aa675ca30bf7d53df + depends: + - __osx >=11.0 + - libllvm19 19.1.7 h8e0c9ce_2 + - llvm-tools-19 19.1.7 h91fd4e7_2 + constrains: + - llvm 19.1.7 + - llvmdev 19.1.7 + - clang-tools 19.1.7 + - clang 19.1.7 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 88390 + timestamp: 1757353535760 +- conda: https://conda.anaconda.org/conda-forge/osx-64/llvm-tools-19-19.1.7-h879f4bc_2.conda + sha256: fd281acb243323087ce672139f03a1b35ceb0e864a3b4e8113b9c23ca1f83bf0 + md5: bf644c6f69854656aa02d1520175840e + depends: + - __osx >=10.13 + - libcxx >=19 + - libllvm19 19.1.7 h56e7563_2 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 17198870 + timestamp: 1757354915882 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/llvm-tools-19-19.1.7-h91fd4e7_2.conda + sha256: 73f9506f7c32a448071340e73a0e8461e349082d63ecc4849e3eb2d1efc357dd + md5: 8237b150fcd7baf65258eef9a0fc76ef + depends: + - __osx >=11.0 + - libcxx >=19 + - libllvm19 19.1.7 h8e0c9ce_2 + - libzlib >=1.3.1,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + size: 16376095 + timestamp: 1757353442671 +- conda: https://conda.anaconda.org/conda-forge/win-64/mkl-2025.3.0-hac47afa_454.conda + sha256: 3c432e77720726c6bd83e9ee37ac8d0e3dd7c4cf9b4c5805e1d384025f9e9ab6 + md5: c83ec81713512467dfe1b496a8292544 + depends: + - llvm-openmp >=21.1.4 + - tbb >=2022.2.0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: LicenseRef-IntelSimplifiedSoftwareOct2022 + license_family: Proprietary + size: 99909095 + timestamp: 1761668703167 +- conda: https://conda.anaconda.org/conda-forge/noarch/nanobind-2.10.2-pyhd8ed1ab_1.conda + sha256: 70068c7533a77d6d06a2e26599573a08bf3f80e8d0c967ad4ba36b7ef2ce617f + md5: 17c9b59ad7308f779ba0e8506c71ae76 + depends: + - python >=3.10 + constrains: + - nanobind-abi ==17 + license: BSD-3-Clause + size: 181693 + timestamp: 1765369366075 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda + sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586 + md5: 47e340acb35de30501a76c7c799c41d7 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: X11 AND BSD-3-Clause + size: 891641 + timestamp: 1738195959188 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda + sha256: ea4a5d27ded18443749aefa49dc79f6356da8506d508b5296f60b8d51e0c4bd9 + md5: ced34dd9929f491ca6dab6a2927aff25 + depends: + - __osx >=10.13 + license: X11 AND BSD-3-Clause + size: 822259 + timestamp: 1738196181298 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda + sha256: 2827ada40e8d9ca69a153a45f7fd14f32b2ead7045d3bbb5d10964898fe65733 + md5: 068d497125e4bf8a66bf707254fff5ae + depends: + - __osx >=11.0 + license: X11 AND BSD-3-Clause + size: 797030 + timestamp: 1738196177597 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ninja-1.13.2-h171cf75_0.conda + sha256: 6f7d59dbec0a7b00bf5d103a4306e8886678b796ff2151b62452d4582b2a53fb + md5: b518e9e92493721281a60fa975bddc65 + depends: + - libstdcxx >=14 + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + license: Apache-2.0 + license_family: APACHE + size: 186323 + timestamp: 1763688260928 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ninja-1.13.2-hfc0b2d5_0.conda + sha256: 1646832e3c2389595569ab9a6234c119a4dedf6f4e55532a8bf07edab7f8037d + md5: afda563484aa0017278866707807a335 + depends: + - libcxx >=19 + - __osx >=10.13 + license: Apache-2.0 + license_family: APACHE + size: 178071 + timestamp: 1763688235442 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ninja-1.13.2-h49c215f_0.conda + sha256: 18d33c17b28d4771fc0b91b7b963c9ce31aca0a9af7dc8e9ee7c974bb207192c + md5: 175809cc57b2c67f27a0f238bd7f069d + depends: + - __osx >=11.0 + - libcxx >=19 + license: Apache-2.0 + license_family: APACHE + size: 164450 + timestamp: 1763688228613 +- conda: https://conda.anaconda.org/conda-forge/win-64/ninja-1.13.2-h477610d_0.conda + sha256: e41a945c34a5f0bd2109b73a65486cd93023fa0a9bcba3ef98f9a3da40ba1180 + md5: 7ecb9f2f112c66f959d2bb7dbdb89b67 + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + license: Apache-2.0 + license_family: APACHE + size: 309417 + timestamp: 1763688227932 +- conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py312heda63a1_0.conda + sha256: fe3459c75cf84dcef6ef14efcc4adb0ade66038ddd27cadb894f34f4797687d8 + md5: d8285bea2a350f63fab23bf460221f3f + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libgcc-ng >=12 + - liblapack >=3.9.0,<4.0a0 + - libstdcxx-ng >=12 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 7484186 + timestamp: 1707225809722 +- conda: https://conda.anaconda.org/conda-forge/osx-64/numpy-1.26.4-py312he3a82b2_0.conda + sha256: 6152b73fba3e227afa4952df8753128fc9669bbaf142ee8f9972bf9df3bf8856 + md5: 96c61a21c4276613748dba069554846b + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libcxx >=16 + - liblapack >=3.9.0,<4.0a0 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 6990646 + timestamp: 1707226178262 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/numpy-1.26.4-py312h8442bc7_0.conda + sha256: c8841d6d6f61fd70ca80682efbab6bdb8606dc77c68d8acabfbd7c222054f518 + md5: d83fc83d589e2625a3451c9a7e21047c + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libcxx >=16 + - liblapack >=3.9.0,<4.0a0 + - python >=3.12,<3.13.0a0 + - python >=3.12,<3.13.0a0 *_cpython + - python_abi 3.12.* *_cp312 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 6073136 + timestamp: 1707226249608 +- conda: https://conda.anaconda.org/conda-forge/win-64/numpy-1.26.4-py312h8753938_0.conda + sha256: 73570817a5109d396b4ebbe5124a89525959269fd33fa33fd413700289fbe0ef + md5: f9ac74c3b07c396014434aca1e58d362 + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - liblapack >=3.9.0,<4.0a0 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + constrains: + - numpy-base <0a0 + license: BSD-3-Clause + license_family: BSD + size: 6495445 + timestamp: 1707226412944 +- conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.6.0-h26f9b46_0.conda + sha256: a47271202f4518a484956968335b2521409c8173e123ab381e775c358c67fe6d + md5: 9ee58d5c534af06558933af3c845a780 + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=14 + license: Apache-2.0 + license_family: Apache + size: 3165399 + timestamp: 1762839186699 +- conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.6.0-h230baf5_0.conda + sha256: 36fe9fb316be22fcfb46d5fa3e2e85eec5ef84f908b7745f68f768917235b2d5 + md5: 3f50cdf9a97d0280655758b735781096 + depends: + - __osx >=10.13 + - ca-certificates + license: Apache-2.0 + license_family: Apache + size: 2778996 + timestamp: 1762840724922 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.6.0-h5503f6c_0.conda + sha256: ebe93dafcc09e099782fe3907485d4e1671296bc14f8c383cb6f3dfebb773988 + md5: b34dc4172653c13dcf453862f251af2b + depends: + - __osx >=11.0 + - ca-certificates + license: Apache-2.0 + license_family: Apache + size: 3108371 + timestamp: 1762839712322 +- conda: https://conda.anaconda.org/conda-forge/win-64/openssl-3.6.0-h725018a_0.conda + sha256: 6d72d6f766293d4f2aa60c28c244c8efed6946c430814175f959ffe8cab899b3 + md5: 84f8fb4afd1157f59098f618cd2437e4 + depends: + - ca-certificates + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: Apache-2.0 + license_family: Apache + size: 9440812 + timestamp: 1762841722179 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pango-1.56.4-hadf4263_0.conda + sha256: 3613774ad27e48503a3a6a9d72017087ea70f1426f6e5541dbdb59a3b626eaaf + md5: 79f71230c069a287efe3a8614069ddf1 + depends: + - __glibc >=2.17,<3.0.a0 + - cairo >=1.18.4,<2.0a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - fribidi >=1.0.10,<2.0a0 + - harfbuzz >=11.0.1 + - libexpat >=2.7.0,<3.0a0 + - libfreetype >=2.13.3 + - libfreetype6 >=2.13.3 + - libgcc >=13 + - libglib >=2.84.2,<3.0a0 + - libpng >=1.6.49,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + license: LGPL-2.1-or-later + size: 455420 + timestamp: 1751292466873 +- conda: https://conda.anaconda.org/conda-forge/osx-64/pango-1.56.4-h6ef8af8_0.conda + sha256: baab8ebf970fb6006ad26884f75f151316e545c47fb308a1de2dd47ddd0381c5 + md5: 8c6316c058884ffda0af1f1272910f94 + depends: + - __osx >=10.13 + - cairo >=1.18.4,<2.0a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - fribidi >=1.0.10,<2.0a0 + - harfbuzz >=11.0.1 + - libexpat >=2.7.0,<3.0a0 + - libfreetype >=2.13.3 + - libfreetype6 >=2.13.3 + - libglib >=2.84.2,<3.0a0 + - libpng >=1.6.49,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + license: LGPL-2.1-or-later + size: 432832 + timestamp: 1751292511389 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/pango-1.56.4-h875632e_0.conda + sha256: 705484ad60adee86cab1aad3d2d8def03a699ece438c864e8ac995f6f66401a6 + md5: 7d57f8b4b7acfc75c777bc231f0d31be + depends: + - __osx >=11.0 + - cairo >=1.18.4,<2.0a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - fribidi >=1.0.10,<2.0a0 + - harfbuzz >=11.0.1 + - libexpat >=2.7.0,<3.0a0 + - libfreetype >=2.13.3 + - libfreetype6 >=2.13.3 + - libglib >=2.84.2,<3.0a0 + - libpng >=1.6.49,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + license: LGPL-2.1-or-later + size: 426931 + timestamp: 1751292636271 +- conda: https://conda.anaconda.org/conda-forge/win-64/pango-1.56.4-h03d888a_0.conda + sha256: dcda7e9bedc1c87f51ceef7632a5901e26081a1f74a89799a3e50dbdc801c0bd + md5: 452d6d3b409edead3bd90fc6317cd6d4 + depends: + - cairo >=1.18.4,<2.0a0 + - fontconfig >=2.15.0,<3.0a0 + - fonts-conda-ecosystem + - fribidi >=1.0.10,<2.0a0 + - harfbuzz >=11.0.1 + - libexpat >=2.7.0,<3.0a0 + - libfreetype >=2.13.3 + - libfreetype6 >=2.13.3 + - libglib >=2.84.2,<3.0a0 + - libpng >=1.6.49,<1.7.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: LGPL-2.1-or-later + size: 454854 + timestamp: 1751292618315 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.47-haa7fec5_0.conda + sha256: 5e6f7d161356fefd981948bea5139c5aa0436767751a6930cb1ca801ebb113ff + md5: 7a3bff861a6583f1889021facefc08b1 + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - libgcc >=14 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 1222481 + timestamp: 1763655398280 +- conda: https://conda.anaconda.org/conda-forge/osx-64/pcre2-10.47-h13923f0_0.conda + sha256: 8d64a9d36073346542e5ea042ef8207a45a0069a2e65ce3323ee3146db78134c + md5: 08f970fb2b75f5be27678e077ebedd46 + depends: + - __osx >=10.13 + - bzip2 >=1.0.8,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 1106584 + timestamp: 1763655837207 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/pcre2-10.47-h30297fc_0.conda + sha256: 5e2e443f796f2fd92adf7978286a525fb768c34e12b1ee9ded4000a41b2894ba + md5: 9b4190c4055435ca3502070186eba53a + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 850231 + timestamp: 1763655726735 +- conda: https://conda.anaconda.org/conda-forge/win-64/pcre2-10.47-hd2b5f0e_0.conda + sha256: 3e9e02174edf02cb4bcdd75668ad7b74b8061791a3bc8bdb8a52ae336761ba3e + md5: 77eaf2336f3ae749e712f63e36b0f0a1 + depends: + - bzip2 >=1.0.8,<2.0a0 + - libzlib >=1.3.1,<2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: BSD-3-Clause + license_family: BSD + size: 995992 + timestamp: 1763655708300 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pixman-0.46.4-h54a6638_1.conda + sha256: 43d37bc9ca3b257c5dd7bf76a8426addbdec381f6786ff441dc90b1a49143b6a + md5: c01af13bdc553d1a8fbfff6e8db075f0 + depends: + - libgcc >=14 + - libstdcxx >=14 + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + license: MIT + license_family: MIT + size: 450960 + timestamp: 1754665235234 +- conda: https://conda.anaconda.org/conda-forge/osx-64/pixman-0.46.4-ha059160_1.conda + sha256: ff8b679079df25aa3ed5daf3f4e3a9c7ee79e7d4b2bd8a21de0f8e7ec7207806 + md5: 742a8552e51029585a32b6024e9f57b4 + depends: + - __osx >=10.13 + - libcxx >=19 + license: MIT + license_family: MIT + size: 390942 + timestamp: 1754665233989 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/pixman-0.46.4-h81086ad_1.conda + sha256: 29c9b08a9b8b7810f9d4f159aecfd205fce051633169040005c0b7efad4bc718 + md5: 17c3d745db6ea72ae2fce17e7338547f + depends: + - __osx >=11.0 + - libcxx >=19 + license: MIT + license_family: MIT + size: 248045 + timestamp: 1754665282033 +- conda: https://conda.anaconda.org/conda-forge/win-64/pixman-0.46.4-h5112557_1.conda + sha256: 246fce4706b3f8b247a7d6142ba8d732c95263d3c96e212b9d63d6a4ab4aff35 + md5: 08c8fa3b419df480d985e304f7884d35 + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + license: MIT + license_family: MIT + size: 542795 + timestamp: 1754665193489 +- conda: https://conda.anaconda.org/conda-forge/linux-64/prek-0.2.21-hb17b654_0.conda + sha256: e277c19a39744741cd7eae050f98d429e81a852922188e6250358916a3c0d705 + md5: 4dd75bf0e17085c2c0dba344d86cfac7 + depends: + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + constrains: + - __glibc >=2.17 + license: MIT + size: 4268979 + timestamp: 1765273410025 +- conda: https://conda.anaconda.org/conda-forge/osx-64/prek-0.2.21-h3c2ae71_0.conda + sha256: e4dac04265cff4e8b89229c0dae597cef2482dbca73028981980f9d13037d262 + md5: ff3263b2a28aeb6276f9a95834545fcc + depends: + - __osx >=10.13 + constrains: + - __osx >=10.13 + license: MIT + size: 4215827 + timestamp: 1765273501270 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/prek-0.2.21-h8d80559_0.conda + sha256: a6513d7572ca9c97cb847c6ebee4058818526a467550d70d18355c5402ca0351 + md5: b3dba98a2cc4157b8831de8c313c161c + depends: + - __osx >=11.0 + constrains: + - __osx >=11.0 + license: MIT + size: 3915450 + timestamp: 1765273509868 +- conda: https://conda.anaconda.org/conda-forge/win-64/prek-0.2.21-h18a1a76_0.conda + sha256: 3d7146fbd324734048bee0cef17cc917872f47c7d896167287c1a486a9f7427e + md5: 763ceba97fd03fb859f2ad149df18326 + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + license: MIT + size: 4464575 + timestamp: 1765273478838 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-hb9d3cd8_1002.conda + sha256: 9c88f8c64590e9567c6c80823f0328e58d3b1efb0e1c539c0315ceca764e0973 + md5: b3c17d95b5a10c6e64a21fa17573e70e + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: MIT + license_family: MIT + size: 8252 + timestamp: 1726802366959 +- conda: https://conda.anaconda.org/conda-forge/win-64/pthread-stubs-0.4-h0e40799_1002.conda + sha256: 7e446bafb4d692792310ed022fe284e848c6a868c861655a92435af7368bae7b + md5: 3c8f2573569bb816483e5cf57efbbe29 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + license: MIT + license_family: MIT + size: 9389 + timestamp: 1726802555076 +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.12-hd63d673_1_cpython.conda + build_number: 1 + sha256: 39898d24769a848c057ab861052e50bdc266310a7509efa3514b840e85a2ae98 + md5: 5c00c8cea14ee8d02941cab9121dce41 + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - ld_impl_linux-64 >=2.36.1 + - libexpat >=2.7.1,<3.0a0 + - libffi >=3.5.2,<3.6.0a0 + - libgcc >=14 + - liblzma >=5.8.1,<6.0a0 + - libnsl >=2.0.1,<2.1.0a0 + - libsqlite >=3.50.4,<4.0a0 + - libuuid >=2.41.2,<3.0a0 + - libxcrypt >=4.4.36 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.5.4,<4.0a0 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + constrains: + - python_abi 3.12.* *_cp312 + license: Python-2.0 + size: 31537229 + timestamp: 1761176876216 +- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.12.12-h74c2667_1_cpython.conda + build_number: 1 + sha256: 7d711e7a5085c05d186e1dbc86b8f10fb3d88fb3ce3034944ededef39173ff32 + md5: 902046b662c35d8d644514df0d9c7109 + depends: + - __osx >=10.13 + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.7.1,<3.0a0 + - libffi >=3.5.2,<3.6.0a0 + - liblzma >=5.8.1,<6.0a0 + - libsqlite >=3.50.4,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.5.4,<4.0a0 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + constrains: + - python_abi 3.12.* *_cp312 + license: Python-2.0 + size: 13779792 + timestamp: 1761176993883 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/python-3.12.12-h18782d2_1_cpython.conda + build_number: 1 + sha256: 626da9bb78459ce541407327d1e22ee673fd74e9103f1a0e0f4e3967ad0a23a7 + md5: 0322f2ddca2cafbf34ef3ddbea100f73 + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.7.1,<3.0a0 + - libffi >=3.5.2,<3.6.0a0 + - liblzma >=5.8.1,<6.0a0 + - libsqlite >=3.50.4,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.5.4,<4.0a0 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + constrains: + - python_abi 3.12.* *_cp312 + license: Python-2.0 + size: 12062421 + timestamp: 1761176476561 +- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.12.12-h0159041_1_cpython.conda + build_number: 1 + sha256: 9b163b0426c92eee1881d5c838e230a750a3fa372092db494772886ab91c2548 + md5: 42ae551e4c15837a582bea63412dc0b4 + depends: + - bzip2 >=1.0.8,<2.0a0 + - libexpat >=2.7.1,<3.0a0 + - libffi >=3.5.2,<3.6.0a0 + - liblzma >=5.8.1,<6.0a0 + - libsqlite >=3.50.4,<4.0a0 + - libzlib >=1.3.1,<2.0a0 + - openssl >=3.5.4,<4.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + constrains: + - python_abi 3.12.* *_cp312 + license: Python-2.0 + size: 15883484 + timestamp: 1761175152489 +- conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + build_number: 8 + sha256: 80677180dd3c22deb7426ca89d6203f1c7f1f256f2d5a94dc210f6e758229809 + md5: c3efd25ac4d74b1584d2f7a57195ddf1 + constrains: + - python 3.12.* *_cpython + license: BSD-3-Clause + license_family: BSD + size: 6958 + timestamp: 1752805918820 +- conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda + sha256: 2d6d0c026902561ed77cd646b5021aef2d4db22e57a5b0178dfc669231e06d2c + md5: 283b96675859b20a825f8fa30f311446 + depends: + - libgcc >=13 + - ncurses >=6.5,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 282480 + timestamp: 1740379431762 +- conda: https://conda.anaconda.org/conda-forge/osx-64/readline-8.2-h7cca4af_2.conda + sha256: 53017e80453c4c1d97aaf78369040418dea14cf8f46a2fa999f31bd70b36c877 + md5: 342570f8e02f2f022147a7f841475784 + depends: + - ncurses >=6.5,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 256712 + timestamp: 1740379577668 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/readline-8.2-h1d1bf99_2.conda + sha256: 7db04684d3904f6151eff8673270922d31da1eea7fa73254d01c437f49702e34 + md5: 63ef3f6e6d6d5c589e64f11263dc5676 + depends: + - ncurses >=6.5,<7.0a0 + license: GPL-3.0-only + license_family: GPL + size: 252359 + timestamp: 1740379663071 +- conda: https://conda.anaconda.org/conda-forge/linux-64/rhash-1.4.6-hb9d3cd8_1.conda + sha256: d5c73079c1dd2c2a313c3bfd81c73dbd066b7eb08d213778c8bff520091ae894 + md5: c1c9b02933fdb2cfb791d936c20e887e + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: MIT + license_family: MIT + size: 193775 + timestamp: 1748644872902 +- conda: https://conda.anaconda.org/conda-forge/osx-64/rhash-1.4.6-h6e16a3a_1.conda + sha256: 65c946fc5a9bb71772a7ac9bad64ff08ac07f7d5311306c2dcc1647157b96706 + md5: d0fcaaeff83dd4b6fb035c2f36df198b + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 185180 + timestamp: 1748644989546 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/rhash-1.4.6-h5505292_1.conda + sha256: f4957c05f4fbcd99577de8838ca4b5b1ae4b400a44be647a0159c14f85b9bfc0 + md5: 029e812c8ae4e0d4cf6ff4f7d8dc9366 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 185448 + timestamp: 1748645057503 +- conda: https://conda.anaconda.org/conda-forge/linux-64/scipy-1.16.3-py312h7a1785b_1.conda + sha256: dcb7080ccb113d760c94a2f5dd32239452793fe9c9cff743ffec27fa128e4801 + md5: c6e0e1f1d9ac014a980574cfe8caa25f + depends: + - __glibc >=2.17,<3.0.a0 + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libgcc >=14 + - libgfortran + - libgfortran5 >=14.3.0 + - liblapack >=3.9.0,<4.0a0 + - libstdcxx >=14 + - numpy <2.6 + - numpy >=1.23,<3 + - numpy >=1.25.2 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + license: BSD-3-Clause + license_family: BSD + size: 16782787 + timestamp: 1763220711836 +- conda: https://conda.anaconda.org/conda-forge/osx-64/scipy-1.16.3-py312he2acf2f_1.conda + sha256: e37dbb3881e422cd4979882f34f760c0f66ba7a90fcecd95cd55472d41e661d7 + md5: d84da8b0c914cd3071be89b458e2811e + depends: + - __osx >=10.13 + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libcxx >=19 + - libgfortran + - libgfortran5 >=14.3.0 + - libgfortran5 >=15.2.0 + - liblapack >=3.9.0,<4.0a0 + - numpy <2.6 + - numpy >=1.23,<3 + - numpy >=1.25.2 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + license: BSD-3-Clause + license_family: BSD + size: 15248796 + timestamp: 1763221288506 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/scipy-1.16.3-py312ha6bbf71_1.conda + sha256: 39586c1ebc804d481e1062551f7c39a2cfe6f3e3a2c18a9e460388fb8bbd5302 + md5: d196eb3cfffef4a8ea51fbb55dbe8188 + depends: + - __osx >=11.0 + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - libcxx >=19 + - libgfortran + - libgfortran5 >=14.3.0 + - libgfortran5 >=15.2.0 + - liblapack >=3.9.0,<4.0a0 + - numpy <2.6 + - numpy >=1.23,<3 + - numpy >=1.25.2 + - python >=3.12,<3.13.0a0 + - python >=3.12,<3.13.0a0 *_cpython + - python_abi 3.12.* *_cp312 + license: BSD-3-Clause + license_family: BSD + size: 13777809 + timestamp: 1763221087258 +- conda: https://conda.anaconda.org/conda-forge/win-64/scipy-1.16.3-py312hd0164fe_1.conda + sha256: 898caf77968dd262b84568316af5a69a511d573b39addf10739124c6c2909ef8 + md5: a586f151952f8157e00365a564d08914 + depends: + - libblas >=3.9.0,<4.0a0 + - libcblas >=3.9.0,<4.0a0 + - liblapack >=3.9.0,<4.0a0 + - numpy <2.6 + - numpy >=1.23,<3 + - numpy >=1.25.2 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: BSD-3-Clause + license_family: BSD + size: 14804382 + timestamp: 1763221169515 +- conda: https://conda.anaconda.org/conda-forge/noarch/sdkroot_env_osx-64-14.5-hbf94ba6_4.conda + sha256: e0ec582a2ef7eca39fb40b17753e0a4006c02e794e3fc85ab598931d16ba28d5 + md5: bfc192e9093bd93e38185351be812157 + license: BSD-3-Clause + license_family: BSD + size: 8900 + timestamp: 1764616252089 +- conda: https://conda.anaconda.org/conda-forge/noarch/sdkroot_env_osx-arm64-14.5-hfa17104_3.conda + sha256: 553cb066814b77257104073d7b81c3038459bf4ec7f5c0c435c666887f642b0b + md5: 3351af6c29661d56d7ef9ea9699d1314 + license: BSD-3-Clause + license_family: BSD + size: 8790 + timestamp: 1764290423498 +- conda: https://conda.anaconda.org/conda-forge/osx-64/sigtool-0.1.3-h88f4db0_0.tar.bz2 + sha256: 46fdeadf8f8d725819c4306838cdfd1099cd8fe3e17bd78862a5dfdcd6de61cf + md5: fbfb84b9de9a6939cb165c02c69b1865 + depends: + - openssl >=3.0.0,<4.0a0 + license: MIT + license_family: MIT + size: 213817 + timestamp: 1643442169866 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/sigtool-0.1.3-h44b9a77_0.tar.bz2 + sha256: 70791ae00a3756830cb50451db55f63e2a42a2fa2a8f1bab1ebd36bbb7d55bff + md5: 4a2cac04f86a4540b8c9b8d8f597848f + depends: + - openssl >=3.0.0,<4.0a0 + license: MIT + license_family: MIT + size: 210264 + timestamp: 1643442231687 +- conda: https://conda.anaconda.org/conda-forge/linux-64/simde-0.8.2-h84d6215_0.conda + sha256: c055f966ebd72a768e25994ea7bdea0f0eecf481128c01e26f68c4ab11ae21b7 + md5: aa4dd437f90aa209a0309313af213964 + depends: + - __glibc >=2.17,<3.0.a0 + license: MIT + license_family: MIT + size: 480387 + timestamp: 1724439702451 +- conda: https://conda.anaconda.org/conda-forge/osx-64/simde-0.8.2-h37c8870_0.conda + sha256: fc44261e4a4e8f4bdab010d7788fa2d90d8bef51d37e1b8ec61ece047443e037 + md5: e456c3a390b37a3192eb460bfe33587f + depends: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 483653 + timestamp: 1724439763303 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/simde-0.8.2-h7b3277c_0.conda + sha256: 282929ab21b49577fd81c5a8d2d461c028086a4be6044762f6a5f546e423f299 + md5: fc5b5caefb2778064799b76751a69b69 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 482908 + timestamp: 1724439819598 +- conda: https://conda.anaconda.org/conda-forge/win-64/simde-0.8.2-hc790b64_0.conda + sha256: 518995344f4ac4c94c2eb207fb806af960a82fca5f87cab066de6ada20a974c0 + md5: 3dc81609aedcf489d8c2abe82c9ceb46 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + size: 483090 + timestamp: 1714665491492 +- conda: https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.28-h4ee821c_8.conda + sha256: 0053c17ffbd9f8af1a7f864995d70121c292e317804120be4667f37c92805426 + md5: 1bad93f0aa428d618875ef3a588a889e + depends: + - __glibc >=2.28 + - kernel-headers_linux-64 4.18.0 he073ed8_8 + - tzdata + license: LGPL-2.0-or-later AND LGPL-2.0-or-later WITH exceptions AND GPL-2.0-or-later + license_family: GPL + size: 24210909 + timestamp: 1752669140965 +- conda: https://conda.anaconda.org/conda-forge/osx-64/tapi-1600.0.11.8-h8d8e812_0.conda + sha256: 2602632f7923fd59042a897bfb22f050d78f2b5960d53565eae5fa6a79308caa + md5: aae272355bc3f038e403130a5f6f5495 + depends: + - libcxx >=19.0.0.a0 + - __osx >=10.13 + - ncurses >=6.5,<7.0a0 + license: NCSA + size: 213480 + timestamp: 1762535196805 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/tapi-1600.0.11.8-h997e182_0.conda + sha256: dcb678fa77f448fa981bf3783902afe09b8838436f3092e9ecaf6a718c87f642 + md5: 347261d575a245cb6111fb2cb5a79fc7 + depends: + - libcxx >=19.0.0.a0 + - __osx >=11.0 + - ncurses >=6.5,<7.0a0 + license: NCSA + size: 199699 + timestamp: 1762535277608 +- conda: https://conda.anaconda.org/conda-forge/win-64/tbb-2022.3.0-hd094cb3_1.conda + sha256: c31cac57913a699745d124cdc016a63e31c5749f16f60b3202414d071fc50573 + md5: 17c38aaf14c640b85c4617ccb59c1146 + depends: + - libhwloc >=2.12.1,<2.12.2.0a0 + - ucrt >=10.0.20348.0 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + license: Apache-2.0 + license_family: APACHE + size: 155714 + timestamp: 1762510341121 +- conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_ha0e22de_103.conda + sha256: 1544760538a40bcd8ace2b1d8ebe3eb5807ac268641f8acdc18c69c5ebfeaf64 + md5: 86bc20552bf46075e3d92b67f089172d + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib >=1.3.1,<2.0a0 + constrains: + - xorg-libx11 >=1.8.12,<2.0a0 + license: TCL + license_family: BSD + size: 3284905 + timestamp: 1763054914403 +- conda: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-hf689a15_3.conda + sha256: 0d0b6cef83fec41bc0eb4f3b761c4621b7adfb14378051a8177bd9bb73d26779 + md5: bd9f1de651dbd80b51281c694827f78f + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + license: TCL + license_family: BSD + size: 3262702 + timestamp: 1763055085507 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-h892fb3f_3.conda + sha256: ad0c67cb03c163a109820dc9ecf77faf6ec7150e942d1e8bb13e5d39dc058ab7 + md5: a73d54a5abba6543cb2f0af1bfbd6851 + depends: + - __osx >=11.0 + - libzlib >=1.3.1,<2.0a0 + license: TCL + license_family: BSD + size: 3125484 + timestamp: 1763055028377 +- conda: https://conda.anaconda.org/conda-forge/win-64/tk-8.6.13-h2c6b04d_3.conda + sha256: 4581f4ffb432fefa1ac4f85c5682cc27014bcd66e7beaa0ee330e927a7858790 + md5: 7cb36e506a7dba4817970f8adb6396f9 + depends: + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: TCL + license_family: BSD + size: 3472313 + timestamp: 1763055164278 +- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + sha256: 5aaa366385d716557e365f0a4e9c3fca43ba196872abbbe3d56bb610d131e192 + md5: 4222072737ccff51314b5ece9c7d6f5a + license: LicenseRef-Public-Domain + size: 122968 + timestamp: 1742727099393 +- conda: https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.26100.0-h57928b3_0.conda + sha256: 3005729dce6f3d3f5ec91dfc49fc75a0095f9cd23bab49efb899657297ac91a5 + md5: 71b24316859acd00bdb8b38f5e2ce328 + constrains: + - vc14_runtime >=14.29.30037 + - vs2015_runtime >=14.29.30037 + license: LicenseRef-MicrosoftWindowsSDK10 + size: 694692 + timestamp: 1756385147981 +- conda: https://conda.anaconda.org/conda-forge/win-64/vc-14.3-h2b53caa_33.conda + sha256: 7036945b5fff304064108c22cbc1bb30e7536363782b0456681ee6cf209138bd + md5: 2d1c042360c09498891809a3765261be + depends: + - vc14_runtime >=14.42.34433 + track_features: + - vc14 + license: BSD-3-Clause + license_family: BSD + size: 19070 + timestamp: 1765216452130 +- conda: https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.44.35208-h818238b_33.conda + sha256: 7e8f7da25d7ce975bbe7d7e6d6e899bf1f253e524a3427cc135a79f3a79c457c + md5: fb8e4914c5ad1c71b3c519621e1df7b8 + depends: + - ucrt >=10.0.20348.0 + - vcomp14 14.44.35208 h818238b_33 + constrains: + - vs2015_runtime 14.44.35208.* *_33 + license: LicenseRef-MicrosoftVisualCpp2015-2022Runtime + license_family: Proprietary + size: 684323 + timestamp: 1765216366832 +- conda: https://conda.anaconda.org/conda-forge/win-64/vcomp14-14.44.35208-h818238b_33.conda + sha256: f79edd878094e86af2b2bc1455b0a81e02839a784fb093d5996ad4cf7b810101 + md5: 4cb6942b4bd846e51b4849f4a93c7e6d + depends: + - ucrt >=10.0.20348.0 + constrains: + - vs2015_runtime 14.44.35208.* *_33 + license: LicenseRef-MicrosoftVisualCpp2015-2022Runtime + license_family: Proprietary + size: 115073 + timestamp: 1765216325898 +- conda: https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.44.35208-h38c0c73_33.conda + sha256: 93fc61d05770f4c6b66214ed3494f632bf6e0e6ee7fcb0fb0a847a4bed131953 + md5: 65e5a2127012cd4dbc9354579661b9fd + depends: + - vc14_runtime >=14.44.35208 + license: BSD-3-Clause + license_family: BSD + size: 19159 + timestamp: 1765216369037 +- conda: https://conda.anaconda.org/conda-forge/win-64/vs2022_win-64-19.44.35207-ha74f236_33.conda + sha256: 021eea50461e147d64eb5954340ff4e7b403d2c4d0c7180b97321eb8a49113c7 + md5: c4fc0aeef78517591c76a4b20f0e7fe5 + depends: + - vswhere + constrains: + - vs_win-64 2022.14 + track_features: + - vc14 + license: BSD-3-Clause + size: 22665 + timestamp: 1765216328494 +- conda: https://conda.anaconda.org/conda-forge/noarch/vswhere-3.1.7-h40126e0_1.conda + sha256: b72270395326dc56de9bd6ca82f63791b3c8c9e2b98e25242a9869a4ca821895 + md5: f622897afff347b715d046178ad745a5 + depends: + - __win + license: MIT + license_family: MIT + size: 238764 + timestamp: 1745560912727 +- conda: https://conda.anaconda.org/conda-forge/linux-64/wayland-1.24.0-hd6090a7_1.conda + sha256: 3aa04ae8e9521d9b56b562376d944c3e52b69f9d2a0667f77b8953464822e125 + md5: 035da2e4f5770f036ff704fa17aace24 + depends: + - __glibc >=2.17,<3.0.a0 + - libexpat >=2.7.1,<3.0a0 + - libffi >=3.5.2,<3.6.0a0 + - libgcc >=14 + - libstdcxx >=14 + license: MIT + license_family: MIT + size: 329779 + timestamp: 1761174273487 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xkeyboard-config-2.46-hb03c661_0.conda + sha256: aa03b49f402959751ccc6e21932d69db96a65a67343765672f7862332aa32834 + md5: 71ae752a748962161b4740eaff510258 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - xorg-libx11 >=1.8.12,<2.0a0 + license: MIT + license_family: MIT + size: 396975 + timestamp: 1759543819846 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libice-1.1.2-hb9d3cd8_0.conda + sha256: c12396aabb21244c212e488bbdc4abcdef0b7404b15761d9329f5a4a39113c4b + md5: fb901ff28063514abb6046c9ec2c4a45 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: MIT + license_family: MIT + size: 58628 + timestamp: 1734227592886 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libice-1.1.2-h0e40799_0.conda + sha256: bf1d34142b1bf9b5a4eed96bcc77bc4364c0e191405fd30d2f9b48a04d783fd3 + md5: 105cb93a47df9c548e88048dc9cbdbc9 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + - xorg-libx11 >=1.8.10,<2.0a0 + license: MIT + license_family: MIT + size: 236306 + timestamp: 1734228116846 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libsm-1.2.6-he73a12e_0.conda + sha256: 277841c43a39f738927145930ff963c5ce4c4dacf66637a3d95d802a64173250 + md5: 1c74ff8c35dcadf952a16f752ca5aa49 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libuuid >=2.38.1,<3.0a0 + - xorg-libice >=1.1.2,<2.0a0 + license: MIT + license_family: MIT + size: 27590 + timestamp: 1741896361728 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libsm-1.2.6-h0e40799_0.conda + sha256: 065d49b0d1e6873ed1238e962f56cb8204c585cdc5c9bd4ae2bf385cadb5bd65 + md5: 570c9a6d9b4909e45d49e9a5daa528de + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + - xorg-libice >=1.1.2,<2.0a0 + license: MIT + license_family: MIT + size: 97096 + timestamp: 1741896840170 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.8.12-h4f16b4b_0.conda + sha256: 51909270b1a6c5474ed3978628b341b4d4472cd22610e5f22b506855a5e20f67 + md5: db038ce880f100acc74dba10302b5630 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libxcb >=1.17.0,<2.0a0 + license: MIT + license_family: MIT + size: 835896 + timestamp: 1741901112627 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libx11-1.8.12-hf48077a_0.conda + sha256: 3f0854bc592d31a5742c6c4550914a976c89d73b74d052545b418521d21b3043 + md5: c4f435ac09fd41606bba9f0deb12e412 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - libxcb >=1.17.0,<2.0a0 + - ucrt >=10.0.20348.0 + license: MIT + license_family: MIT + size: 951392 + timestamp: 1741902072732 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.12-hb03c661_1.conda + sha256: 6bc6ab7a90a5d8ac94c7e300cc10beb0500eeba4b99822768ca2f2ef356f731b + md5: b2895afaf55bf96a8c8282a2e47a5de0 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 15321 + timestamp: 1762976464266 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxau-1.0.12-hba3369d_1.conda + sha256: 156a583fa43609507146de1c4926172286d92458c307bb90871579601f6bc568 + md5: 8436cab9a76015dfe7208d3c9f97c156 + depends: + - libgcc >=14 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + license: MIT + license_family: MIT + size: 109246 + timestamp: 1762977105140 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxcomposite-0.4.6-hb9d3cd8_2.conda + sha256: 753f73e990c33366a91fd42cc17a3d19bb9444b9ca5ff983605fa9e953baf57f + md5: d3c295b50f092ab525ffe3c2aa4b7413 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxfixes >=6.0.1,<7.0a0 + license: MIT + license_family: MIT + size: 13603 + timestamp: 1727884600744 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxcursor-1.2.3-hb9d3cd8_0.conda + sha256: 832f538ade441b1eee863c8c91af9e69b356cd3e9e1350fff4fe36cc573fc91a + md5: 2ccd714aa2242315acaf0a67faea780b + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxfixes >=6.0.1,<7.0a0 + - xorg-libxrender >=0.9.11,<0.10.0a0 + license: MIT + license_family: MIT + size: 32533 + timestamp: 1730908305254 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdamage-1.1.6-hb9d3cd8_0.conda + sha256: 43b9772fd6582bf401846642c4635c47a9b0e36ca08116b3ec3df36ab96e0ec0 + md5: b5fcc7172d22516e1f965490e65e33a4 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxfixes >=6.0.1,<7.0a0 + license: MIT + license_family: MIT + size: 13217 + timestamp: 1727891438799 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdmcp-1.1.5-hb03c661_1.conda + sha256: 25d255fb2eef929d21ff660a0c687d38a6d2ccfbcbf0cc6aa738b12af6e9d142 + md5: 1dafce8548e38671bea82e3f5c6ce22f + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: MIT + license_family: MIT + size: 20591 + timestamp: 1762976546182 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxdmcp-1.1.5-hba3369d_1.conda + sha256: 366b8ae202c3b48958f0b8784bbfdc37243d3ee1b1cd4b8e76c10abe41fa258b + md5: a7c03e38aa9c0e84d41881b9236eacfb + depends: + - libgcc >=14 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + license: MIT + license_family: MIT + size: 70691 + timestamp: 1762977015220 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.6-hb9d3cd8_0.conda + sha256: da5dc921c017c05f38a38bd75245017463104457b63a1ce633ed41f214159c14 + md5: febbab7d15033c913d53c7a2c102309d + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + license: MIT + license_family: MIT + size: 50060 + timestamp: 1727752228921 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxext-1.3.6-h0e40799_0.conda + sha256: 7fdc3135a340893aa544921115c3994ef4071a385d47cc11232d818f006c63e4 + md5: 4cd74e74f063fb6900d6eed2e9288112 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + - xorg-libx11 >=1.8.10,<2.0a0 + license: MIT + license_family: MIT + size: 284715 + timestamp: 1727752838922 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxfixes-6.0.2-hb03c661_0.conda + sha256: 83c4c99d60b8784a611351220452a0a85b080668188dce5dfa394b723d7b64f4 + md5: ba231da7fccf9ea1e768caf5c7099b84 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - xorg-libx11 >=1.8.12,<2.0a0 + license: MIT + license_family: MIT + size: 20071 + timestamp: 1759282564045 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxi-1.8.2-hb9d3cd8_0.conda + sha256: 1a724b47d98d7880f26da40e45f01728e7638e6ec69f35a3e11f92acd05f9e7a + md5: 17dcc85db3c7886650b8908b183d6876 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxfixes >=6.0.1,<7.0a0 + license: MIT + license_family: MIT + size: 47179 + timestamp: 1727799254088 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxinerama-1.1.5-h5888daf_1.conda + sha256: 1b9141c027f9d84a9ee5eb642a0c19457c788182a5a73c5a9083860ac5c20a8c + md5: 5e2eb9bf77394fc2e5918beefec9f9ab + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libstdcxx >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + license: MIT + license_family: MIT + size: 13891 + timestamp: 1727908521531 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxpm-3.5.17-h0e40799_1.conda + sha256: a605b43b2622a4cae8df6edc148c02b527da4ea165ec67cabb5c9bc4f3f8ef13 + md5: e8b816fb37bc61aa3f1c08034331ef53 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxt >=1.3.0,<2.0a0 + license: MIT + license_family: MIT + size: 236112 + timestamp: 1727801849623 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrandr-1.5.4-hb9d3cd8_0.conda + sha256: ac0f037e0791a620a69980914a77cb6bb40308e26db11698029d6708f5aa8e0d + md5: 2de7f99d6581a4a7adbff607b5c278ca + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxrender >=0.9.11,<0.10.0a0 + license: MIT + license_family: MIT + size: 29599 + timestamp: 1727794874300 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.12-hb9d3cd8_0.conda + sha256: 044c7b3153c224c6cedd4484dd91b389d2d7fd9c776ad0f4a34f099b3389f4a1 + md5: 96d57aba173e878a2089d5638016dc5e + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + license: MIT + license_family: MIT + size: 33005 + timestamp: 1734229037766 +- conda: https://conda.anaconda.org/conda-forge/win-64/xorg-libxt-1.3.1-h0e40799_0.conda + sha256: c940a6b71a1e59450b01ebfb3e21f3bbf0a8e611e5fbfc7982145736b0f20133 + md5: 31baf0ce8ef19f5617be73aee0527618 + depends: + - libgcc >=13 + - libwinpthread >=12.0.0.r4.gg4f2fc60ca + - ucrt >=10.0.20348.0 + - xorg-libice >=1.1.1,<2.0a0 + - xorg-libsm >=1.2.4,<2.0a0 + - xorg-libx11 >=1.8.10,<2.0a0 + license: MIT + license_family: MIT + size: 918674 + timestamp: 1731861024233 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxtst-1.2.5-hb9d3cd8_3.conda + sha256: 752fdaac5d58ed863bbf685bb6f98092fe1a488ea8ebb7ed7b606ccfce08637a + md5: 7bbe9a0cc0df0ac5f5a8ad6d6a11af2f + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + - xorg-libxi >=1.7.10,<2.0a0 + license: MIT + license_family: MIT + size: 32808 + timestamp: 1727964811275 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-libxxf86vm-1.1.6-hb9d3cd8_0.conda + sha256: 8a4e2ee642f884e6b78c20c0892b85dd9b2a6e64a6044e903297e616be6ca35b + md5: 5efa5fa6243a622445fdfd72aee15efa + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - xorg-libx11 >=1.8.10,<2.0a0 + - xorg-libxext >=1.3.6,<2.0a0 + license: MIT + license_family: MIT + size: 17819 + timestamp: 1734214575628 +- conda: https://conda.anaconda.org/conda-forge/linux-64/xorg-xorgproto-2024.1-hb9d3cd8_1.conda + sha256: 1316680be6edddee0156b86ec1102fc8286f51c1a5440366ed1db596a2dc3731 + md5: 7c21106b851ec72c037b162c216d8f05 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + license: MIT + license_family: MIT + size: 565425 + timestamp: 1726846388217 +- conda: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.3.1-hb9d3cd8_2.conda + sha256: 5d7c0e5f0005f74112a34a7425179f4eb6e73c92f5d109e6af4ddeca407c92ab + md5: c9f075ab2f33b3bbee9e62d4ad0a6cd8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib 1.3.1 hb9d3cd8_2 + license: Zlib + license_family: Other + size: 92286 + timestamp: 1727963153079 +- conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-1.3.1-hd23fc13_2.conda + sha256: 219edbdfe7f073564375819732cbf7cc0d7c7c18d3f546a09c2dfaf26e4d69f3 + md5: c989e0295dcbdc08106fe5d9e935f0b9 + depends: + - __osx >=10.13 + - libzlib 1.3.1 hd23fc13_2 + license: Zlib + license_family: Other + size: 88544 + timestamp: 1727963189976 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-1.3.1-h8359307_2.conda + sha256: 58f8860756680a4831c1bf4f294e2354d187f2e999791d53b1941834c4b37430 + md5: e3170d898ca6cb48f1bb567afb92f775 + depends: + - __osx >=11.0 + - libzlib 1.3.1 h8359307_2 + license: Zlib + license_family: Other + size: 77606 + timestamp: 1727963209370 +- conda: https://conda.anaconda.org/conda-forge/win-64/zlib-1.3.1-h2466b09_2.conda + sha256: 8c688797ba23b9ab50cef404eca4d004a948941b6ee533ead0ff3bf52012528c + md5: be60c4e8efa55fddc17b4131aa47acbd + depends: + - libzlib 1.3.1 h2466b09_2 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: Zlib + license_family: Other + size: 107439 + timestamp: 1727963788936 +- conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.7-hb78ec9c_6.conda + sha256: 68f0206ca6e98fea941e5717cec780ed2873ffabc0e1ed34428c061e2c6268c7 + md5: 4a13eeac0b5c8e5b8ab496e6c4ddd829 + depends: + - __glibc >=2.17,<3.0.a0 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 601375 + timestamp: 1764777111296 +- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-h3eecb57_6.conda + sha256: 47101a4055a70a4876ffc87b750ab2287b67eca793f21c8224be5e1ee6394d3f + md5: 727109b184d680772e3122f40136d5ca + depends: + - __osx >=10.13 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 528148 + timestamp: 1764777156963 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hbf9d68e_6.conda + sha256: 9485ba49e8f47d2b597dd399e88f4802e100851b27c21d7525625b0b4025a5d9 + md5: ab136e4c34e97f34fb621d2592a393d8 + depends: + - __osx >=11.0 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 433413 + timestamp: 1764777166076 +- conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.7-h534d264_6.conda + sha256: 368d8628424966fd8f9c8018326a9c779e06913dd39e646cf331226acc90e5b2 + md5: 053b84beec00b71ea8ff7a4f84b55207 + depends: + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 + - ucrt >=10.0.20348.0 + - libzlib >=1.3.1,<2.0a0 + license: BSD-3-Clause + license_family: BSD + size: 388453 + timestamp: 1764777142545 diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 000000000..09fccd252 --- /dev/null +++ b/pixi.toml @@ -0,0 +1,120 @@ +[workspace] +name = "proxsuite" +version = "0.7.2" +description = "The Advanced Proximal Optimization Toolbox" +channels = ["conda-forge"] +platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"] + +[dependencies] +ccache = ">=4.9.1" +cmake = ">=3.22" +cxx-compiler = ">=1.7.0" +ninja = ">=1.11" +eigen = ">=3.4.0,<4" +simde = ">=0.8.2,<0.9" +python = ">=3.8, <3.13" # for python bindings +python_abi = ">=3.8, <3.13" # for python bindings +numpy = ">=1.24.0,<2" # for python bindings +nanobind = ">=2.9.2,<3" # for python bindings +catch2 = ">=3.8.0,<4" # for test +cereal = ">=1.3.2,<2" # for test +libmatio = ">=1.5.28,<2" # for test (maros meszaros) +scipy = ">=1.16.3,<2" # for test +doxygen = ">=1.13.2,<2" # for doc +graphviz = ">=13.1.2,<14" # for doc +prek = ">=0.2.21,<0.3" # for linting + +[activation.env] +# Setup ccache +CMAKE_CXX_COMPILER_LAUNCHER = "ccache" +# Create compile_commands.json for language server +CMAKE_EXPORT_COMPILE_COMMANDS = "ON" +# Activate color output with Ninja +CMAKE_COLOR_DIAGNOSTICS = "ON" +# Help ccache manage generated files and PCH (https://ccache.dev/manual/latest.html#_precompiled_headers) +CCACHE_SLOPPINESS = "include_file_ctime,include_file_mtime,pch_defines,time_macros" + +[tasks.configure] +cmd = [ + "cmake", + "-S", + ".", + "-B", + "build", + "-G", + "Ninja", + "-DJRL_CMAKEMODULES_SOURCE_DIR=$JRL_CMAKEMODULES_SOURCE_DIR", + "--profiling-output=cmake-profiling.json", + "--profiling-format=google-trace", + "-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX", + "-DCMAKE_BUILD_TYPE=Release", + "-DBUILD_WITH_VECTORIZATION_SUPPORT=ON", + "-DBUILD_WITH_SERIALIZATION=ON", + "-DBUILD_MAROS_MESZAROS_TESTS=OFF", + "-DENABLE_WARNINGS=OFF", + "-DENABLE_WARNINGS_AS_ERRORS=OFF", + "-DBUILD_TESTING=ON", + "-DBUILD_DOCUMENTATION=ON", + "-DBUILD_EXAMPLES=ON", + "-DBUILD_BENCHMARK=ON", + "-DBUILD_PYTHON_INTERFACE=ON", + "-DGENERATE_PYTHON_STUBS=ON", + "-DBUILD_WITH_OPENMP_SUPPORT=ON", + "-DBUILD_BINDINGS_WITH_AVX2_SUPPORT=ON", + "-DBUILD_BINDINGS_WITH_AVX512_SUPPORT=ON", +] + +[tasks.reconfigure] +depends-on = ["clear", "configure"] + +[tasks.build] +depends-on = ["configure"] +cmd = ["cmake", "--build", "build"] + +[tasks.test] +depends-on = ["build"] +cmd = ["ctest", "--test-dir", "build", "--output-on-failure"] + +[tasks.test-import-python] +depends-on = ["install"] +cmd = [ + "python", + "-c", + "import proxsuite; print(proxsuite.helpers.printVersion())", +] + +[tasks.install] +depends-on = ["build"] +cmd = ["cmake", "--install", "build"] + + +[tasks._test-packaging-configure] +depends-on = ["install"] +cmd = [ + "cmake", + "-G", + "Ninja", + "-S", + "test/packaging/cmake", + "-B", + "build/test-packaging", + "-DCMAKE_VERBOSE_MAKEFILE=1", +] + +[tasks.test-packaging] +depends-on = ["_test-packaging-configure"] +cmd = ["cmake", "--build", "build/test-packaging"] + +[tasks.doc] +depends-on = ["configure"] +cmd = ["cmake", "--build", "build", "--target", "doc"] + +[tasks.clear] +cmd = ["cmake", "-E", "remove_directory", "build"] + +[tasks.clean] +depends-on = ["configure"] +cmd = ["cmake", "--build", "build", "--target", "clean"] + +[tasks.lint] +cmd = ["prek", "run", "-a"] diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dbea3694d..0963552ce 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,116 +1,12 @@ -include(../cmake-external/doctest.cmake) -find_package(Matio REQUIRED) - -add_library(${PROJECT_NAME}-doctest STATIC doctest/doctest.cpp) -target_include_directories(${PROJECT_NAME}-doctest PUBLIC ./doctest) -add_library(cnpy OBJECT src/cnpy.cpp) -target_link_libraries(cnpy Eigen3::Eigen) -target_include_directories(cnpy PUBLIC ./include) - -file(GLOB_RECURSE TEST_HEADERS ./include/*.hpp) -ADD_HEADER_GROUP(TEST_HEADERS) - -add_library( - proxsuite-test-util - STATIC - ./src/util_f64.cpp - ./src/util_f32.cpp - ${TEST_HEADERS} -) -target_include_directories(proxsuite-test-util PUBLIC ./include) -if(BUILD_WITH_VECTORIZATION_SUPPORT) - target_link_libraries(proxsuite-test-util proxsuite-vectorized matio) -else() - target_link_libraries(proxsuite-test-util proxsuite matio) -endif() - -macro(proxsuite_test name path) - set(target_name ${PROJECT_NAME}-test-cpp-${name}) - add_executable(${target_name} ${path}) - doctest_discover_tests(${target_name}) - target_link_libraries( - ${target_name} - PUBLIC proxsuite ${PROJECT_NAME}-doctest proxsuite-test-util - ) - target_compile_definitions( - ${target_name} - PRIVATE PROBLEM_PATH="${CMAKE_CURRENT_SOURCE_DIR}" - ) - add_dependencies(build_tests ${target_name}) -endmacro() - -proxsuite_test(dense_ruiz_equilibration src/dense_ruiz_equilibration.cpp) -proxsuite_test(dense_qp_eq src/dense_qp_eq.cpp) -proxsuite_test(dense_qp_with_eq_and_in src/dense_qp_with_eq_and_in.cpp) -proxsuite_test(dense_qp_unconstrained src/dense_unconstrained_qp.cpp) -proxsuite_test(dense_backward src/dense_backward.cpp) -proxsuite_test(dense_qp_wrapper src/dense_qp_wrapper.cpp) -proxsuite_test(dense_qp_solve src/dense_qp_solve.cpp) -proxsuite_test(sparse_ruiz_equilibration src/sparse_ruiz_equilibration.cpp) -proxsuite_test(sparse_qp src/sparse_qp.cpp) -proxsuite_test(sparse_qp_wrapper src/sparse_qp_wrapper.cpp) -proxsuite_test(sparse_qp_solve src/sparse_qp_solve.cpp) -proxsuite_test(sparse_factorization src/sparse_factorization.cpp) -proxsuite_test(cvxpy src/cvxpy.cpp) - -if(BUILD_WITH_OPENMP_SUPPORT) - proxsuite_test(parallel src/parallel_qp_solve.cpp) - target_link_libraries( - ${PROJECT_NAME}-test-cpp-parallel - PRIVATE OpenMP::OpenMP_CXX - ) -endif() - -# Test serialization -macro(ADD_TEST_CFLAGS target flag) - set_property(TARGET ${target} APPEND_STRING PROPERTY COMPILE_FLAGS " ${flag}") -endmacro() - -make_directory("${CMAKE_CURRENT_BINARY_DIR}/serialization-data") -proxsuite_test(serialization src/serialization.cpp) -add_test_cflags( - ${PROJECT_NAME}-test-cpp-serialization - "-DTEST_SERIALIZATION_FOLDER=\\\\\"${CMAKE_CURRENT_BINARY_DIR}/serialization-data\\\\\"" +find_path( + MAROS_MESZAROS_DIR + NAMES AUG2D.mat QPCBOEI1.mat + PATHS ${CMAKE_CURRENT_SOURCE_DIR}/data/maros_meszaros_data + REQUIRED ) -if(cereal_FOUND) - target_link_libraries( - ${PROJECT_NAME}-test-cpp-serialization - PRIVATE cereal::cereal - ) -else() - target_include_directories( - ${PROJECT_NAME}-test-cpp-serialization - SYSTEM - PRIVATE ${PROJECT_SOURCE_DIR}/external/cereal/include - ) -endif() -if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT MSVC) - proxsuite_test(dense_maros_meszaros src/dense_maros_meszaros.cpp) - proxsuite_test(sparse_maros_meszaros src/sparse_maros_meszaros.cpp) -endif() +add_subdirectory(cpp) if(BUILD_PYTHON_INTERFACE) - file(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_UNITTEST *.py) - - if( - (CMAKE_BUILD_TYPE STREQUAL "Debug" AND MSVC) - OR NOT BUILD_WITH_OPENMP_SUPPORT - ) - list_filter( - "${${PROJECT_NAME}_PYTHON_UNITTEST}" - "parallel_qp_solve" - ${PROJECT_NAME}_PYTHON_UNITTEST - ) - endif() - - foreach(TEST_FILE ${${PROJECT_NAME}_PYTHON_UNITTEST}) - get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) - string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/" "" TEST_FILE ${TEST_FILE}) - ADD_PYTHON_UNIT_TEST( - "${PROJECT_NAME}-test-py-${TEST_NAME}" - "${TEST_FILE}" - "bindings/python" - ) - endforeach() -endif(BUILD_PYTHON_INTERFACE) + add_subdirectory(python) +endif() diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt new file mode 100644 index 000000000..091335d77 --- /dev/null +++ b/test/cpp/CMakeLists.txt @@ -0,0 +1,80 @@ +add_library(proxsuite-test-util STATIC util_f64.cpp util_f32.cpp) +target_link_libraries(proxsuite-test-util PUBLIC proxsuite) + +if(BUILD_WITH_VECTORIZATION_SUPPORT) + add_library(proxsuite-test-util-vectorized STATIC util_f64.cpp util_f32.cpp) + target_include_directories(proxsuite-test-util-vectorized PRIVATE include) + target_link_libraries(proxsuite-test-util-vectorized PUBLIC proxsuite-vectorized) +endif() + +function(proxsuite_add_test name) + set(options) + set(oneValueArgs) + set(multiValueArgs COMPILE_DEFINITIONS LINK_LIBRARIES) + cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + add_executable(proxsuite-test-cpp-${name} ${name}.cpp) + target_link_libraries( + proxsuite-test-cpp-${name} + PRIVATE + proxsuite-test-util + Catch2::Catch2WithMain + ${arg_LINK_LIBRARIES} + $<$:cereal::cereal> + ) + target_compile_definitions(proxsuite-test-cpp-${name} PRIVATE ${arg_COMPILE_DEFINITIONS}) + add_test( + NAME proxsuite-cpp.${name} + COMMAND proxsuite-test-cpp-${name} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + + if(BUILD_WITH_VECTORIZATION_SUPPORT) + add_executable(proxsuite-vectorized-test-cpp-${name} ${name}.cpp) + target_link_libraries( + proxsuite-vectorized-test-cpp-${name} + PRIVATE + proxsuite-test-util-vectorized + Catch2::Catch2WithMain + ${arg_LINK_LIBRARIES} + $<$:cereal::cereal> + ) + target_compile_definitions( + proxsuite-vectorized-test-cpp-${name} + PRIVATE ${arg_COMPILE_DEFINITIONS} + ) + add_test( + NAME proxsuite-cpp.vectorized.${name} + COMMAND proxsuite-vectorized-test-cpp-${name} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + endif() +endfunction() + +proxsuite_add_test(cvxpy) +proxsuite_add_test(dense_backward) +proxsuite_add_test(dense_qp_eq) +proxsuite_add_test(dense_qp_solve) +proxsuite_add_test(dense_qp_with_eq_and_in) +proxsuite_add_test(dense_qp_wrapper) +proxsuite_add_test(dense_ruiz_equilibration) +proxsuite_add_test(dense_unconstrained_qp) +proxsuite_add_test(sparse_factorization) +proxsuite_add_test(sparse_qp_solve) +proxsuite_add_test(sparse_qp_wrapper) +proxsuite_add_test(sparse_qp) +proxsuite_add_test(sparse_ruiz_equilibration) + +if(BUILD_WITH_OPENMP_SUPPORT) + proxsuite_add_test(parallel_qp_solve) +endif() + +if(BUILD_WITH_SERIALIZATION) + # We have to create the folder for the output data, tests don't do that. + make_directory(${CMAKE_BINARY_DIR}/serialization-data) + proxsuite_add_test(serialization COMPILE_DEFINITIONS TEST_SERIALIZATION_FOLDER="${CMAKE_BINARY_DIR}/serialization-data") +endif() + +if(BUILD_MAROS_MESZAROS_TESTS) + proxsuite_add_test(dense_maros_meszaros COMPILE_DEFINITIONS MAROS_MESZAROS_DIR="${MAROS_MESZAROS_DIR}" LINK_LIBRARIES matio::matio) +endif() diff --git a/test/src/cvxpy.cpp b/test/cpp/cvxpy.cpp similarity index 86% rename from test/src/cvxpy.cpp rename to test/cpp/cvxpy.cpp index dfdb6df2e..437badc2b 100644 --- a/test/src/cvxpy.cpp +++ b/test/cpp/cvxpy.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include @@ -19,7 +19,7 @@ using Mat = template using Vec = Eigen::Matrix; -DOCTEST_TEST_CASE("3 dim test case from cvxpy, check feasibility") +TEST_CASE("3 dim test case from cvxpy, check feasibility") { std::cout << "---3 dim test case from cvxpy, check feasibility " << std::endl; @@ -48,8 +48,8 @@ DOCTEST_TEST_CASE("3 dim test case from cvxpy, check feasibility") .lpNorm(); T dua_res = (H * results.x + g + C.transpose() * results.z).lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "primal residual: " << pri_res << std::endl; std::cout << "dual residual: " << dua_res << std::endl; @@ -58,7 +58,7 @@ DOCTEST_TEST_CASE("3 dim test case from cvxpy, check feasibility") << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("simple test case from cvxpy, check feasibility") +TEST_CASE("simple test case from cvxpy, check feasibility") { std::cout << "---simple test case from cvxpy, check feasibility " @@ -90,9 +90,9 @@ DOCTEST_TEST_CASE("simple test case from cvxpy, check feasibility") (H * results.x + g + C.transpose() * results.z).lpNorm(); T x_sol = 0.5; - DOCTEST_CHECK((x_sol - results.x.coeff(0, 0)) <= eps_abs); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK((x_sol - results.x.coeff(0, 0)) <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "primal residual: " << pri_res << std::endl; std::cout << "dual residual: " << dua_res << std::endl; @@ -101,8 +101,8 @@ DOCTEST_TEST_CASE("simple test case from cvxpy, check feasibility") << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("simple test case from cvxpy, init with solution, check that " - "solver stays there") +TEST_CASE("simple test case from cvxpy, init with solution, check that " + "solver stays there") { std::cout << "---simple test case from cvxpy, init with solution, check that " @@ -147,10 +147,10 @@ DOCTEST_TEST_CASE("simple test case from cvxpy, init with solution, check that " T dua_res = (H * qp.results.x + g + C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(qp.results.info.iter <= 0); - DOCTEST_CHECK((x_sol - qp.results.x.coeff(0, 0)) <= eps_abs); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(qp.results.info.iter <= 0); + CHECK((x_sol - qp.results.x.coeff(0, 0)) <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "primal residual: " << pri_res << std::endl; std::cout << "dual residual: " << dua_res << std::endl; diff --git a/test/src/dense_backward.cpp b/test/cpp/dense_backward.cpp similarity index 92% rename from test/src/dense_backward.cpp rename to test/cpp/dense_backward.cpp index 346275161..9a70aaeac 100644 --- a/test/src/dense_backward.cpp +++ b/test/cpp/dense_backward.cpp @@ -2,9 +2,7 @@ // Copyright (c) 2023 INRIA // #include -#include -#include -#include +#include #include #include #include @@ -13,7 +11,7 @@ using T = double; using namespace proxsuite; using namespace proxsuite::proxqp; -DOCTEST_TEST_CASE("proxqp::dense: test compute backward for g (feasible QP)") +TEST_CASE("proxqp::dense: test compute backward for g (feasible QP)") { double sparsity_factor = 0.85; T eps_abs = T(1e-9); @@ -74,12 +72,12 @@ DOCTEST_TEST_CASE("proxqp::dense: test compute backward for g (feasible QP)") // Compare dx_dg_fd with the result from the backward function for (int i = 0; i < dim; i++) { for (int j = 0; j < dim; j++) { - DOCTEST_CHECK(std::abs(dx_dg_fd(i, j) - dx_dg(i, j)) < 1e-5); + CHECK(std::abs(dx_dg_fd(i, j) - dx_dg(i, j)) < 1e-5); } } } -DOCTEST_TEST_CASE("proxqp::dense: test compute backward for b (feasible QP)") +TEST_CASE("proxqp::dense: test compute backward for b (feasible QP)") { double sparsity_factor = 0.85; T eps_abs = T(1e-9); @@ -140,13 +138,13 @@ DOCTEST_TEST_CASE("proxqp::dense: test compute backward for b (feasible QP)") // Compare dx_db_fd with the result from the backward function for (int i = 0; i < dim; i++) { for (int j = 0; j < n_eq; j++) { - DOCTEST_CHECK(std::abs(dx_db_fd(i, j) - dx_db(i, j)) < 1e-5); + CHECK(std::abs(dx_db_fd(i, j) - dx_db(i, j)) < 1e-5); } } } -DOCTEST_TEST_CASE("proxqp::dense: test compute backward for g (QP with " - "saturating inequality constraints)") +TEST_CASE("proxqp::dense: test compute backward for g (QP with " + "saturating inequality constraints)") { double sparsity_factor = 0.85; T eps_abs = T(1e-9); @@ -216,7 +214,7 @@ DOCTEST_TEST_CASE("proxqp::dense: test compute backward for g (QP with " // Compare dx_dg_fd with the result from the backward function for (int i = 0; i < dim; i++) { for (int j = 0; j < dim; j++) { - DOCTEST_CHECK(std::abs(dx_dg_fd(i, j) - dx_dg(i, j)) < 1e-5); + CHECK(std::abs(dx_dg_fd(i, j) - dx_dg(i, j)) < 1e-5); } } } \ No newline at end of file diff --git a/test/src/dense_maros_meszaros.cpp b/test/cpp/dense_maros_meszaros.cpp similarity index 98% rename from test/src/dense_maros_meszaros.cpp rename to test/cpp/dense_maros_meszaros.cpp index 9fcc4a88e..eb98ae756 100644 --- a/test/src/dense_maros_meszaros.cpp +++ b/test/cpp/dense_maros_meszaros.cpp @@ -1,15 +1,13 @@ // // Copyright (c) 2022 INRIA // -#include +#include #include #include #include using namespace proxsuite; -#define MAROS_MESZAROS_DIR PROBLEM_PATH "/data/maros_meszaros_data/" - char const* files[] = { MAROS_MESZAROS_DIR "AUG2D.mat", MAROS_MESZAROS_DIR "AUG2DC.mat", MAROS_MESZAROS_DIR "AUG2DCQP.mat", MAROS_MESZAROS_DIR "AUG2DQP.mat", diff --git a/test/src/dense_qp_eq.cpp b/test/cpp/dense_qp_eq.cpp similarity index 87% rename from test/src/dense_qp_eq.cpp rename to test/cpp/dense_qp_eq.cpp index 2a6aa2541..2d707e60a 100644 --- a/test/src/dense_qp_eq.cpp +++ b/test/cpp/dense_qp_eq.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 - 2024 INRIA // #include -#include +#include #include #include #include @@ -11,7 +11,7 @@ using T = double; using namespace proxsuite; -DOCTEST_TEST_CASE("qp: start from solution using the wrapper framework") +TEST_CASE("qp: start from solution using the wrapper framework") { proxqp::isize dim = 30; proxqp::isize n_eq = 6; @@ -49,12 +49,12 @@ DOCTEST_TEST_CASE("qp: start from solution using the wrapper framework") qp.init(H, g, A, b, C, l, u); qp.solve(primal_solution, dual_solution, dual_init_in); - DOCTEST_CHECK((A * qp.results.x - b).lpNorm() <= eps_abs); - DOCTEST_CHECK((H * qp.results.x + g + A.transpose() * qp.results.y) - .lpNorm() <= eps_abs); + CHECK((A * qp.results.x - b).lpNorm() <= eps_abs); + CHECK((H * qp.results.x + g + A.transpose() * qp.results.y) + .lpNorm() <= eps_abs); } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality constraints " - "and increasing dimension with the wrapper API") +TEST_CASE("sparse random strongly convex qp with equality constraints " + "and increasing dimension with the wrapper API") { std::cout << "---testing sparse random strongly convex qp with equality " @@ -89,8 +89,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality constraints " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using wrapper API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -100,8 +100,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality constraints " << std::endl; } } -DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " - "linar cost and increasing dimension using wrapper API") +TEST_CASE("linear problem with equality with equality constraints and " + "linar cost and increasing dimension using wrapper API") { std::cout << "---testing linear problem with equality constraints and " @@ -143,8 +143,8 @@ DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using wrapper API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -155,9 +155,9 @@ DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " } } -DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " - "linear cost and increasing dimension using wrapper API and " - "the dedicated LP interface") +TEST_CASE("linear problem with equality with equality constraints and " + "linear cost and increasing dimension using wrapper API and " + "the dedicated LP interface") { std::cout @@ -202,8 +202,8 @@ DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using wrapper API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -214,7 +214,7 @@ DOCTEST_TEST_CASE("linear problem with equality with equality constraints and " } } -DOCTEST_TEST_CASE("infeasible qp") +TEST_CASE("infeasible qp") { // (x1- 9)^2 + (x2-6)^2 // s.t. @@ -251,6 +251,6 @@ DOCTEST_TEST_CASE("infeasible qp") qp.solve(); - DOCTEST_CHECK(qp.results.info.status == - proxsuite::proxqp::QPSolverOutput::PROXQP_PRIMAL_INFEASIBLE); + CHECK(qp.results.info.status == + proxsuite::proxqp::QPSolverOutput::PROXQP_PRIMAL_INFEASIBLE); } \ No newline at end of file diff --git a/test/src/dense_qp_solve.cpp b/test/cpp/dense_qp_solve.cpp similarity index 91% rename from test/src/dense_qp_solve.cpp rename to test/cpp/dense_qp_solve.cpp index 012bcb4c5..9da18ebac 100644 --- a/test/src/dense_qp_solve.cpp +++ b/test/cpp/dense_qp_solve.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include #include @@ -13,7 +13,7 @@ using T = double; using namespace proxsuite; using namespace proxsuite::proxqp; -DOCTEST_TEST_CASE("proxqp::dense: test init with fixed sizes matrices") +TEST_CASE("proxqp::dense: test init with fixed sizes matrices") { double sparsity_factor = 0.15; T eps_abs = T(1e-9); @@ -44,8 +44,8 @@ DOCTEST_TEST_CASE("proxqp::dense: test init with fixed sizes matrices") T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -68,8 +68,8 @@ DOCTEST_TEST_CASE("proxqp::dense: test init with fixed sizes matrices") T pri_res = (qp.A * results.x - qp.b).lpNorm(); T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -82,8 +82,8 @@ DOCTEST_TEST_CASE("proxqp::dense: test init with fixed sizes matrices") } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test solve function") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test solve function") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -119,8 +119,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -131,8 +131,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test solve with different rho value") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test solve with different rho value") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -161,7 +161,7 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " eps_abs, 0, T(1.E-7)); - DOCTEST_CHECK(results.info.rho == T(1.E-7)); + CHECK(results.info.rho == T(1.E-7)); T pri_res = std::max((qp.A * results.x - qp.b).lpNorm(), (helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l)) @@ -169,8 +169,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -181,7 +181,7 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test solve with different mu_eq and mu_in values") { @@ -222,8 +222,8 @@ DOCTEST_TEST_CASE( T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -234,8 +234,8 @@ DOCTEST_TEST_CASE( << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test warm starting") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test warm starting") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -263,8 +263,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -275,8 +275,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test verbose = true") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test verbose = true") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -316,8 +316,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -328,8 +328,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " << results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test no initial guess") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -373,8 +373,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " T dua_res = (qp.H * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; diff --git a/test/src/dense_qp_with_eq_and_in.cpp b/test/cpp/dense_qp_with_eq_and_in.cpp similarity index 89% rename from test/src/dense_qp_with_eq_and_in.cpp rename to test/cpp/dense_qp_with_eq_and_in.cpp index cb7e1d808..b77be02a8 100644 --- a/test/src/dense_qp_with_eq_and_in.cpp +++ b/test/cpp/dense_qp_with_eq_and_in.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include #include @@ -11,7 +11,7 @@ using T = double; using namespace proxsuite; -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and inequality constraints " "and increasing dimension using wrapper API") { @@ -52,8 +52,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -64,8 +64,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with box inequality " - "constraints and increasing dimension using the API") +TEST_CASE("sparse random strongly convex qp with box inequality " + "constraints and increasing dimension using the API") { std::cout @@ -102,8 +102,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with box inequality " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -114,8 +114,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with box inequality " } } -DOCTEST_TEST_CASE("sparse random not strongly convex qp with inequality " - "constraints and increasing dimension using the API") +TEST_CASE("sparse random not strongly convex qp with inequality " + "constraints and increasing dimension using the API") { std::cout @@ -152,8 +152,8 @@ DOCTEST_TEST_CASE("sparse random not strongly convex qp with inequality " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -164,8 +164,8 @@ DOCTEST_TEST_CASE("sparse random not strongly convex qp with inequality " } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with degenerate inequality " - "constraints and increasing dimension using the API") +TEST_CASE("sparse random strongly convex qp with degenerate inequality " + "constraints and increasing dimension using the API") { std::cout @@ -197,8 +197,7 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with degenerate inequality " qp_random.l, qp_random.u); qp.solve(); - DOCTEST_CHECK(qp.results.info.status == - proxqp::QPSolverOutput::PROXQP_SOLVED); + CHECK(qp.results.info.status == proxqp::QPSolverOutput::PROXQP_SOLVED); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -208,8 +207,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with degenerate inequality " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -220,8 +219,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with degenerate inequality " } } -DOCTEST_TEST_CASE("linear problem with equality inequality constraints and " - "increasing dimension using the API") +TEST_CASE("linear problem with equality inequality constraints and " + "increasing dimension using the API") { srand(1); std::cout << "---testing linear problem with inequality constraints and " @@ -263,8 +262,8 @@ DOCTEST_TEST_CASE("linear problem with equality inequality constraints and " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; diff --git a/test/src/dense_qp_wrapper.cpp b/test/cpp/dense_qp_wrapper.cpp similarity index 87% rename from test/src/dense_qp_wrapper.cpp rename to test/cpp/dense_qp_wrapper.cpp index 353fb7dce..0f0d1cffc 100644 --- a/test/src/dense_qp_wrapper.cpp +++ b/test/cpp/dense_qp_wrapper.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022-2024 INRIA // #include -#include +#include #include #include #include @@ -13,7 +13,7 @@ using T = double; using namespace proxsuite; using namespace proxsuite::proxqp; -DOCTEST_TEST_CASE( +TEST_CASE( "ProxQP::dense: sparse random strongly convex qp with inequality constraints" "and empty equality constraints") { @@ -67,8 +67,8 @@ DOCTEST_TEST_CASE( T dua_res = (qp_random.H * qp.results.x + qp_random.g + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -116,8 +116,8 @@ DOCTEST_TEST_CASE( dua_res = (qp_random.H * qp.results.x + qp_random.g + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -148,8 +148,8 @@ DOCTEST_TEST_CASE( dua_res = (qp_random.H * qp.results.x + qp_random.g + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -160,9 +160,8 @@ DOCTEST_TEST_CASE( std::cout << "setup timing " << qp.results.info.setup_time << " solve time " << qp.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update H") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update H") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test update H---" @@ -199,8 +198,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -243,8 +242,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -277,8 +276,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -291,9 +290,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update A") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update A") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -331,8 +329,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -377,8 +375,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -410,8 +408,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -424,9 +422,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update C") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update C") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -464,8 +461,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -510,8 +507,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -543,8 +540,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -557,9 +554,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update b") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update b") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -597,8 +593,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -643,8 +639,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -676,8 +672,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -690,9 +686,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update u") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update u") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -728,8 +723,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -779,8 +774,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -812,8 +807,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -826,9 +821,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update g") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update g") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -864,8 +858,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -911,8 +905,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -944,8 +938,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -958,9 +952,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "sparse random strongly convex qp with equality and inequality " - "constraints: test update H and A and b and u and l") +TEST_CASE("sparse random strongly convex qp with equality and inequality " + "constraints: test update H and A and b and u and l") { std::cout @@ -997,8 +990,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1059,8 +1052,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1092,8 +1085,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -1106,9 +1099,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update rho") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update rho") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1144,8 +1136,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1184,8 +1176,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1222,8 +1214,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -1236,9 +1228,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test update mu_eq and mu_in") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test update mu_eq and mu_in") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1274,8 +1265,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1317,8 +1308,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1355,8 +1346,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -1369,9 +1360,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test warm starting") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test warm starting") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1408,8 +1398,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1439,8 +1429,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim after updating: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -1474,8 +1464,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------ conter factual check with another QP object starting at " "the updated model : " @@ -1488,9 +1478,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test dense init") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test dense init") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1532,13 +1521,12 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test with no initial guess") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test with no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1577,8 +1565,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1610,8 +1598,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1622,7 +1610,7 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test with equality constrained initial guess") { @@ -1665,8 +1653,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1699,8 +1687,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1711,9 +1699,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test with warm start with previous result") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test with warm start with previous result") { std::cout @@ -1754,8 +1741,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1822,8 +1809,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1834,9 +1821,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test with cold start option") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test with cold start option") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1876,8 +1862,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1944,8 +1930,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with cold start option: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1956,7 +1942,7 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test equilibration options at initialization") { @@ -2000,8 +1986,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp with " "preconditioner derived: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -2037,8 +2023,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp without preconditioner derivation: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -2051,9 +2037,8 @@ DOCTEST_TEST_CASE( << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test equilibration options at update") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test equilibration options at update") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -2093,8 +2078,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp with " "preconditioner derived: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -2124,8 +2109,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with preconditioner re derived " "after an update (should get exact same results): " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -2179,8 +2164,8 @@ DOCTEST_TEST_CASE( nullopt, false); // use previous preconditioner: should get same result as well qp2.solve(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp without preconditioner derivation: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -2445,7 +2430,7 @@ TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " "inequality constraints: test multiple solve at once with equality " - "constrained initial guess") + "constrained initial guess and warm start") { double sparsity_factor = 0.15; @@ -2572,9 +2557,9 @@ TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " << qp.results.info.solve_time << std::endl; } -TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test multiple solve at once with no initial guess") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test multiple solve at once with no initial " + "guess and warm start") { double sparsity_factor = 0.15; @@ -3467,146 +3452,6 @@ TEST_CASE( << qp.results.info.solve_time << std::endl; } -TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test multiple solve at once with no initial guess") -{ - - double sparsity_factor = 0.15; - T eps_abs = T(1e-9); - utils::rand::set_seed(1); - dense::isize dim = 10; - - dense::isize n_eq(dim / 4); - dense::isize n_in(dim / 4); - T strong_convexity_factor(1.e-2); - proxqp::dense::Model qp_random = proxqp::utils::dense_strongly_convex_qp( - dim, n_eq, n_in, sparsity_factor, strong_convexity_factor); - - dense::QP qp(dim, n_eq, n_in); - - qp.settings.eps_abs = eps_abs; - qp.settings.eps_rel = 0; - qp.settings.initial_guess = InitialGuessStatus::NO_INITIAL_GUESS; - - std::cout << "Test with warm start with previous result and first solve with " - "no initial guess" - << std::endl; - std::cout << "dirty workspace before any solving: " << qp.work.dirty - << std::endl; - - qp.init(qp_random.H, - qp_random.g, - qp_random.A, - qp_random.b, - qp_random.C, - qp_random.l, - qp_random.u); - qp.solve(); - - T pri_res = std::max( - (qp_random.A * qp.results.x - qp_random.b).lpNorm(), - (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + - helpers::negative_part(qp_random.C * qp.results.x - qp_random.l)) - .lpNorm()); - T dua_res = (qp_random.H * qp.results.x + qp_random.g + - qp_random.A.transpose() * qp.results.y + - qp_random.C.transpose() * qp.results.z) - .lpNorm(); - CHECK(dua_res <= eps_abs); - CHECK(pri_res <= eps_abs); - std::cout << "--n = " << dim << " n_eq " << n_eq << " n_in " << n_in - << std::endl; - std::cout << "; dual residual " << dua_res << "; primal residual " << pri_res - << std::endl; - std::cout << "total number of iteration: " << qp.results.info.iter - << std::endl; - std::cout << "setup timing " << qp.results.info.setup_time << " solve time " - << qp.results.info.solve_time << std::endl; - - qp.settings.initial_guess = - InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - std::cout << "dirty workspace : " << qp.work.dirty << std::endl; - qp_random.H *= 2.; - qp_random.g = utils::rand::vector_rand(dim); - bool update_preconditioner = true; - qp.update(qp_random.H, - qp_random.g, - qp_random.A, - qp_random.b, - qp_random.C, - qp_random.l, - qp_random.u, - update_preconditioner); - qp.solve(); - pri_res = std::max( - (qp_random.A * qp.results.x - qp_random.b).lpNorm(), - (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + - helpers::negative_part(qp_random.C * qp.results.x - qp_random.l)) - .lpNorm()); - dua_res = (qp_random.H * qp.results.x + qp_random.g + - qp_random.A.transpose() * qp.results.y + - qp_random.C.transpose() * qp.results.z) - .lpNorm(); - CHECK(dua_res <= eps_abs); - CHECK(pri_res <= eps_abs); - std::cout << "Second solve " << std::endl; - std::cout << "--n = " << dim << " n_eq " << n_eq << " n_in " << n_in - << std::endl; - std::cout << "; dual residual " << dua_res << "; primal residual " << pri_res - << std::endl; - std::cout << "total number of iteration: " << qp.results.info.iter - << std::endl; - std::cout << "setup timing " << qp.results.info.setup_time << " solve time " - << qp.results.info.solve_time << std::endl; - - std::cout << "dirty workspace : " << qp.work.dirty << std::endl; - qp.solve(); - pri_res = std::max( - (qp_random.A * qp.results.x - qp_random.b).lpNorm(), - (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + - helpers::negative_part(qp_random.C * qp.results.x - qp_random.l)) - .lpNorm()); - dua_res = (qp_random.H * qp.results.x + qp_random.g + - qp_random.A.transpose() * qp.results.y + - qp_random.C.transpose() * qp.results.z) - .lpNorm(); - CHECK(dua_res <= eps_abs); - CHECK(pri_res <= eps_abs); - std::cout << "Third solve " << std::endl; - std::cout << "--n = " << dim << " n_eq " << n_eq << " n_in " << n_in - << std::endl; - std::cout << "; dual residual " << dua_res << "; primal residual " << pri_res - << std::endl; - std::cout << "total number of iteration: " << qp.results.info.iter - << std::endl; - std::cout << "setup timing " << qp.results.info.setup_time << " solve time " - << qp.results.info.solve_time << std::endl; - - std::cout << "dirty workspace : " << qp.work.dirty << std::endl; - qp.solve(); - pri_res = std::max( - (qp_random.A * qp.results.x - qp_random.b).lpNorm(), - (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + - helpers::negative_part(qp_random.C * qp.results.x - qp_random.l)) - .lpNorm()); - dua_res = (qp_random.H * qp.results.x + qp_random.g + - qp_random.A.transpose() * qp.results.y + - qp_random.C.transpose() * qp.results.z) - .lpNorm(); - CHECK(dua_res <= eps_abs); - CHECK(pri_res <= eps_abs); - std::cout << "Fourth solve " << std::endl; - std::cout << "--n = " << dim << " n_eq " << n_eq << " n_in " << n_in - << std::endl; - std::cout << "; dual residual " << dua_res << "; primal residual " << pri_res - << std::endl; - std::cout << "total number of iteration: " << qp.results.info.iter - << std::endl; - std::cout << "setup timing " << qp.results.info.setup_time << " solve time " - << qp.results.info.solve_time << std::endl; -} - TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " "inequality constraints: test update + multiple solve at once with " "cold start initial guess and then cold start option") @@ -5049,10 +4894,9 @@ TEST_CASE("ProxQP::dense: Test g update for different warm start with previous " << qp2.results.info.solve_time << std::endl; } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using warm start with previous results") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using warm start with previous results") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5074,8 +4918,8 @@ DOCTEST_TEST_CASE( bool compute_preconditioner = true; dense::QP qp{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -5087,11 +4931,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5102,8 +4946,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -5117,11 +4961,11 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxsuite::proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5132,12 +4976,12 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5150,13 +4994,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -5167,13 +5011,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5186,17 +5030,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5207,8 +5051,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -5221,11 +5065,11 @@ DOCTEST_TEST_CASE( 1.e-3); qp3.settings.initial_guess = proxsuite::proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5236,14 +5080,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using cold start with previous results") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using cold start with previous results") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5267,8 +5110,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -5280,11 +5123,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5295,8 +5138,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -5307,11 +5150,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5322,14 +5165,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5342,13 +5185,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -5359,15 +5202,15 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5380,17 +5223,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5401,8 +5244,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -5413,11 +5256,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5428,14 +5271,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using equality constrained initial guess") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using equality constrained initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5459,8 +5301,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -5472,11 +5314,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5487,8 +5329,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -5499,11 +5341,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5514,14 +5356,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5534,13 +5376,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -5551,15 +5393,15 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5572,17 +5414,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5593,8 +5435,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -5605,11 +5447,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5620,14 +5462,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using no initial guess") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5650,8 +5491,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -5663,11 +5504,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5678,8 +5519,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -5690,11 +5531,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5705,13 +5546,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5724,13 +5565,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -5741,14 +5582,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5761,17 +5602,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5782,8 +5623,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -5794,11 +5635,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5809,14 +5650,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using warm start with previous results") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using warm start with previous results") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5838,8 +5678,8 @@ DOCTEST_TEST_CASE( bool compute_preconditioner = true; dense::QP qp{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -5851,11 +5691,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5866,15 +5706,15 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.settings.initial_guess = proxsuite::proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5884,8 +5724,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -5899,8 +5739,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5910,14 +5750,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5930,13 +5770,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.settings.initial_guess = proxsuite::proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; @@ -5944,13 +5784,13 @@ DOCTEST_TEST_CASE( // warm start with previous result used, hence if the qp is small and // simple, the parameters should not changed during first solve, and also // after as we start at the solution - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp2.results.x - qp_random.u) + @@ -5960,14 +5800,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.settings.verbose = true; @@ -5986,17 +5826,17 @@ DOCTEST_TEST_CASE( // warm start with previous result used, hence if the qp is small and // simple, the parameters should not changed during first solve, and also // after as we start at the solution - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6006,8 +5846,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -6024,17 +5864,17 @@ DOCTEST_TEST_CASE( // warm start with previous result used, hence if the qp is small and // simple, the parameters should not changed during first solve, and also // after as we start at the solution - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6044,15 +5884,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using cold start with previous results") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using cold start with previous results") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -6076,8 +5915,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -6089,11 +5928,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -6104,13 +5943,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6120,8 +5959,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -6135,8 +5974,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6146,16 +5985,16 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -6168,22 +6007,22 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp2.results.x - qp_random.u) + @@ -6193,16 +6032,16 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -6217,17 +6056,17 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6237,8 +6076,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -6252,17 +6091,17 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6272,12 +6111,12 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after several solves " "using equality constrained initial guess") @@ -6304,8 +6143,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -6317,11 +6156,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -6332,13 +6171,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6348,8 +6187,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -6363,8 +6202,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6374,16 +6213,16 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -6396,22 +6235,22 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp2.results.x - qp_random.u) + @@ -6421,16 +6260,16 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -6445,17 +6284,17 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6465,8 +6304,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -6480,17 +6319,17 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6500,15 +6339,14 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( - "ProxQP::dense: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using no initial guess") +TEST_CASE("ProxQP::dense: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -6531,8 +6369,8 @@ DOCTEST_TEST_CASE( dense::QP qp{ dim, n_eq, n_in }; // creating QP object qp.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -6544,11 +6382,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -6559,13 +6397,13 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6575,8 +6413,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -6590,8 +6428,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -6601,15 +6439,15 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp2{ dim, n_eq, n_in }; // creating QP object qp2.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -6622,22 +6460,22 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp2.results.x - qp_random.u) + @@ -6647,15 +6485,15 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model dense::QP qp3{ dim, n_eq, n_in }; // creating QP object qp3.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -6670,17 +6508,17 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6690,8 +6528,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -6705,17 +6543,17 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp3.results.x - qp_random.u) + @@ -6725,8 +6563,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } @@ -7204,8 +7042,8 @@ TEST_CASE("ProxQP::dense: test primal infeasibility solving") qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= scaled_eps); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= scaled_eps); + CHECK(dua_res <= eps_abs); } } @@ -7249,8 +7087,7 @@ TEST_CASE("ProxQP::dense: estimate of minimal eigenvalues using Eigen") nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 1) <= - tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 1) <= tol); } dim = 50; n_eq = dim; @@ -7285,8 +7122,8 @@ TEST_CASE("ProxQP::dense: estimate of minimal eigenvalues using Eigen") nullopt, nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } dim = 50; n_eq = dim; @@ -7323,8 +7160,8 @@ TEST_CASE("ProxQP::dense: estimate of minimal eigenvalues using Eigen") nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } } @@ -7365,8 +7202,7 @@ TEST_CASE( nullopt, -1); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 1) <= - tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 1) <= tol); } dim = 50; n_eq = dim; @@ -7397,8 +7233,8 @@ TEST_CASE( nullopt, nullopt, minimal_eigenvalue); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } dim = 50; n_eq = dim; @@ -7431,8 +7267,8 @@ TEST_CASE( nullopt, minimal_eigenvalue); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } } @@ -7480,8 +7316,7 @@ TEST_CASE( nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK( - std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 0.5) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate + 0.5) <= tol); } dim = 50; n_eq = dim; @@ -7519,8 +7354,8 @@ TEST_CASE( nullopt, nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } dim = 50; n_eq = dim; @@ -7561,13 +7396,13 @@ TEST_CASE( nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } } -DOCTEST_TEST_CASE("check that model.is_valid function for symmetric matrices " - "works for epsilon precision") +TEST_CASE("check that model.is_valid function for symmetric matrices " + "works for epsilon precision") { Eigen::Matrix matrix = Eigen::Matrix::Random(); Eigen::Matrix symmetric_mat = matrix + matrix.transpose(); @@ -7581,8 +7416,8 @@ DOCTEST_TEST_CASE("check that model.is_valid function for symmetric matrices " bool is_symmetric_with_tolerance = symmetric_mat.isApprox( symmetric_mat.transpose(), std::numeric_limits::epsilon()); - DOCTEST_CHECK(is_symmetric_without_tolerance == false); - DOCTEST_CHECK(is_symmetric_with_tolerance == true); + CHECK(is_symmetric_without_tolerance == false); + CHECK(is_symmetric_with_tolerance == true); // initialize a model with a symmetric matrix as Hessian, this runs // model.is_valid() that performs the check above @@ -7652,15 +7487,15 @@ TEST_CASE("ProxQP::dense: sparse random strongly convex qp with" qp_random.u); qp.solve(); - DOCTEST_CHECK(qp.results.info.mu_updates > 0); + CHECK(qp.results.info.mu_updates > 0); T pri_res = (helpers::negative_part(qp_random.C * qp.results.x - qp_random.l)) .lpNorm(); T dua_res = (qp_random.H * qp.results.x + qp_random.g + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; diff --git a/test/src/dense_ruiz_equilibration.cpp b/test/cpp/dense_ruiz_equilibration.cpp similarity index 84% rename from test/src/dense_ruiz_equilibration.cpp rename to test/cpp/dense_ruiz_equilibration.cpp index d1bff6479..4861e24ed 100644 --- a/test/src/dense_ruiz_equilibration.cpp +++ b/test/cpp/dense_ruiz_equilibration.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022-2023 INRIA // #include -#include +#include #include #include #include @@ -12,7 +12,7 @@ using namespace proxsuite; using Scalar = double; -DOCTEST_TEST_CASE("ruiz preconditioner") +TEST_CASE("ruiz preconditioner") { int dim = 5; int n_eq = 6; @@ -65,8 +65,8 @@ DOCTEST_TEST_CASE("ruiz preconditioner") auto A_new = (tail * A * head).eval(); auto b_new = (tail * b).eval(); - DOCTEST_CHECK((H_new - qp.work.H_scaled).norm() <= Scalar(1e-10)); - DOCTEST_CHECK((g_new - qp.work.g_scaled).norm() <= Scalar(1e-10)); - DOCTEST_CHECK((A_new - qp.work.A_scaled).norm() <= Scalar(1e-10)); - DOCTEST_CHECK((b_new - qp.work.b_scaled).norm() <= Scalar(1e-10)); + CHECK((H_new - qp.work.H_scaled).norm() <= Scalar(1e-10)); + CHECK((g_new - qp.work.g_scaled).norm() <= Scalar(1e-10)); + CHECK((A_new - qp.work.A_scaled).norm() <= Scalar(1e-10)); + CHECK((b_new - qp.work.b_scaled).norm() <= Scalar(1e-10)); } diff --git a/test/src/dense_unconstrained_qp.cpp b/test/cpp/dense_unconstrained_qp.cpp similarity index 92% rename from test/src/dense_unconstrained_qp.cpp rename to test/cpp/dense_unconstrained_qp.cpp index eed71aecc..1ac37ef88 100644 --- a/test/src/dense_unconstrained_qp.cpp +++ b/test/cpp/dense_unconstrained_qp.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include #include @@ -12,7 +12,7 @@ using namespace proxsuite; using T = double; -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex unconstrained qp and increasing dimension") { @@ -48,8 +48,8 @@ DOCTEST_TEST_CASE( qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -60,8 +60,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE("sparse random not strongly convex unconstrained qp and " - "increasing dimension") +TEST_CASE("sparse random not strongly convex unconstrained qp and " + "increasing dimension") { std::cout << "---testing sparse random not strongly convex unconstrained qp " @@ -101,8 +101,8 @@ DOCTEST_TEST_CASE("sparse random not strongly convex unconstrained qp and " qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -113,7 +113,7 @@ DOCTEST_TEST_CASE("sparse random not strongly convex unconstrained qp and " } } -DOCTEST_TEST_CASE("unconstrained qp with H = Id and g random") +TEST_CASE("unconstrained qp with H = Id and g random") { std::cout << "---unconstrained qp with H = Id and g random---" << std::endl; @@ -149,8 +149,8 @@ DOCTEST_TEST_CASE("unconstrained qp with H = Id and g random") qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -160,7 +160,7 @@ DOCTEST_TEST_CASE("unconstrained qp with H = Id and g random") << std::endl; } -DOCTEST_TEST_CASE("unconstrained qp with H = Id and g = 0") +TEST_CASE("unconstrained qp with H = Id and g = 0") { std::cout << "---unconstrained qp with H = Id and g = 0---" << std::endl; @@ -197,8 +197,8 @@ DOCTEST_TEST_CASE("unconstrained qp with H = Id and g = 0") qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------solving qp with dim: " << dim << " neq: " << n_eq << " nin: " << n_in << std::endl; diff --git a/test/include/maros_meszaros.hpp b/test/cpp/maros_meszaros.hpp similarity index 100% rename from test/include/maros_meszaros.hpp rename to test/cpp/maros_meszaros.hpp diff --git a/test/src/parallel_qp_solve.cpp b/test/cpp/parallel_qp_solve.cpp similarity index 96% rename from test/src/parallel_qp_solve.cpp rename to test/cpp/parallel_qp_solve.cpp index b60d25f53..ab271d948 100644 --- a/test/src/parallel_qp_solve.cpp +++ b/test/cpp/parallel_qp_solve.cpp @@ -1,7 +1,7 @@ // // Copyright (c) 2023 INRIA // -#include +#include #include #include #include @@ -16,7 +16,7 @@ using T = double; using I = c_int; using namespace proxsuite::linalg::sparse::tags; -DOCTEST_TEST_CASE("test parallel qp_solve for dense qps") +TEST_CASE("test parallel qp_solve for dense qps") { double sparsity_factor = 0.15; T eps_abs = T(1e-9); @@ -76,7 +76,7 @@ DOCTEST_TEST_CASE("test parallel qp_solve for dense qps") } } -DOCTEST_TEST_CASE("test dense BatchQP and optional NUM_THREADS") +TEST_CASE("test dense BatchQP and optional NUM_THREADS") { double sparsity_factor = 0.15; T eps_abs = T(1e-9); @@ -132,7 +132,7 @@ DOCTEST_TEST_CASE("test dense BatchQP and optional NUM_THREADS") } } -DOCTEST_TEST_CASE("test parallel qp_solve for sparse qps") +TEST_CASE("test parallel qp_solve for sparse qps") { sparse::isize dim = 500; sparse::isize n_eq(10); @@ -193,7 +193,7 @@ DOCTEST_TEST_CASE("test parallel qp_solve for sparse qps") } } -DOCTEST_TEST_CASE("test sparse BatchQP") +TEST_CASE("test sparse BatchQP") { sparse::isize dim = 500; sparse::isize n_eq(10); diff --git a/test/src/serialization.cpp b/test/cpp/serialization.cpp similarity index 89% rename from test/src/serialization.cpp rename to test/cpp/serialization.cpp index d9fe67693..506b2af3b 100644 --- a/test/src/serialization.cpp +++ b/test/cpp/serialization.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include #include @@ -78,7 +78,7 @@ generic_test(const T& object, const std::string& filename) loadFromXML(object_loaded, xml_filename); // Check - DOCTEST_CHECK(object_loaded == object); + CHECK(object_loaded == object); } // Load and save as json @@ -90,7 +90,7 @@ generic_test(const T& object, const std::string& filename) loadFromJSON(object_loaded, json_filename); // Check - DOCTEST_CHECK(object_loaded == object); + CHECK(object_loaded == object); } // Load and save as binary @@ -102,7 +102,7 @@ generic_test(const T& object, const std::string& filename) loadFromBinary(object_loaded, bin_filename); // Check - DOCTEST_CHECK(object_loaded == object); + CHECK(object_loaded == object); } } @@ -110,7 +110,7 @@ using T = double; using namespace proxsuite; using namespace proxsuite::proxqp; -DOCTEST_TEST_CASE("test serialization of qp model, results and settings") +TEST_CASE("test serialization of qp model, results and settings") { std::cout << "--- serialization ---" << std::endl; double sparsity_factor = 0.15; @@ -140,8 +140,7 @@ DOCTEST_TEST_CASE("test serialization of qp model, results and settings") generic_test(qp, TEST_SERIALIZATION_FOLDER "/qp_wrapper"); } -DOCTEST_TEST_CASE( - "test serialization of eigen matrices with different storage orders") +TEST_CASE("test serialization of eigen matrices with different storage orders") { Eigen::Matrix row_matrix; Eigen::Matrix row_matrix_loaded; @@ -153,6 +152,6 @@ DOCTEST_TEST_CASE( proxsuite::serialization::loadFromJSON(row_matrix_loaded, "row_matrix"); proxsuite::serialization::loadFromJSON(col_matrix_loaded, "row_matrix"); - DOCTEST_CHECK(row_matrix_loaded == row_matrix); - DOCTEST_CHECK(col_matrix_loaded == row_matrix); + CHECK(row_matrix_loaded == row_matrix); + CHECK(col_matrix_loaded == row_matrix); } \ No newline at end of file diff --git a/test/src/sparse_factorization.cpp b/test/cpp/sparse_factorization.cpp similarity index 99% rename from test/src/sparse_factorization.cpp rename to test/cpp/sparse_factorization.cpp index d60e00fba..7f7b82e81 100644 --- a/test/src/sparse_factorization.cpp +++ b/test/cpp/sparse_factorization.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include template diff --git a/test/src/sparse_maros_meszaros.cpp b/test/cpp/sparse_maros_meszaros.cpp similarity index 99% rename from test/src/sparse_maros_meszaros.cpp rename to test/cpp/sparse_maros_meszaros.cpp index 84dc5b2ed..9415bd878 100644 --- a/test/src/sparse_maros_meszaros.cpp +++ b/test/cpp/sparse_maros_meszaros.cpp @@ -3,14 +3,12 @@ // #include -#include +#include #include #include using namespace proxsuite; -#define MAROS_MESZAROS_DIR PROBLEM_PATH "/data/maros_meszaros_data/" - template void compute_primal_dual_feasibility(const PreprocessedQpSparse& preprocessed, diff --git a/test/src/sparse_qp.cpp b/test/cpp/sparse_qp.cpp similarity index 99% rename from test/src/sparse_qp.cpp rename to test/cpp/sparse_qp.cpp index 6aec4a872..8598f6305 100644 --- a/test/src/sparse_qp.cpp +++ b/test/cpp/sparse_qp.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include using namespace proxsuite; diff --git a/test/src/sparse_qp_solve.cpp b/test/cpp/sparse_qp_solve.cpp similarity index 93% rename from test/src/sparse_qp_solve.cpp rename to test/cpp/sparse_qp_solve.cpp index 112fca202..fb3238ec5 100644 --- a/test/src/sparse_qp_solve.cpp +++ b/test/cpp/sparse_qp_solve.cpp @@ -2,7 +2,7 @@ // Copyright (c) 2022 INRIA // #include -#include +#include #include #include #include @@ -14,8 +14,8 @@ using T = double; using I = c_int; using namespace proxsuite::linalg::sparse::tags; -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test solve function") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test solve function") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -82,8 +82,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -96,8 +96,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test solve with different rho value") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test solve with different rho value") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -131,7 +131,7 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " eps_abs, nullopt, T(1.E-7)); - DOCTEST_CHECK(results.info.rho == T(1.E-7)); + CHECK(results.info.rho == T(1.E-7)); T dua_res = proxqp::dense::infty_norm( qp.H.selfadjointView() * results.x + qp.g + qp.A.transpose() * results.y + qp.C.transpose() * results.z); @@ -139,8 +139,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -153,7 +153,7 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " } } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test solve with different mu_eq and mu_in values") { @@ -199,8 +199,8 @@ DOCTEST_TEST_CASE( proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -213,9 +213,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test setting specific sparse backend") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test setting specific sparse backend") { std::cout @@ -269,9 +268,9 @@ DOCTEST_TEST_CASE( proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); - DOCTEST_CHECK(results.info.sparse_backend == SparseBackend::MatrixFree); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); + CHECK(results.info.sparse_backend == SparseBackend::MatrixFree); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -284,8 +283,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test warm starting") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test warm starting") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -318,8 +317,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -332,8 +331,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test verbose = true") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test verbose = true") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -378,8 +377,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; @@ -392,8 +391,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " } } -DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " - "inequality constraints: test no initial guess") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -443,8 +442,8 @@ DOCTEST_TEST_CASE("sparse random strongly convex qp with equality and " proxqp::dense::infty_norm( helpers::positive_part(qp.C * results.x - qp.u) + helpers::negative_part(qp.C * results.x - qp.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; diff --git a/test/src/sparse_qp_wrapper.cpp b/test/cpp/sparse_qp_wrapper.cpp similarity index 90% rename from test/src/sparse_qp_wrapper.cpp rename to test/cpp/sparse_qp_wrapper.cpp index f8d07398a..154323893 100644 --- a/test/src/sparse_qp_wrapper.cpp +++ b/test/cpp/sparse_qp_wrapper.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include using namespace proxsuite; @@ -14,7 +14,7 @@ using T = double; using I = c_int; using namespace proxsuite::linalg::sparse::tags; -DOCTEST_TEST_CASE( +TEST_CASE( "ProxQP::sparse: sparse random strongly convex qp with inequality constraints" "and empty equality constraints") { @@ -727,9 +727,8 @@ TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " } } -DOCTEST_TEST_CASE( - "sparse random strongly convex qp with equality and " - "inequality constraints: test with warm start with previous result") +TEST_CASE("sparse random strongly convex qp with equality and " + "inequality constraints: test with warm start with previous result") { std::cout @@ -774,8 +773,8 @@ DOCTEST_TEST_CASE( proxqp::dense::infty_norm( helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + helpers::negative_part(qp_random.C * qp.results.x - qp_random.l))); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -832,8 +831,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -845,9 +844,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test with cold start option") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test with cold start option") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -891,8 +889,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -956,8 +954,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with cold start option: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -969,9 +967,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test equilibration option") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test equilibration option") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1016,8 +1013,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1047,8 +1044,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1060,9 +1057,8 @@ DOCTEST_TEST_CASE( } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test equilibration option at update") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test equilibration option at update") { std::cout << "---testing sparse random strongly convex qp with equality and " @@ -1106,8 +1102,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1127,8 +1123,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1159,8 +1155,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1182,8 +1178,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); std::cout << "------using API solving qp with dim with qp2: " << n << " neq: " << n_eq << " nin: " << n_in << std::endl; std::cout << "primal residual: " << pri_res << std::endl; @@ -1256,7 +1252,7 @@ TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " } TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test new init") + "inequality constraints: test new init 2") { for (auto const& dims : { // proxsuite::linalg::veg::tuplify(50, 0, 0), @@ -1604,7 +1600,7 @@ TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " "inequality constraints: test multiple solve at once with equality " - "constrained initial guess") + "constrained initial guess 2") { for (auto const& dims : { // proxsuite::linalg::veg::tuplify(50, 0, 0), @@ -1738,7 +1734,7 @@ TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " } TEST_CASE( "sparse random strongly convex qp with equality and " - "inequality constraints: test multiple solve at once with no initial guess") + "inequality constraints: test multiple solve at once with no initial guess 2") { for (auto const& dims : { // proxsuite::linalg::veg::tuplify(50, 0, 0), @@ -2677,7 +2673,7 @@ TEST_CASE( } TEST_CASE( "sparse random strongly convex qp with equality and " - "inequality constraints: test multiple solve at once with no initial guess") + "inequality constraints: test multiple solve at once with no initial guess 3") { for (auto const& dims : { // proxsuite::linalg::veg::tuplify(50, 0, 0), @@ -4239,10 +4235,9 @@ TEST_CASE("ProxQP::sparse: Test rho update for different initial guess") } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using no initial guess") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -4269,8 +4264,8 @@ DOCTEST_TEST_CASE( bool compute_preconditioner = true; qp.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -4282,11 +4277,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4297,8 +4292,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -4309,11 +4304,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4324,15 +4319,15 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp2(qp_random.H.cast(), qp_random.A.cast(), qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; @@ -4346,13 +4341,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -4363,16 +4358,16 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp3(qp_random.H.cast(), qp_random.A.cast(), qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -4385,17 +4380,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4406,8 +4401,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -4418,11 +4413,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4433,13 +4428,12 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using EQUALITY_CONSTRAINED_INITIAL_GUESS") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using EQUALITY_CONSTRAINED_INITIAL_GUESS") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -4467,8 +4461,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -4480,11 +4474,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4495,8 +4489,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -4507,11 +4501,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4522,16 +4516,16 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp2(qp_random.H.cast(), qp_random.A.cast(), qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -4545,9 +4539,9 @@ DOCTEST_TEST_CASE( nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -4558,8 +4552,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp3(qp_random.H.cast(), @@ -4567,8 +4561,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -4581,17 +4575,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4602,8 +4596,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -4614,11 +4608,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4629,13 +4623,12 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using COLD_START_WITH_PREVIOUS_RESULT") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using COLD_START_WITH_PREVIOUS_RESULT") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -4663,8 +4656,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -4676,11 +4669,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4691,8 +4684,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -4703,11 +4696,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4718,16 +4711,16 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp2(qp_random.H.cast(), qp_random.A.cast(), qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; @@ -4741,13 +4734,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -4758,8 +4751,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp3(qp_random.H.cast(), @@ -4767,8 +4760,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -4781,17 +4774,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4802,8 +4795,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -4814,11 +4807,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -4829,14 +4822,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after updates using WARM_START_WITH_PREVIOUS_RESULT") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after updates using WARM_START_WITH_PREVIOUS_RESULT") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -4864,8 +4856,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; qp.init(qp_random.H, @@ -4877,11 +4869,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4892,8 +4884,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp.update(nullopt, nullopt, @@ -4904,11 +4896,11 @@ DOCTEST_TEST_CASE( nullopt, compute_preconditioner, 1.e-6); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -4919,16 +4911,16 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp2(qp_random.H.cast(), qp_random.A.cast(), qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; @@ -4942,13 +4934,13 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), @@ -4959,8 +4951,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); // conter factual check with another QP object starting at the updated model proxqp::sparse::QP qp3(qp_random.H.cast(), @@ -4968,8 +4960,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -4982,17 +4974,17 @@ DOCTEST_TEST_CASE( compute_preconditioner, rho, mu_eq); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5003,8 +4995,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp3.update(nullopt, nullopt, nullopt, @@ -5015,11 +5007,11 @@ DOCTEST_TEST_CASE( compute_preconditioner, 1.e-6, 1.e-3); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), @@ -5030,14 +5022,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using no initial guess") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using no initial guess") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5071,8 +5062,8 @@ DOCTEST_TEST_CASE( bool compute_preconditioner = true; qp.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; // qp.settings.verbose = true; @@ -5085,11 +5076,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5100,13 +5091,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5116,8 +5107,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -5131,8 +5122,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5142,8 +5133,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5151,8 +5142,8 @@ DOCTEST_TEST_CASE( qp_random.A.cast(), qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5165,16 +5156,16 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5184,8 +5175,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5193,8 +5184,8 @@ DOCTEST_TEST_CASE( qp_random.A.cast(), qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::NO_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::NO_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::NO_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5209,13 +5200,13 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5225,8 +5216,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -5240,13 +5231,13 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5256,12 +5247,12 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( +TEST_CASE( "sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after several solves " "using equality constrained initial guess") @@ -5299,8 +5290,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; // qp.settings.verbose = true; @@ -5313,11 +5304,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5328,13 +5319,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5344,8 +5335,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -5359,8 +5350,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5370,8 +5361,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5380,8 +5371,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5394,16 +5385,16 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5413,8 +5404,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5423,8 +5414,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5439,12 +5430,12 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5454,8 +5445,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -5469,13 +5460,13 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5485,15 +5476,14 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using cold start with previous result") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using cold start with previous result") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5528,8 +5518,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; // qp.settings.verbose = true; @@ -5542,11 +5532,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5557,13 +5547,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5573,8 +5563,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -5588,8 +5578,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5599,8 +5589,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5609,8 +5599,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5623,22 +5613,22 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5648,8 +5638,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5658,8 +5648,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::COLD_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5674,17 +5664,17 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5694,8 +5684,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -5709,17 +5699,17 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5729,15 +5719,14 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } -DOCTEST_TEST_CASE( - "ProxQP::sparse: sparse random strongly convex qp with equality and " - "inequality constraints: test changing default settings " - "after several solves using warm start with previous result") +TEST_CASE("ProxQP::sparse: sparse random strongly convex qp with equality and " + "inequality constraints: test changing default settings " + "after several solves using warm start with previous result") { std::cout << "---testing sparse random strongly convex qp with equality and " "inequality constraints: test changing default settings after " @@ -5772,8 +5761,8 @@ DOCTEST_TEST_CASE( qp.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp.settings.eps_abs = eps_abs; qp.settings.eps_rel = 0; // qp.settings.verbose = true; @@ -5786,11 +5775,11 @@ DOCTEST_TEST_CASE( qp_random.u, compute_preconditioner, rho); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); + CHECK(std::abs(rho - qp.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp.results.info.rho) <= 1.E-9); T pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), @@ -5801,13 +5790,13 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(rho - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(rho - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5817,8 +5806,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp.update(nullopt, @@ -5832,8 +5821,8 @@ DOCTEST_TEST_CASE( 1.e-6); for (isize iter = 0; iter < 10; ++iter) { qp.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.settings.default_rho) < 1.e-9); + CHECK(std::abs(1.e-6 - qp.results.info.rho) < 1.e-9); pri_res = std::max( (qp_random.A * qp.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5843,8 +5832,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5853,8 +5842,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp2.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp2.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp2.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp2.settings.eps_abs = eps_abs; qp2.settings.eps_rel = 0; qp2.init(qp_random.H, @@ -5867,22 +5856,22 @@ DOCTEST_TEST_CASE( compute_preconditioner, nullopt, mu_eq); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); qp2.solve(); - DOCTEST_CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp2.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp2.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp2.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5892,8 +5881,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp2.results.y + qp_random.C.transpose() * qp2.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } // conter factual check with another QP object starting at the updated model @@ -5902,8 +5891,8 @@ DOCTEST_TEST_CASE( qp_random.C.cast()); qp3.settings.initial_guess = proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT; - DOCTEST_CHECK(qp3.settings.initial_guess == - proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); + CHECK(qp3.settings.initial_guess == + proxqp::InitialGuessStatus::WARM_START_WITH_PREVIOUS_RESULT); qp3.settings.eps_abs = eps_abs; qp3.settings.eps_rel = 0; qp3.init(qp_random.H, @@ -5918,17 +5907,17 @@ DOCTEST_TEST_CASE( mu_eq); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(rho - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(rho - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(mu_eq - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(T(1) / mu_eq - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5938,8 +5927,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } qp3.update(nullopt, @@ -5953,17 +5942,17 @@ DOCTEST_TEST_CASE( 1.e-6, 1.e-3); for (isize iter = 0; iter < 10; ++iter) { - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); qp3.solve(); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); - DOCTEST_CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.settings.default_rho) <= 1.E-9); + CHECK(std::abs(1.e-6 - qp3.results.info.rho) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.settings.default_mu_eq) <= 1.E-9); + CHECK(std::abs(1.e-3 - qp3.results.info.mu_eq) <= 1.E-9); + CHECK(std::abs(1.e3 - qp3.results.info.mu_eq_inv) <= 1.E-9); pri_res = std::max( (qp_random.A * qp3.results.x - qp_random.b).lpNorm(), (helpers::positive_part(qp_random.C * qp.results.x - qp_random.u) + @@ -5973,8 +5962,8 @@ DOCTEST_TEST_CASE( qp_random.g + qp_random.A.transpose() * qp3.results.y + qp_random.C.transpose() * qp3.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } } @@ -6022,8 +6011,8 @@ TEST_CASE("ProxQP::sparse: init must be called before update") qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); qp_random.H = 2 * qp_random.H; // keep same sparsity structure qp_random.g = utils::rand::vector_rand(dim); @@ -6047,8 +6036,8 @@ TEST_CASE("ProxQP::sparse: init must be called before update") qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= eps_abs); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= eps_abs); + CHECK(dua_res <= eps_abs); } TEST_CASE("ProxQP::sparse: test primal infeasibility solving") @@ -6107,8 +6096,8 @@ TEST_CASE("ProxQP::sparse: test primal infeasibility solving") qp_random.g + qp_random.A.transpose() * qp.results.y + qp_random.C.transpose() * qp.results.z) .lpNorm(); - DOCTEST_CHECK(pri_res <= scaled_eps); - DOCTEST_CHECK(dua_res <= eps_abs); + CHECK(pri_res <= scaled_eps); + CHECK(dua_res <= eps_abs); } } // TEST_CASE("ProxQP::sparse: estimate of minimal eigenvalues using Eigen") @@ -6153,7 +6142,7 @@ TEST_CASE("ProxQP::sparse: test primal infeasibility solving") // C_sparse, // qp_random.l, // qp_random.u); -// DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - +// CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - // minimal_eigenvalue) <= tol); // } // dim = 50; @@ -6187,7 +6176,7 @@ TEST_CASE("ProxQP::sparse: test primal infeasibility solving") // C_sparse, // qp_random.l, // qp_random.u); -// DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - +// CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - // minimal_eigenvalue) <= 1.); // } // } @@ -6235,8 +6224,8 @@ TEST_CASE("ProxQP::sparse: estimate of minimal eigenvalues using manual choice") nullopt, nullopt, minimal_eigenvalue); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } dim = 50; n_eq = dim; @@ -6271,8 +6260,8 @@ TEST_CASE("ProxQP::sparse: estimate of minimal eigenvalues using manual choice") nullopt, nullopt, minimal_eigenvalue); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= 1.); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= 1.); } } @@ -6326,8 +6315,8 @@ TEST_CASE( nullopt, nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= tol); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= tol); } dim = 50; n_eq = dim; @@ -6365,7 +6354,7 @@ TEST_CASE( nullopt, nullopt, estimate_minimal_eigen_value); - DOCTEST_CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - - minimal_eigenvalue) <= 1.); + CHECK(std::abs(qp.results.info.minimal_H_eigenvalue_estimate - + minimal_eigenvalue) <= 1.); } } diff --git a/test/src/sparse_ruiz_equilibration.cpp b/test/cpp/sparse_ruiz_equilibration.cpp similarity index 99% rename from test/src/sparse_ruiz_equilibration.cpp rename to test/cpp/sparse_ruiz_equilibration.cpp index 04f6b67f4..7c92feafc 100644 --- a/test/src/sparse_ruiz_equilibration.cpp +++ b/test/cpp/sparse_ruiz_equilibration.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include using namespace proxsuite; diff --git a/test/src/util_f32.cpp b/test/cpp/util_f32.cpp similarity index 97% rename from test/src/util_f32.cpp rename to test/cpp/util_f32.cpp index 06afe7ffa..f4cbfd19d 100644 --- a/test/src/util_f32.cpp +++ b/test/cpp/util_f32.cpp @@ -1,4 +1,4 @@ -#include "util_f64.hpp" +#include "util_f32.hpp" namespace proxsuite { namespace proxqp { diff --git a/test/include/util_f32.hpp b/test/cpp/util_f32.hpp similarity index 99% rename from test/include/util_f32.hpp rename to test/cpp/util_f32.hpp index c8415220c..740a0ad97 100644 --- a/test/include/util_f32.hpp +++ b/test/cpp/util_f32.hpp @@ -12,6 +12,7 @@ LDLT_EXPLICIT_TPL_DECL(2, ldlt_compute>); LDLT_EXPLICIT_TPL_DECL(2, llt_compute>); LDLT_EXPLICIT_TPL_DECL(2, ldlt_compute>); } // namespace eigen + namespace rand { LDLT_EXPLICIT_TPL_DECL(2, matrix_rand); LDLT_EXPLICIT_TPL_DECL(1, vector_rand); diff --git a/test/src/util_f64.cpp b/test/cpp/util_f64.cpp similarity index 100% rename from test/src/util_f64.cpp rename to test/cpp/util_f64.cpp diff --git a/test/include/util_f64.hpp b/test/cpp/util_f64.hpp similarity index 100% rename from test/include/util_f64.hpp rename to test/cpp/util_f64.hpp diff --git a/test/cpp/utils.hpp b/test/cpp/utils.hpp new file mode 100644 index 000000000..c7a9b791a --- /dev/null +++ b/test/cpp/utils.hpp @@ -0,0 +1,4 @@ +#pragma once + +#include "utils/util_f32.hpp" +#include "utils/util_f64.hpp" diff --git a/test/doctest/doctest.cpp b/test/doctest/doctest.cpp deleted file mode 100644 index 6a4a5dba9..000000000 --- a/test/doctest/doctest.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -#include "doctest.hpp" diff --git a/test/doctest/doctest.hpp b/test/doctest/doctest.hpp deleted file mode 100644 index fd4072374..000000000 --- a/test/doctest/doctest.hpp +++ /dev/null @@ -1,8694 +0,0 @@ -// ====================================================================== lgtm -// [cpp/missing-header-guard] -// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! == -// ====================================================================== -// -// doctest.h - the lightest feature-rich C++ single-header testing framework for -// unit tests and TDD -// -// Copyright (c) 2016-2021 Viktor Kirilov -// -// Distributed under the MIT Software License -// See accompanying file LICENSE.txt or copy at -// https://opensource.org/licenses/MIT -// -// The documentation can be found at the library's page: -// https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md -// -// ================================================================================================= -// ================================================================================================= -// ================================================================================================= -// -// The library is heavily influenced by Catch - -// https://github.com/catchorg/Catch2 which uses the Boost Software License - -// Version 1.0 see here - -// https://github.com/catchorg/Catch2/blob/master/LICENSE.txt -// -// The concept of subcases (sections in Catch) and expression decomposition are -// from there. Some parts of the code are taken directly: -// - stringification - the detection of "ostream& operator<<(ostream&, const -// T&)" and StringMaker<> -// - the Approx() helper class for floating point comparison -// - colors in the console -// - breaking into a debugger -// - signal / SEH handling -// - timer -// - XmlWriter class - thanks to Phil Nash for allowing the direct reuse (AKA -// copy/paste) -// -// The expression decomposing templates are taken from lest - -// https://github.com/martinmoene/lest which uses the Boost Software License - -// Version 1.0 see here - -// https://github.com/martinmoene/lest/blob/master/LICENSE.txt -// -// ================================================================================================= -// ================================================================================================= -// ================================================================================================= - -#ifndef DOCTEST_LIBRARY_INCLUDED -#define DOCTEST_LIBRARY_INCLUDED - -// ================================================================================================= -// == VERSION -// ====================================================================================== -// ================================================================================================= - -#define DOCTEST_VERSION_MAJOR 2 -#define DOCTEST_VERSION_MINOR 4 -#define DOCTEST_VERSION_PATCH 9 - -// util we need here -#define DOCTEST_TOSTR_IMPL(x) #x -#define DOCTEST_TOSTR(x) DOCTEST_TOSTR_IMPL(x) - -#define DOCTEST_VERSION_STR \ - DOCTEST_TOSTR(DOCTEST_VERSION_MAJOR) \ - "." DOCTEST_TOSTR(DOCTEST_VERSION_MINOR) "." DOCTEST_TOSTR( \ - DOCTEST_VERSION_PATCH) - -#define DOCTEST_VERSION \ - (DOCTEST_VERSION_MAJOR * 10000 + DOCTEST_VERSION_MINOR * 100 + \ - DOCTEST_VERSION_PATCH) - -// ================================================================================================= -// == COMPILER VERSION -// ============================================================================= -// ================================================================================================= - -// ideas for the version stuff are taken from here: -// https://github.com/cxxstuff/cxx_detect - -#ifdef _MSC_VER -#define DOCTEST_CPLUSPLUS _MSVC_LANG -#else -#define DOCTEST_CPLUSPLUS __cplusplus -#endif - -#define DOCTEST_COMPILER(MAJOR, MINOR, PATCH) \ - ((MAJOR) * 10000000 + (MINOR) * 100000 + (PATCH)) - -// GCC/Clang and GCC/MSVC are mutually exclusive, but Clang/MSVC are not because -// of clang-cl... -#if defined(_MSC_VER) && defined(_MSC_FULL_VER) -#if _MSC_VER == _MSC_FULL_VER / 10000 -#define DOCTEST_MSVC \ - DOCTEST_COMPILER(_MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 10000) -#else // MSVC -#define DOCTEST_MSVC \ - DOCTEST_COMPILER( \ - _MSC_VER / 100, (_MSC_FULL_VER / 100000) % 100, _MSC_FULL_VER % 100000) -#endif // MSVC -#endif // MSVC -#if defined(__clang__) && defined(__clang_minor__) -#define DOCTEST_CLANG \ - DOCTEST_COMPILER(__clang_major__, __clang_minor__, __clang_patchlevel__) -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - defined(__GNUC_PATCHLEVEL__) && !defined(__INTEL_COMPILER) -#define DOCTEST_GCC \ - DOCTEST_COMPILER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#endif // GCC - -#ifndef DOCTEST_MSVC -#define DOCTEST_MSVC 0 -#endif // DOCTEST_MSVC -#ifndef DOCTEST_CLANG -#define DOCTEST_CLANG 0 -#endif // DOCTEST_CLANG -#ifndef DOCTEST_GCC -#define DOCTEST_GCC 0 -#endif // DOCTEST_GCC - -// ================================================================================================= -// == COMPILER WARNINGS HELPERS -// ==================================================================== -// ================================================================================================= - -#if DOCTEST_CLANG -#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x) -#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH _Pragma("clang diagnostic push") -#define DOCTEST_CLANG_SUPPRESS_WARNING(w) \ - DOCTEST_PRAGMA_TO_STR(clang diagnostic ignored w) -#define DOCTEST_CLANG_SUPPRESS_WARNING_POP _Pragma("clang diagnostic pop") -#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_CLANG_SUPPRESS_WARNING_PUSH DOCTEST_CLANG_SUPPRESS_WARNING(w) -#else // DOCTEST_CLANG -#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -#define DOCTEST_CLANG_SUPPRESS_WARNING(w) -#define DOCTEST_CLANG_SUPPRESS_WARNING_POP -#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_CLANG - -#if DOCTEST_GCC -#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x) -#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH _Pragma("GCC diagnostic push") -#define DOCTEST_GCC_SUPPRESS_WARNING(w) \ - DOCTEST_PRAGMA_TO_STR(GCC diagnostic ignored w) -#define DOCTEST_GCC_SUPPRESS_WARNING_POP _Pragma("GCC diagnostic pop") -#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_GCC_SUPPRESS_WARNING_PUSH DOCTEST_GCC_SUPPRESS_WARNING(w) -#else // DOCTEST_GCC -#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH -#define DOCTEST_GCC_SUPPRESS_WARNING(w) -#define DOCTEST_GCC_SUPPRESS_WARNING_POP -#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_GCC - -#if DOCTEST_MSVC -#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH __pragma(warning(push)) -#define DOCTEST_MSVC_SUPPRESS_WARNING(w) __pragma(warning(disable : w)) -#define DOCTEST_MSVC_SUPPRESS_WARNING_POP __pragma(warning(pop)) -#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH DOCTEST_MSVC_SUPPRESS_WARNING(w) -#else // DOCTEST_MSVC -#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -#define DOCTEST_MSVC_SUPPRESS_WARNING(w) -#define DOCTEST_MSVC_SUPPRESS_WARNING_POP -#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_MSVC - -// ================================================================================================= -// == COMPILER WARNINGS -// ============================================================================ -// ================================================================================================= - -// both the header and the implementation suppress all of these, -// so it only makes sense to aggregrate them like so -#define DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH \ - DOCTEST_CLANG_SUPPRESS_WARNING_PUSH \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wweak-vtables") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic") \ - \ - DOCTEST_GCC_SUPPRESS_WARNING_PUSH \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wunknown-pragmas") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wpragmas") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Weffc++") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-overflow") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-aliasing") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept") \ - \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ - /* these 4 also disabled globally via cmake: */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4514) /* unreferenced inline function has been removed */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4571) /* SEH related */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4710) /* function not inlined */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4711) /* function selected for inline expansion*/ \ - /* */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4616) /* invalid compiler warning */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4619) /* invalid compiler warning */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4996) /* The compiler encountered a deprecated declaration */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4706) /* assignment within conditional expression */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4512) /* 'class' : assignment operator could not be generated */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4127) /* conditional expression is constant */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4625) /* copy constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4626) /* assignment operator was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5027) /* move assignment operator implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5026) /* move constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4640) /* construction of local static object not thread-safe */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ - /* static analysis */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 26439) /* Function may not throw. Declare it 'noexcept' */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 26495) /* Always initialize a member variable */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26451) /* Arithmetic overflow ... */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 26444) /* Avoid unnamed objects with custom ctor and dtor... */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26812) /* Prefer 'enum class' over 'enum' */ - -#define DOCTEST_SUPPRESS_COMMON_WARNINGS_POP \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP \ - DOCTEST_GCC_SUPPRESS_WARNING_POP \ - DOCTEST_MSVC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH - -DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wdeprecated") - -DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wctor-dtor-privacy") -DOCTEST_GCC_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-promo") - -DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING( - 4623) // default constructor was implicitly defined as deleted - -#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4548) /* before comma no effect; expected side - effect */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4265) /* virtual functions, but destructor is not virtual */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4986) /* exception specification does not match previous */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4350) /* 'member1' called instead of 'member2' */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4668) /* not defined as a preprocessor macro */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4365) /* signed/unsigned mismatch */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4774) /* format string not a string literal */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4625) /* copy constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4626) /* assignment operator was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5027) /* move assignment operator implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5026) /* move constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4623) /* default constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5039) /* pointer to pot. throwing function passed to extern C */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 5105) /* macro producing 'defined' has undefined behavior */ \ - DOCTEST_MSVC_SUPPRESS_WARNING( \ - 4738) /* storing float result in memory, loss of performance */ - -#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END \ - DOCTEST_MSVC_SUPPRESS_WARNING_POP - -// ================================================================================================= -// == FEATURE DETECTION -// ============================================================================ -// ================================================================================================= - -// general compiler feature support table: -// https://en.cppreference.com/w/cpp/compiler_support MSVC C++11 feature support -// table: https://msdn.microsoft.com/en-us/library/hh567368.aspx GCC C++11 -// feature support table: https://gcc.gnu.org/projects/cxx-status.html MSVC -// version table: -// https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering -// MSVC++ 14.3 (17) _MSC_VER == 1930 (Visual Studio 2022) -// MSVC++ 14.2 (16) _MSC_VER == 1920 (Visual Studio 2019) -// MSVC++ 14.1 (15) _MSC_VER == 1910 (Visual Studio 2017) -// MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) -// MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012) -// MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) -// MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) -// MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) - -// Universal Windows Platform support -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -#define DOCTEST_CONFIG_NO_WINDOWS_SEH -#endif // WINAPI_FAMILY -#if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH) -#define DOCTEST_CONFIG_WINDOWS_SEH -#endif // MSVC -#if defined(DOCTEST_CONFIG_NO_WINDOWS_SEH) && \ - defined(DOCTEST_CONFIG_WINDOWS_SEH) -#undef DOCTEST_CONFIG_WINDOWS_SEH -#endif // DOCTEST_CONFIG_NO_WINDOWS_SEH - -#if !defined(_WIN32) && !defined(__QNX__) && \ - !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(__EMSCRIPTEN__) && \ - !defined(__wasi__) -#define DOCTEST_CONFIG_POSIX_SIGNALS -#endif // _WIN32 -#if defined(DOCTEST_CONFIG_NO_POSIX_SIGNALS) && \ - defined(DOCTEST_CONFIG_POSIX_SIGNALS) -#undef DOCTEST_CONFIG_POSIX_SIGNALS -#endif // DOCTEST_CONFIG_NO_POSIX_SIGNALS - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -#if !defined(__cpp_exceptions) && !defined(__EXCEPTIONS) && \ - !defined(_CPPUNWIND) || \ - defined(__wasi__) -#define DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // no exceptions -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -#define DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS - -#if defined(DOCTEST_CONFIG_NO_EXCEPTIONS) && \ - !defined(DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS) -#define DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS && - // !DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS - -#ifdef __wasi__ -#define DOCTEST_CONFIG_NO_MULTITHREADING -#endif - -#if defined(DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN) && \ - !defined(DOCTEST_CONFIG_IMPLEMENT) -#define DOCTEST_CONFIG_IMPLEMENT -#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -#if defined(_WIN32) || defined(__CYGWIN__) -#if DOCTEST_MSVC -#define DOCTEST_SYMBOL_EXPORT __declspec(dllexport) -#define DOCTEST_SYMBOL_IMPORT __declspec(dllimport) -#else // MSVC -#define DOCTEST_SYMBOL_EXPORT __attribute__((dllexport)) -#define DOCTEST_SYMBOL_IMPORT __attribute__((dllimport)) -#endif // MSVC -#else // _WIN32 -#define DOCTEST_SYMBOL_EXPORT __attribute__((visibility("default"))) -#define DOCTEST_SYMBOL_IMPORT -#endif // _WIN32 - -#ifdef DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL -#ifdef DOCTEST_CONFIG_IMPLEMENT -#define DOCTEST_INTERFACE DOCTEST_SYMBOL_EXPORT -#else // DOCTEST_CONFIG_IMPLEMENT -#define DOCTEST_INTERFACE DOCTEST_SYMBOL_IMPORT -#endif // DOCTEST_CONFIG_IMPLEMENT -#else // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL -#define DOCTEST_INTERFACE -#endif // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL - -// needed for extern template instantiations -// see https://github.com/fmtlib/fmt/issues/2228 -#if DOCTEST_MSVC -#define DOCTEST_INTERFACE_DECL -#define DOCTEST_INTERFACE_DEF DOCTEST_INTERFACE -#else // DOCTEST_MSVC -#define DOCTEST_INTERFACE_DECL DOCTEST_INTERFACE -#define DOCTEST_INTERFACE_DEF -#endif // DOCTEST_MSVC - -#define DOCTEST_EMPTY - -#if DOCTEST_MSVC -#define DOCTEST_NOINLINE __declspec(noinline) -#define DOCTEST_UNUSED -#define DOCTEST_ALIGNMENT(x) -#elif DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 5, 0) -#define DOCTEST_NOINLINE -#define DOCTEST_UNUSED -#define DOCTEST_ALIGNMENT(x) -#else -#define DOCTEST_NOINLINE __attribute__((noinline)) -#define DOCTEST_UNUSED __attribute__((unused)) -#define DOCTEST_ALIGNMENT(x) __attribute__((aligned(x))) -#endif - -#ifndef DOCTEST_NORETURN -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_NORETURN -#else // DOCTEST_MSVC -#define DOCTEST_NORETURN [[noreturn]] -#endif // DOCTEST_MSVC -#endif // DOCTEST_NORETURN - -#ifndef DOCTEST_NOEXCEPT -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_NOEXCEPT -#else // DOCTEST_MSVC -#define DOCTEST_NOEXCEPT noexcept -#endif // DOCTEST_MSVC -#endif // DOCTEST_NOEXCEPT - -#ifndef DOCTEST_CONSTEXPR -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_CONSTEXPR const -#define DOCTEST_CONSTEXPR_FUNC inline -#else // DOCTEST_MSVC -#define DOCTEST_CONSTEXPR constexpr -#define DOCTEST_CONSTEXPR_FUNC constexpr -#endif // DOCTEST_MSVC -#endif // DOCTEST_CONSTEXPR - -// ================================================================================================= -// == FEATURE DETECTION END -// ======================================================================== -// ================================================================================================= - -#define DOCTEST_DECLARE_INTERFACE(name) \ - virtual ~name(); \ - name() = default; \ - name(const name&) = delete; \ - name(name&&) = delete; \ - name& operator=(const name&) = delete; \ - name& operator=(name&&) = delete; - -#define DOCTEST_DEFINE_INTERFACE(name) name::~name() = default; - -// internal macros for string concatenation and anonymous variable name -// generation -#define DOCTEST_CAT_IMPL(s1, s2) s1##s2 -#define DOCTEST_CAT(s1, s2) DOCTEST_CAT_IMPL(s1, s2) -#ifdef __COUNTER__ // not standard and may be missing for some compilers -#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __COUNTER__) -#else // __COUNTER__ -#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __LINE__) -#endif // __COUNTER__ - -#ifndef DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE -#define DOCTEST_REF_WRAP(x) x& -#else // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE -#define DOCTEST_REF_WRAP(x) x -#endif // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE - -// not using __APPLE__ because... this is how Catch does it -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -#define DOCTEST_PLATFORM_MAC -#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#define DOCTEST_PLATFORM_IPHONE -#elif defined(_WIN32) -#define DOCTEST_PLATFORM_WINDOWS -#elif defined(__wasi__) -#define DOCTEST_PLATFORM_WASI -#else // DOCTEST_PLATFORM -#define DOCTEST_PLATFORM_LINUX -#endif // DOCTEST_PLATFORM - -namespace doctest { -namespace detail { -static DOCTEST_CONSTEXPR int -consume(const int*, int) noexcept -{ - return 0; -} -} -} - -#define DOCTEST_GLOBAL_NO_WARNINGS(var, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wglobal-constructors") \ - static const int var = doctest::detail::consume(&var, __VA_ARGS__); \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#ifndef DOCTEST_BREAK_INTO_DEBUGGER -// should probably take a look at https://github.com/scottt/debugbreak -#ifdef DOCTEST_PLATFORM_LINUX -#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) -// Break at the location of the failing check if possible -#define DOCTEST_BREAK_INTO_DEBUGGER() \ - __asm__("int $3\n" : :) // NOLINT(hicpp-no-assembler) -#else -#include -#define DOCTEST_BREAK_INTO_DEBUGGER() raise(SIGTRAP) -#endif -#elif defined(DOCTEST_PLATFORM_MAC) -#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || \ - defined(__i386) -#define DOCTEST_BREAK_INTO_DEBUGGER() \ - __asm__("int $3\n" : :) // NOLINT(hicpp-no-assembler) -#elif defined(__ppc__) || defined(__ppc64__) -// https://www.cocoawithlove.com/2008/03/break-into-debugger.html -#define DOCTEST_BREAK_INTO_DEBUGGER() \ - __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ - : \ - : \ - : "memory", "r0", "r3", "r4") // NOLINT(hicpp-no-assembler) -#else -#define DOCTEST_BREAK_INTO_DEBUGGER() \ - __asm__("brk #0"); // NOLINT(hicpp-no-assembler) -#endif -#elif DOCTEST_MSVC -#define DOCTEST_BREAK_INTO_DEBUGGER() __debugbreak() -#elif defined(__MINGW32__) -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wredundant-decls") -extern "C" __declspec(dllimport) void __stdcall -DebugBreak(); -DOCTEST_GCC_SUPPRESS_WARNING_POP -#define DOCTEST_BREAK_INTO_DEBUGGER() ::DebugBreak() -#else // linux -#define DOCTEST_BREAK_INTO_DEBUGGER() (static_cast(0)) -#endif // linux -#endif // DOCTEST_BREAK_INTO_DEBUGGER - -// this is kept here for backwards compatibility since the config option was -// changed -#ifdef DOCTEST_CONFIG_USE_IOSFWD -#ifndef DOCTEST_CONFIG_USE_STD_HEADERS -#define DOCTEST_CONFIG_USE_STD_HEADERS -#endif -#endif // DOCTEST_CONFIG_USE_IOSFWD - -// for clang - always include ciso646 (which drags some std stuff) because -// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in -// which case we don't want to forward declare stuff from std - for reference: -// https://github.com/doctest/doctest/issues/126 -// https://github.com/doctest/doctest/issues/356 -#if DOCTEST_CLANG -#include -#ifdef _LIBCPP_VERSION -#ifndef DOCTEST_CONFIG_USE_STD_HEADERS -#define DOCTEST_CONFIG_USE_STD_HEADERS -#endif -#endif // _LIBCPP_VERSION -#endif // clang - -#ifdef DOCTEST_CONFIG_USE_STD_HEADERS -#ifndef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#define DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN -#include -#include -#include -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END -#else // DOCTEST_CONFIG_USE_STD_HEADERS - -// Forward declaring 'X' in namespace std is not permitted by the C++ Standard. -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4643) - -namespace std { // NOLINT(cert-dcl58-cpp) -typedef decltype(nullptr) nullptr_t; // NOLINT(modernize-use-using) -typedef decltype(sizeof(void*)) size_t; // NOLINT(modernize-use-using) -template -struct char_traits; -template<> -struct char_traits; -template -class basic_ostream; // NOLINT(fuchsia-virtual-inheritance) -typedef basic_ostream> - ostream; // NOLINT(modernize-use-using) -template -// NOLINTNEXTLINE -basic_ostream& -operator<<(basic_ostream&, const char*); -template -class basic_istream; -typedef basic_istream> - istream; // NOLINT(modernize-use-using) -template -class tuple; -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: -// https://github.com/doctest/doctest/issues/183 -template -class allocator; -template -class basic_string; -using string = basic_string, allocator>; -#endif // VS 2019 -} // namespace std - -DOCTEST_MSVC_SUPPRESS_WARNING_POP - -#endif // DOCTEST_CONFIG_USE_STD_HEADERS - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#include -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - -namespace doctest { - -using std::size_t; - -DOCTEST_INTERFACE extern bool is_running_in_test; - -#ifndef DOCTEST_CONFIG_STRING_SIZE_TYPE -#define DOCTEST_CONFIG_STRING_SIZE_TYPE unsigned -#endif - -// A 24 byte string class (can be as small as 17 for x64 and 13 for x86) that -// can hold strings with length of up to 23 chars on the stack before going on -// the heap - the last byte of the buffer is used for: -// - "is small" bit - the highest bit - if "0" then it is small - otherwise its -// "1" (128) -// - if small - capacity left before going on the heap - using the lowest 5 bits -// - if small - 2 bits are left unused - the second and third highest ones -// - if small - acts as a null terminator if strlen() is 23 (24 including the -// null terminator) -// and the "is small" bit remains "0" ("as well as the capacity -// left") so its OK -// Idea taken from this lecture about the string implementation of -// facebook/folly - fbstring https://www.youtube.com/watch?v=kPR8h4-qZdk -// TODO: -// - optimizations - like not deleting memory unnecessarily in operator= and -// etc. -// - resize/reserve/clear -// - replace -// - back/front -// - iterator stuff -// - find & friends -// - push_back/pop_back -// - assign/insert/erase -// - relational operators as free functions - taking const char* as one of the -// params -class DOCTEST_INTERFACE String -{ -public: - using size_type = DOCTEST_CONFIG_STRING_SIZE_TYPE; - -private: - static DOCTEST_CONSTEXPR size_type len = - 24; //! OCLINT avoid private static members - static DOCTEST_CONSTEXPR size_type last = - len - 1; //! OCLINT avoid private static members - - struct view // len should be more than sizeof(view) - because of the final - // byte for flags - { - char* ptr; - size_type size; - size_type capacity; - }; - - union - { - char buf[len]; // NOLINT(*-avoid-c-arrays) - view data; - }; - - char* allocate(size_type sz); - - bool isOnStack() const noexcept { return (buf[last] & 128) == 0; } - void setOnHeap() noexcept; - void setLast(size_type in = last) noexcept; - void setSize(size_type sz) noexcept; - - void copy(const String& other); - -public: - static DOCTEST_CONSTEXPR size_type npos = static_cast(-1); - - String() noexcept; - ~String(); - - // cppcheck-suppress noExplicitConstructor - String(const char* in); - String(const char* in, size_type in_size); - - String(std::istream& in, size_type in_size); - - String(const String& other); - String& operator=(const String& other); - - String& operator+=(const String& other); - - String(String&& other) noexcept; - String& operator=(String&& other) noexcept; - - char operator[](size_type i) const; - char& operator[](size_type i); - - // the only functions I'm willing to leave in the interface - available for - // inlining - const char* c_str() const - { - return const_cast(this)->c_str(); - } // NOLINT - char* c_str() - { - if (isOnStack()) { - return reinterpret_cast(buf); - } - return data.ptr; - } - - size_type size() const; - size_type capacity() const; - - String substr(size_type pos, size_type cnt = npos) &&; - String substr(size_type pos, size_type cnt = npos) const&; - - size_type find(char ch, size_type pos = 0) const; - size_type rfind(char ch, size_type pos = npos) const; - - int compare(const char* other, bool no_case = false) const; - int compare(const String& other, bool no_case = false) const; - - friend DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, - const String& in); -}; - -DOCTEST_INTERFACE String -operator+(const String& lhs, const String& rhs); - -DOCTEST_INTERFACE bool -operator==(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator!=(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator<(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator>(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator<=(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator>=(const String& lhs, const String& rhs); - -class DOCTEST_INTERFACE Contains -{ -public: - explicit Contains(const String& string); - - bool checkWith(const String& other) const; - - String string; -}; - -DOCTEST_INTERFACE String -toString(const Contains& in); - -DOCTEST_INTERFACE bool -operator==(const String& lhs, const Contains& rhs); -DOCTEST_INTERFACE bool -operator==(const Contains& lhs, const String& rhs); -DOCTEST_INTERFACE bool -operator!=(const String& lhs, const Contains& rhs); -DOCTEST_INTERFACE bool -operator!=(const Contains& lhs, const String& rhs); - -namespace Color { -enum Enum -{ - None = 0, - White, - Red, - Green, - Blue, - Cyan, - Yellow, - Grey, - - Bright = 0x10, - - BrightRed = Bright | Red, - BrightGreen = Bright | Green, - LightGrey = Bright | Grey, - BrightWhite = Bright | White -}; - -DOCTEST_INTERFACE std::ostream& -operator<<(std::ostream& s, Color::Enum code); -} // namespace Color - -namespace assertType { -enum Enum -{ - // macro traits - - is_warn = 1, - is_check = 2 * is_warn, - is_require = 2 * is_check, - - is_normal = 2 * is_require, - is_throws = 2 * is_normal, - is_throws_as = 2 * is_throws, - is_throws_with = 2 * is_throws_as, - is_nothrow = 2 * is_throws_with, - - is_false = 2 * is_nothrow, - is_unary = - 2 * is_false, // not checked anywhere - used just to distinguish the types - - is_eq = 2 * is_unary, - is_ne = 2 * is_eq, - - is_lt = 2 * is_ne, - is_gt = 2 * is_lt, - - is_ge = 2 * is_gt, - is_le = 2 * is_ge, - - // macro types - - DT_WARN = is_normal | is_warn, - DT_CHECK = is_normal | is_check, - DT_REQUIRE = is_normal | is_require, - - DT_WARN_FALSE = is_normal | is_false | is_warn, - DT_CHECK_FALSE = is_normal | is_false | is_check, - DT_REQUIRE_FALSE = is_normal | is_false | is_require, - - DT_WARN_THROWS = is_throws | is_warn, - DT_CHECK_THROWS = is_throws | is_check, - DT_REQUIRE_THROWS = is_throws | is_require, - - DT_WARN_THROWS_AS = is_throws_as | is_warn, - DT_CHECK_THROWS_AS = is_throws_as | is_check, - DT_REQUIRE_THROWS_AS = is_throws_as | is_require, - - DT_WARN_THROWS_WITH = is_throws_with | is_warn, - DT_CHECK_THROWS_WITH = is_throws_with | is_check, - DT_REQUIRE_THROWS_WITH = is_throws_with | is_require, - - DT_WARN_THROWS_WITH_AS = is_throws_with | is_throws_as | is_warn, - DT_CHECK_THROWS_WITH_AS = is_throws_with | is_throws_as | is_check, - DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require, - - DT_WARN_NOTHROW = is_nothrow | is_warn, - DT_CHECK_NOTHROW = is_nothrow | is_check, - DT_REQUIRE_NOTHROW = is_nothrow | is_require, - - DT_WARN_EQ = is_normal | is_eq | is_warn, - DT_CHECK_EQ = is_normal | is_eq | is_check, - DT_REQUIRE_EQ = is_normal | is_eq | is_require, - - DT_WARN_NE = is_normal | is_ne | is_warn, - DT_CHECK_NE = is_normal | is_ne | is_check, - DT_REQUIRE_NE = is_normal | is_ne | is_require, - - DT_WARN_GT = is_normal | is_gt | is_warn, - DT_CHECK_GT = is_normal | is_gt | is_check, - DT_REQUIRE_GT = is_normal | is_gt | is_require, - - DT_WARN_LT = is_normal | is_lt | is_warn, - DT_CHECK_LT = is_normal | is_lt | is_check, - DT_REQUIRE_LT = is_normal | is_lt | is_require, - - DT_WARN_GE = is_normal | is_ge | is_warn, - DT_CHECK_GE = is_normal | is_ge | is_check, - DT_REQUIRE_GE = is_normal | is_ge | is_require, - - DT_WARN_LE = is_normal | is_le | is_warn, - DT_CHECK_LE = is_normal | is_le | is_check, - DT_REQUIRE_LE = is_normal | is_le | is_require, - - DT_WARN_UNARY = is_normal | is_unary | is_warn, - DT_CHECK_UNARY = is_normal | is_unary | is_check, - DT_REQUIRE_UNARY = is_normal | is_unary | is_require, - - DT_WARN_UNARY_FALSE = is_normal | is_false | is_unary | is_warn, - DT_CHECK_UNARY_FALSE = is_normal | is_false | is_unary | is_check, - DT_REQUIRE_UNARY_FALSE = is_normal | is_false | is_unary | is_require, -}; -} // namespace assertType - -DOCTEST_INTERFACE const char* -assertString(assertType::Enum at); -DOCTEST_INTERFACE const char* -failureString(assertType::Enum at); -DOCTEST_INTERFACE const char* -skipPathFromFilename(const char* file); - -struct DOCTEST_INTERFACE TestCaseData -{ - String m_file; // the file in which the test was registered (using String - - // see #350) - unsigned m_line; // the line where the test was registered - const char* m_name; // name of the test case - const char* m_test_suite; // the test suite in which the test was added - const char* m_description; - bool m_skip; - bool m_no_breaks; - bool m_no_output; - bool m_may_fail; - bool m_should_fail; - int m_expected_failures; - double m_timeout; -}; - -struct DOCTEST_INTERFACE AssertData -{ - // common - for all asserts - const TestCaseData* m_test_case; - assertType::Enum m_at; - const char* m_file; - int m_line; - const char* m_expr; - bool m_failed; - - // exception-related - for all asserts - bool m_threw; - String m_exception; - - // for normal asserts - String m_decomp; - - // for specific exception-related asserts - bool m_threw_as; - const char* m_exception_type; - - class DOCTEST_INTERFACE StringContains - { - private: - Contains content; - bool isContains; - - public: - StringContains(const String& str) - : content(str) - , isContains(false) - { - } - StringContains(Contains cntn) - : content(static_cast(cntn)) - , isContains(true) - { - } - - bool check(const String& str) - { - return isContains ? (content == str) : (content.string == str); - } - - operator const String&() const { return content.string; } - - const char* c_str() const { return content.string.c_str(); } - } m_exception_string; - - AssertData(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type, - const StringContains& exception_string); -}; - -struct DOCTEST_INTERFACE MessageData -{ - String m_string; - const char* m_file; - int m_line; - assertType::Enum m_severity; -}; - -struct DOCTEST_INTERFACE SubcaseSignature -{ - String m_name; - const char* m_file; - int m_line; - - bool operator==(const SubcaseSignature& other) const; - bool operator<(const SubcaseSignature& other) const; -}; - -struct DOCTEST_INTERFACE IContextScope -{ - DOCTEST_DECLARE_INTERFACE(IContextScope) - virtual void stringify(std::ostream*) const = 0; -}; - -namespace detail { -struct DOCTEST_INTERFACE TestCase; -} // namespace detail - -struct ContextOptions //! OCLINT too many fields -{ - std::ostream* cout = nullptr; // stdout stream - String binary_name; // the test binary name - - const detail::TestCase* currentTest = nullptr; - - // == parameters from the command line - String out; // output filename - String order_by; // how tests should be ordered - unsigned rand_seed; // the seed for rand ordering - - unsigned first; // the first (matching) test to be executed - unsigned last; // the last (matching) test to be executed - - int abort_after; // stop tests after this many failed assertions - int subcase_filter_levels; // apply the subcase filters for the first N levels - - bool success; // include successful assertions in output - bool case_sensitive; // if filtering should be case sensitive - bool exit; // if the program should be exited after the tests are ran/whatever - bool duration; // print the time duration of each test case - bool minimal; // minimal console output (only test failures) - bool quiet; // no console output - bool no_throw; // to skip exceptions-related assertion macros - bool no_exitcode; // if the framework should return 0 as the exitcode - bool no_run; // to not run the tests at all (can be done with an "*" exclude) - bool no_intro; // to not print the intro of the framework - bool no_version; // to not print the version of the framework - bool no_colors; // if output to the console should be colorized - bool - force_colors; // forces the use of colors even when a tty cannot be detected - bool no_breaks; // to not break into the debugger - bool no_skip; // don't skip test cases which are marked to be skipped - bool - gnu_file_line; // if line numbers should be surrounded with :x: and not (x): - bool no_path_in_filenames; // if the path to files should be removed from the - // output - bool no_line_numbers; // if source code line numbers should be omitted from - // the output - bool no_debug_output; // no output in the debug console when a debugger is - // attached - bool no_skipped_summary; // don't print "skipped" in the summary !!! - // UNDOCUMENTED !!! - bool no_time_in_output; // omit any time/timestamps from output !!! - // UNDOCUMENTED !!! - - bool help; // to print the help - bool version; // to print the version - bool count; // if only the count of matching tests is to be retrieved - bool list_test_cases; // to list all tests matching the filters - bool list_test_suites; // to list all suites matching the filters - bool list_reporters; // lists all registered reporters -}; - -namespace detail { -namespace types { -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -using namespace std; -#else -template -struct enable_if -{}; - -template -struct enable_if -{ - using type = T; -}; - -struct true_type -{ - static DOCTEST_CONSTEXPR bool value = true; -}; -struct false_type -{ - static DOCTEST_CONSTEXPR bool value = false; -}; - -template -struct remove_reference -{ - using type = T; -}; -template -struct remove_reference -{ - using type = T; -}; -template -struct remove_reference -{ - using type = T; -}; - -template -struct is_rvalue_reference : false_type -{}; -template -struct is_rvalue_reference : true_type -{}; - -template -struct remove_const -{ - using type = T; -}; -template -struct remove_const -{ - using type = T; -}; - -// Compiler intrinsics -template -struct is_enum -{ - static DOCTEST_CONSTEXPR bool value = __is_enum(T); -}; -template -struct underlying_type -{ - using type = __underlying_type(T); -}; - -template -struct is_pointer : false_type -{}; -template -struct is_pointer : true_type -{}; - -template -struct is_array : false_type -{}; -// NOLINTNEXTLINE(*-avoid-c-arrays) -template -struct is_array : true_type -{}; -#endif -} - -// -template -T&& -declval(); - -template -DOCTEST_CONSTEXPR_FUNC T&& -forward(typename types::remove_reference::type& t) DOCTEST_NOEXCEPT -{ - return static_cast(t); -} - -template -DOCTEST_CONSTEXPR_FUNC T&& -forward(typename types::remove_reference::type&& t) DOCTEST_NOEXCEPT -{ - return static_cast(t); -} - -template -struct deferred_false : types::false_type -{}; - -// MSVS 2015 :( -#if defined(_MSC_VER) && _MSC_VER <= 1900 -template -struct has_global_insertion_operator : types::false_type -{}; - -template -struct has_global_insertion_operator< - T, - decltype(::operator<<(declval(), declval()), void())> - : types::true_type -{}; - -template -struct has_insertion_operator -{ - static DOCTEST_CONSTEXPR bool value = has_global_insertion_operator::value; -}; - -template -struct insert_hack; - -template -struct insert_hack -{ - static void insert(std::ostream& os, const T& t) { ::operator<<(os, t); } -}; - -template -struct insert_hack -{ - static void insert(std::ostream& os, const T& t) { operator<<(os, t); } -}; - -template -using insert_hack_t = insert_hack::value>; -#else -template -struct has_insertion_operator : types::false_type -{}; -#endif - -template -struct has_insertion_operator< - T, - decltype(operator<<(declval(), declval()), void())> - : types::true_type -{}; - -DOCTEST_INTERFACE std::ostream* -tlssPush(); -DOCTEST_INTERFACE String -tlssPop(); - -template -struct StringMakerBase -{ - template - static String convert(const DOCTEST_REF_WRAP(T)) - { -#ifdef DOCTEST_CONFIG_REQUIRE_STRINGIFICATION_FOR_ALL_USED_TYPES - static_assert( - deferred_false::value, - "No stringification detected for type T. See string conversion manual"); -#endif - return "{?}"; - } -}; - -template -struct filldata; - -template -void -filloss(std::ostream* stream, const T& in) -{ - filldata::fill(stream, in); -} - -template -void -filloss(std::ostream* stream, const T (&in)[N]) -{ // NOLINT(*-avoid-c-arrays) - // T[N], T(&)[N], T(&&)[N] have same behaviour. - // Hence remove reference. - filloss::type>(stream, in); -} - -template -String -toStream(const T& in) -{ - std::ostream* stream = tlssPush(); - filloss(stream, in); - return tlssPop(); -} - -template<> -struct StringMakerBase -{ - template - static String convert(const DOCTEST_REF_WRAP(T) in) - { - return toStream(in); - } -}; -} // namespace detail - -template -struct StringMaker - : public detail::StringMakerBase::value || - detail::types::is_pointer::value || - detail::types::is_array::value> -{}; - -#ifndef DOCTEST_STRINGIFY -#ifdef DOCTEST_CONFIG_DOUBLE_STRINGIFY -#define DOCTEST_STRINGIFY(...) toString(toString(__VA_ARGS__)) -#else -#define DOCTEST_STRINGIFY(...) toString(__VA_ARGS__) -#endif -#endif - -template -String -toString() -{ -#if DOCTEST_MSVC >= 0 && DOCTEST_CLANG == 0 && DOCTEST_GCC == 0 - String ret = - __FUNCSIG__; // class doctest::String __cdecl doctest::toString(void) - String::size_type beginPos = ret.find('<'); - return ret.substr(beginPos + 1, - ret.size() - beginPos - - static_cast(sizeof(">(void)"))); -#else - String ret = - __PRETTY_FUNCTION__; // doctest::String toString() [with T = TYPE] - String::size_type begin = ret.find('=') + 2; - return ret.substr(begin, ret.size() - begin - 1); -#endif -} - -template::value, - bool>::type = true> -String -toString(const DOCTEST_REF_WRAP(T) value) -{ - return StringMaker::convert(value); -} - -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -DOCTEST_INTERFACE String -toString(const char* in); -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: -// https://github.com/doctest/doctest/issues/183 -DOCTEST_INTERFACE String -toString(const std::string& in); -#endif // VS 2019 - -DOCTEST_INTERFACE String -toString(String in); - -DOCTEST_INTERFACE String toString(std::nullptr_t); - -DOCTEST_INTERFACE String -toString(bool in); - -DOCTEST_INTERFACE String -toString(float in); -DOCTEST_INTERFACE String -toString(double in); -DOCTEST_INTERFACE String -toString(double long in); - -DOCTEST_INTERFACE String -toString(char in); -DOCTEST_INTERFACE String -toString(char signed in); -DOCTEST_INTERFACE String -toString(char unsigned in); -DOCTEST_INTERFACE String -toString(short in); -DOCTEST_INTERFACE String -toString(short unsigned in); -DOCTEST_INTERFACE String -toString(signed in); -DOCTEST_INTERFACE String -toString(unsigned in); -DOCTEST_INTERFACE String -toString(long in); -DOCTEST_INTERFACE String -toString(long unsigned in); -DOCTEST_INTERFACE String -toString(long long in); -DOCTEST_INTERFACE String -toString(long long unsigned in); - -template::value, - bool>::type = true> -String -toString(const DOCTEST_REF_WRAP(T) value) -{ - using UT = typename detail::types::underlying_type::type; - return (DOCTEST_STRINGIFY(static_cast(value))); -} - -namespace detail { -template -struct filldata -{ - static void fill(std::ostream* stream, const T& in) - { -#if defined(_MSC_VER) && _MSC_VER <= 1900 - insert_hack_t::insert(*stream, in); -#else - operator<<(*stream, in); -#endif - } -}; - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866) -// NOLINTBEGIN(*-avoid-c-arrays) -template -struct filldata -{ - static void fill(std::ostream* stream, const T (&in)[N]) - { - *stream << "["; - for (size_t i = 0; i < N; i++) { - if (i != 0) { - *stream << ", "; - } - *stream << (DOCTEST_STRINGIFY(in[i])); - } - *stream << "]"; - } -}; -// NOLINTEND(*-avoid-c-arrays) -DOCTEST_MSVC_SUPPRESS_WARNING_POP - -// Specialized since we don't want the terminating null byte! -// NOLINTBEGIN(*-avoid-c-arrays) -template -struct filldata -{ - static void fill(std::ostream* stream, const char (&in)[N]) - { - *stream << String(in, in[N - 1] ? N : N - 1); - } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) -}; -// NOLINTEND(*-avoid-c-arrays) - -template<> -struct filldata -{ - static void fill(std::ostream* stream, const void* in); -}; - -template -struct filldata -{ - static void fill(std::ostream* stream, const T* in) - { - filldata::fill(stream, in); - } -}; -} - -struct DOCTEST_INTERFACE Approx -{ - Approx(double value); - - Approx operator()(double value) const; - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - explicit Approx(const T& value, - typename detail::types::enable_if< - std::is_constructible::value>::type* = - static_cast(nullptr)) - { - *this = static_cast(value); - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - Approx& epsilon(double newEpsilon); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - typename std::enable_if::value, - Approx&>::type epsilon(const T& newEpsilon) - { - m_epsilon = static_cast(newEpsilon); - return *this; - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - Approx& scale(double newScale); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - typename std::enable_if::value, - Approx&>::type scale(const T& newScale) - { - m_scale = static_cast(newScale); - return *this; - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - // clang-format off - DOCTEST_INTERFACE friend bool operator==(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator==(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator!=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator!=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator<=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator<=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator>=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator>=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator< (double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator< (const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator> (double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator> (const Approx & lhs, double rhs); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#define DOCTEST_APPROX_PREFIX \ - template friend typename std::enable_if::value, bool>::type - - DOCTEST_APPROX_PREFIX operator==(const T& lhs, const Approx& rhs) { return operator==(static_cast(lhs), rhs); } - DOCTEST_APPROX_PREFIX operator==(const Approx& lhs, const T& rhs) { return operator==(rhs, lhs); } - DOCTEST_APPROX_PREFIX operator!=(const T& lhs, const Approx& rhs) { return !operator==(lhs, rhs); } - DOCTEST_APPROX_PREFIX operator!=(const Approx& lhs, const T& rhs) { return !operator==(rhs, lhs); } - DOCTEST_APPROX_PREFIX operator<=(const T& lhs, const Approx& rhs) { return static_cast(lhs) < rhs.m_value || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator<=(const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast(rhs) || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator>=(const T& lhs, const Approx& rhs) { return static_cast(lhs) > rhs.m_value || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator>=(const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast(rhs) || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator< (const T& lhs, const Approx& rhs) { return static_cast(lhs) < rhs.m_value && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator< (const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast(rhs) && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator> (const T& lhs, const Approx& rhs) { return static_cast(lhs) > rhs.m_value && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator> (const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast(rhs) && lhs != rhs; } -#undef DOCTEST_APPROX_PREFIX -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - // clang-format on - - double m_epsilon; - double m_scale; - double m_value; -}; - -DOCTEST_INTERFACE String -toString(const Approx& in); - -DOCTEST_INTERFACE const ContextOptions* -getContextOptions(); - -template -struct DOCTEST_INTERFACE_DECL IsNaN -{ - F value; - bool flipped; - IsNaN(F f, bool flip = false) - : value(f) - , flipped(flip) - { - } - IsNaN operator!() const { return { value, !flipped }; } - operator bool() const; -}; -#ifndef __MINGW32__ -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -#endif -DOCTEST_INTERFACE String -toString(IsNaN in); -DOCTEST_INTERFACE String -toString(IsNaN in); -DOCTEST_INTERFACE String -toString(IsNaN in); - -#ifndef DOCTEST_CONFIG_DISABLE - -namespace detail { -// clang-format off -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - template struct decay_array { using type = T; }; - template struct decay_array { using type = T*; }; - template struct decay_array { using type = T*; }; - - template struct not_char_pointer { static DOCTEST_CONSTEXPR value = 1; }; - template<> struct not_char_pointer { static DOCTEST_CONSTEXPR value = 0; }; - template<> struct not_char_pointer { static DOCTEST_CONSTEXPR value = 0; }; - - template struct can_use_op : public not_char_pointer::type> {}; -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -// clang-format on - -struct DOCTEST_INTERFACE TestFailureException -{}; - -DOCTEST_INTERFACE bool -checkIfShouldThrow(assertType::Enum at); - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -DOCTEST_NORETURN -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -DOCTEST_INTERFACE void -throwException(); - -struct DOCTEST_INTERFACE Subcase -{ - SubcaseSignature m_signature; - bool m_entered = false; - - Subcase(const String& name, const char* file, int line); - Subcase(const Subcase&) = delete; - Subcase(Subcase&&) = delete; - Subcase& operator=(const Subcase&) = delete; - Subcase& operator=(Subcase&&) = delete; - ~Subcase(); - - operator bool() const; - -private: - bool checkFilters(); -}; - -template -String -stringifyBinaryExpr(const DOCTEST_REF_WRAP(L) lhs, - const char* op, - const DOCTEST_REF_WRAP(R) rhs) -{ - return (DOCTEST_STRINGIFY(lhs)) + op + (DOCTEST_STRINGIFY(rhs)); -} - -#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0) -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison") -#endif - -// This will check if there is any way it could find a operator like member or -// friend and uses it. If not it doesn't find the operator or if the operator at -// global scope is defined after this template, the template won't be -// instantiated due to SFINAE. Once the template is not instantiated it can look -// for global operator using normal conversions. -#define SFINAE_OP(ret, op) \ - decltype((void)(doctest::detail::declval() \ - op doctest::detail::declval()), \ - ret{}) - -#define DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(op, op_str, op_macro) \ - template \ - DOCTEST_NOINLINE SFINAE_OP(Result, op) operator op(R&& rhs) \ - { \ - bool res = op_macro(doctest::detail::forward(lhs), \ - doctest::detail::forward(rhs)); \ - if (m_at & assertType::is_false) \ - res = !res; \ - if (!res || doctest::getContextOptions()->success) \ - return Result(res, stringifyBinaryExpr(lhs, op_str, rhs)); \ - return Result(res); \ - } - -// more checks could be added - like in Catch: -// https://github.com/catchorg/Catch2/pull/1480/files -// https://github.com/catchorg/Catch2/pull/1481/files -#define DOCTEST_FORBIT_EXPRESSION(rt, op) \ - template \ - rt& operator op(const R&) \ - { \ - static_assert( \ - deferred_false::value, \ - "Expression Too Complex Please Rewrite As Binary Comparison!"); \ - return *this; \ - } - -struct DOCTEST_INTERFACE Result // NOLINT(*-member-init) -{ - bool m_passed; - String m_decomp; - - Result() = default; // TODO: Why do we need this? (To remove NOLINT) - Result(bool passed, const String& decomposition = String()); - - // forbidding some expressions based on this table: - // https://en.cppreference.com/w/cpp/language/operator_precedence - DOCTEST_FORBIT_EXPRESSION(Result, &) - DOCTEST_FORBIT_EXPRESSION(Result, ^) - DOCTEST_FORBIT_EXPRESSION(Result, |) - DOCTEST_FORBIT_EXPRESSION(Result, &&) - DOCTEST_FORBIT_EXPRESSION(Result, ||) - DOCTEST_FORBIT_EXPRESSION(Result, ==) - DOCTEST_FORBIT_EXPRESSION(Result, !=) - DOCTEST_FORBIT_EXPRESSION(Result, <) - DOCTEST_FORBIT_EXPRESSION(Result, >) - DOCTEST_FORBIT_EXPRESSION(Result, <=) - DOCTEST_FORBIT_EXPRESSION(Result, >=) - DOCTEST_FORBIT_EXPRESSION(Result, =) - DOCTEST_FORBIT_EXPRESSION(Result, +=) - DOCTEST_FORBIT_EXPRESSION(Result, -=) - DOCTEST_FORBIT_EXPRESSION(Result, *=) - DOCTEST_FORBIT_EXPRESSION(Result, /=) - DOCTEST_FORBIT_EXPRESSION(Result, %=) - DOCTEST_FORBIT_EXPRESSION(Result, <<=) - DOCTEST_FORBIT_EXPRESSION(Result, >>=) - DOCTEST_FORBIT_EXPRESSION(Result, &=) - DOCTEST_FORBIT_EXPRESSION(Result, ^=) - DOCTEST_FORBIT_EXPRESSION(Result, |=) -}; - -#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - -DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-compare") -// DOCTEST_CLANG_SUPPRESS_WARNING("-Wdouble-promotion") -// DOCTEST_CLANG_SUPPRESS_WARNING("-Wconversion") -// DOCTEST_CLANG_SUPPRESS_WARNING("-Wfloat-equal") - -DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-compare") -// DOCTEST_GCC_SUPPRESS_WARNING("-Wdouble-promotion") -// DOCTEST_GCC_SUPPRESS_WARNING("-Wconversion") -// DOCTEST_GCC_SUPPRESS_WARNING("-Wfloat-equal") - -DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -// https://stackoverflow.com/questions/39479163 what's the difference between -// 4018 and 4389 -DOCTEST_MSVC_SUPPRESS_WARNING(4388) // signed/unsigned mismatch -DOCTEST_MSVC_SUPPRESS_WARNING(4389) // 'operator' : signed/unsigned mismatch -DOCTEST_MSVC_SUPPRESS_WARNING(4018) // 'expression' : signed/unsigned mismatch -// DOCTEST_MSVC_SUPPRESS_WARNING(4805) // 'operation' : unsafe mix of type -// 'type' and type 'type' in operation - -#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - -// clang-format off -#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_COMPARISON_RETURN_TYPE bool -#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_COMPARISON_RETURN_TYPE typename types::enable_if::value || can_use_op::value, bool>::type - inline bool eq(const char* lhs, const char* rhs) { return String(lhs) == String(rhs); } - inline bool ne(const char* lhs, const char* rhs) { return String(lhs) != String(rhs); } - inline bool lt(const char* lhs, const char* rhs) { return String(lhs) < String(rhs); } - inline bool gt(const char* lhs, const char* rhs) { return String(lhs) > String(rhs); } - inline bool le(const char* lhs, const char* rhs) { return String(lhs) <= String(rhs); } - inline bool ge(const char* lhs, const char* rhs) { return String(lhs) >= String(rhs); } -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -// clang-format on - -#define DOCTEST_RELATIONAL_OP(name, op) \ - template \ - DOCTEST_COMPARISON_RETURN_TYPE name(const DOCTEST_REF_WRAP(L) lhs, \ - const DOCTEST_REF_WRAP(R) rhs) \ - { \ - return lhs op rhs; \ - } - -DOCTEST_RELATIONAL_OP(eq, ==) -DOCTEST_RELATIONAL_OP(ne, !=) -DOCTEST_RELATIONAL_OP(lt, <) -DOCTEST_RELATIONAL_OP(gt, >) -DOCTEST_RELATIONAL_OP(le, <=) -DOCTEST_RELATIONAL_OP(ge, >=) - -#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_CMP_EQ(l, r) l == r -#define DOCTEST_CMP_NE(l, r) l != r -#define DOCTEST_CMP_GT(l, r) l > r -#define DOCTEST_CMP_LT(l, r) l < r -#define DOCTEST_CMP_GE(l, r) l >= r -#define DOCTEST_CMP_LE(l, r) l <= r -#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_CMP_EQ(l, r) eq(l, r) -#define DOCTEST_CMP_NE(l, r) ne(l, r) -#define DOCTEST_CMP_GT(l, r) gt(l, r) -#define DOCTEST_CMP_LT(l, r) lt(l, r) -#define DOCTEST_CMP_GE(l, r) ge(l, r) -#define DOCTEST_CMP_LE(l, r) le(l, r) -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - -template -// cppcheck-suppress copyCtorAndEqOperator -struct Expression_lhs -{ - L lhs; - assertType::Enum m_at; - - explicit Expression_lhs(L&& in, assertType::Enum at) - : lhs(static_cast(in)) - , m_at(at) - { - } - - DOCTEST_NOINLINE operator Result() - { - // this is needed only for MSVC 2015 - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH( - 4800) // 'int': forcing value to bool - bool res = static_cast(lhs); - DOCTEST_MSVC_SUPPRESS_WARNING_POP - if (m_at & assertType::is_false) { //! OCLINT bitwise operator in - //! conditional - res = !res; - } - - if (!res || getContextOptions()->success) { - return { res, (DOCTEST_STRINGIFY(lhs)) }; - } - return { res }; - } - - /* This is required for user-defined conversions from Expression_lhs to L */ - operator L() const { return lhs; } - - // clang-format off - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, " == ", DOCTEST_CMP_EQ) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(!=, " != ", DOCTEST_CMP_NE) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>, " > ", DOCTEST_CMP_GT) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<, " < ", DOCTEST_CMP_LT) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>=, " >= ", DOCTEST_CMP_GE) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<=, " <= ", DOCTEST_CMP_LE) //!OCLINT bitwise operator in conditional - // clang-format on - - // forbidding some expressions based on this table: - // https://en.cppreference.com/w/cpp/language/operator_precedence - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &&) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ||) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, =) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, +=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, -=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, *=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, /=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, %=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |=) - // these 2 are unfortunate because they should be allowed - they have higher - // precedence over the comparisons, but the ExpressionDecomposer class uses - // the left shift operator to capture the left operand of the binary - // expression... - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>) -}; - -#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - -#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0) -DOCTEST_CLANG_SUPPRESS_WARNING_POP -#endif - -struct DOCTEST_INTERFACE ExpressionDecomposer -{ - assertType::Enum m_at; - - ExpressionDecomposer(assertType::Enum at); - - // The right operator for capturing expressions is "<=" instead of "<<" (based - // on the operator precedence table) but then there will be warnings from GCC - // about "-Wparentheses" and since "_Pragma()" is problematic this will stay - // for now... https://github.com/catchorg/Catch2/issues/870 - // https://github.com/catchorg/Catch2/issues/565 - template - Expression_lhs operator<<(L&& operand) - { - return Expression_lhs(static_cast(operand), m_at); - } - - template::value, - void>::type* = nullptr> - Expression_lhs operator<<(const L& operand) - { - return Expression_lhs(operand, m_at); - } -}; - -struct DOCTEST_INTERFACE TestSuite -{ - const char* m_test_suite = nullptr; - const char* m_description = nullptr; - bool m_skip = false; - bool m_no_breaks = false; - bool m_no_output = false; - bool m_may_fail = false; - bool m_should_fail = false; - int m_expected_failures = 0; - double m_timeout = 0; - - TestSuite& operator*(const char* in); - - template - TestSuite& operator*(const T& in) - { - in.fill(*this); - return *this; - } -}; - -using funcType = void (*)(); - -struct DOCTEST_INTERFACE TestCase : public TestCaseData -{ - funcType m_test; // a function pointer to the test case - - String m_type; // for templated test cases - gets appended to the real name - int m_template_id; // an ID used to distinguish between the different versions - // of a templated test case - String m_full_name; // contains the name (only for templated test cases!) + - // the template type - - TestCase(funcType test, - const char* file, - unsigned line, - const TestSuite& test_suite, - const String& type = String(), - int template_id = -1); - - TestCase(const TestCase& other); - TestCase(TestCase&&) = delete; - - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function - TestCase& operator=(const TestCase& other); - DOCTEST_MSVC_SUPPRESS_WARNING_POP - - TestCase& operator=(TestCase&&) = delete; - - TestCase& operator*(const char* in); - - template - TestCase& operator*(const T& in) - { - in.fill(*this); - return *this; - } - - bool operator<(const TestCase& other) const; - - ~TestCase() = default; -}; - -// forward declarations of functions used by the macros -DOCTEST_INTERFACE int -regTest(const TestCase& tc); -DOCTEST_INTERFACE int -setTestSuite(const TestSuite& ts); -DOCTEST_INTERFACE bool -isDebuggerActive(); - -template -int -instantiationHelper(const T&) -{ - return 0; -} - -namespace binaryAssertComparison { -enum Enum -{ - eq = 0, - ne, - gt, - lt, - ge, - le -}; -} // namespace binaryAssertComparison - -// clang-format off - template struct RelationalComparator { bool operator()(const DOCTEST_REF_WRAP(L), const DOCTEST_REF_WRAP(R) ) const { return false; } }; - -#define DOCTEST_BINARY_RELATIONAL_OP(n, op) \ - template struct RelationalComparator { bool operator()(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) const { return op(lhs, rhs); } }; -// clang-format on - -DOCTEST_BINARY_RELATIONAL_OP(0, doctest::detail::eq) -DOCTEST_BINARY_RELATIONAL_OP(1, doctest::detail::ne) -DOCTEST_BINARY_RELATIONAL_OP(2, doctest::detail::gt) -DOCTEST_BINARY_RELATIONAL_OP(3, doctest::detail::lt) -DOCTEST_BINARY_RELATIONAL_OP(4, doctest::detail::ge) -DOCTEST_BINARY_RELATIONAL_OP(5, doctest::detail::le) - -struct DOCTEST_INTERFACE ResultBuilder : public AssertData -{ - ResultBuilder(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type = "", - const String& exception_string = ""); - - ResultBuilder(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type, - const Contains& exception_string); - - void setResult(const Result& res); - - template - DOCTEST_NOINLINE bool binary_assert(const DOCTEST_REF_WRAP(L) lhs, - const DOCTEST_REF_WRAP(R) rhs) - { - m_failed = !RelationalComparator()(lhs, rhs); - if (m_failed || getContextOptions()->success) { - m_decomp = stringifyBinaryExpr(lhs, ", ", rhs); - } - return !m_failed; - } - - template - DOCTEST_NOINLINE bool unary_assert(const DOCTEST_REF_WRAP(L) val) - { - m_failed = !val; - - if (m_at & assertType::is_false) { //! OCLINT bitwise operator in - //! conditional - m_failed = !m_failed; - } - - if (m_failed || getContextOptions()->success) { - m_decomp = (DOCTEST_STRINGIFY(val)); - } - - return !m_failed; - } - - void translateException(); - - bool log(); - void react() const; -}; - -namespace assertAction { -enum Enum -{ - nothing = 0, - dbgbreak = 1, - shouldthrow = 2 -}; -} // namespace assertAction - -DOCTEST_INTERFACE void -failed_out_of_a_testing_context(const AssertData& ad); - -DOCTEST_INTERFACE bool -decomp_assert(assertType::Enum at, - const char* file, - int line, - const char* expr, - const Result& result); - -#define DOCTEST_ASSERT_OUT_OF_TESTS(decomp) \ - do { \ - if (!is_running_in_test) { \ - if (failed) { \ - ResultBuilder rb(at, file, line, expr); \ - rb.m_failed = failed; \ - rb.m_decomp = decomp; \ - failed_out_of_a_testing_context(rb); \ - if (isDebuggerActive() && !getContextOptions()->no_breaks) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - if (checkIfShouldThrow(at)) \ - throwException(); \ - } \ - return !failed; \ - } \ - } while (false) - -#define DOCTEST_ASSERT_IN_TESTS(decomp) \ - ResultBuilder rb(at, file, line, expr); \ - rb.m_failed = failed; \ - if (rb.m_failed || getContextOptions()->success) \ - rb.m_decomp = decomp; \ - if (rb.log()) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - if (rb.m_failed && checkIfShouldThrow(at)) \ - throwException() - -template -DOCTEST_NOINLINE bool -binary_assert(assertType::Enum at, - const char* file, - int line, - const char* expr, - const DOCTEST_REF_WRAP(L) lhs, - const DOCTEST_REF_WRAP(R) rhs) -{ - bool failed = !RelationalComparator()(lhs, rhs); - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE - // FAILING ASSERT THIS IS THE EFFECT OF HAVING - // 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); - DOCTEST_ASSERT_IN_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); - return !failed; -} - -template -DOCTEST_NOINLINE bool -unary_assert(assertType::Enum at, - const char* file, - int line, - const char* expr, - const DOCTEST_REF_WRAP(L) val) -{ - bool failed = !val; - - if (at & assertType::is_false) //! OCLINT bitwise operator in conditional - failed = !failed; - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE - // FAILING ASSERT THIS IS THE EFFECT OF HAVING - // 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS((DOCTEST_STRINGIFY(val))); - DOCTEST_ASSERT_IN_TESTS((DOCTEST_STRINGIFY(val))); - return !failed; -} - -struct DOCTEST_INTERFACE IExceptionTranslator -{ - DOCTEST_DECLARE_INTERFACE(IExceptionTranslator) - virtual bool translate(String&) const = 0; -}; - -template -class ExceptionTranslator - : public IExceptionTranslator //! OCLINT destructor of virtual class -{ -public: - explicit ExceptionTranslator(String (*translateFunction)(T)) - : m_translateFunction(translateFunction) - { - } - - bool translate(String& res) const override - { -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - try { - throw; // lgtm [cpp/rethrow-no-exception] - // cppcheck-suppress catchExceptionByValue - } catch (const T& ex) { - res = m_translateFunction(ex); //! OCLINT parameter reassignment - return true; - } catch (...) { - } //! OCLINT - empty catch statement -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - static_cast(res); // to silence -Wunused-parameter - return false; - } - -private: - String (*m_translateFunction)(T); -}; - -DOCTEST_INTERFACE void -registerExceptionTranslatorImpl(const IExceptionTranslator* et); - -// ContextScope base class used to allow implementing methods of ContextScope -// that don't depend on the template parameter in doctest.cpp. -struct DOCTEST_INTERFACE ContextScopeBase : public IContextScope -{ - ContextScopeBase(const ContextScopeBase&) = delete; - - ContextScopeBase& operator=(const ContextScopeBase&) = delete; - ContextScopeBase& operator=(ContextScopeBase&&) = delete; - - ~ContextScopeBase() override = default; - -protected: - ContextScopeBase(); - ContextScopeBase(ContextScopeBase&& other) noexcept; - - void destroy(); - bool need_to_destroy{ true }; -}; - -template -class ContextScope : public ContextScopeBase -{ - L lambda_; - -public: - explicit ContextScope(const L& lambda) - : lambda_(lambda) - { - } - explicit ContextScope(L&& lambda) - : lambda_(static_cast(lambda)) - { - } - - ContextScope(const ContextScope&) = delete; - ContextScope(ContextScope&&) noexcept = default; - - ContextScope& operator=(const ContextScope&) = delete; - ContextScope& operator=(ContextScope&&) = delete; - - void stringify(std::ostream* s) const override { lambda_(s); } - - ~ContextScope() override - { - if (need_to_destroy) { - destroy(); - } - } -}; - -struct DOCTEST_INTERFACE MessageBuilder : public MessageData -{ - std::ostream* m_stream; - bool logged = false; - - MessageBuilder(const char* file, int line, assertType::Enum severity); - - MessageBuilder(const MessageBuilder&) = delete; - MessageBuilder(MessageBuilder&&) = delete; - - MessageBuilder& operator=(const MessageBuilder&) = delete; - MessageBuilder& operator=(MessageBuilder&&) = delete; - - ~MessageBuilder(); - - // the preferred way of chaining parameters for stringification - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866) - template - MessageBuilder& operator,(const T& in) - { - *m_stream << (DOCTEST_STRINGIFY(in)); - return *this; - } - DOCTEST_MSVC_SUPPRESS_WARNING_POP - - // kept here just for backwards-compatibility - the comma operator should be - // preferred now - template - MessageBuilder& operator<<(const T& in) - { - return this->operator,(in); - } - - // the `,` operator has the lowest operator precedence - if `<<` is used by - // the user then the `,` operator will be called last which is not what we - // want and thus the `*` operator is used first (has higher operator - // precedence compared to `<<`) so that we guarantee that an operator of the - // MessageBuilder class is called first before the rest of the parameters - template - MessageBuilder& operator*(const T& in) - { - return this->operator,(in); - } - - bool log(); - void react(); -}; - -template -ContextScope -MakeContextScope(const L& lambda) -{ - return ContextScope(lambda); -} -} // namespace detail - -#define DOCTEST_DEFINE_DECORATOR(name, type, def) \ - struct name \ - { \ - type data; \ - name(type in = def) \ - : data(in) \ - { \ - } \ - void fill(detail::TestCase& state) const \ - { \ - state.DOCTEST_CAT(m_, name) = data; \ - } \ - void fill(detail::TestSuite& state) const \ - { \ - state.DOCTEST_CAT(m_, name) = data; \ - } \ - } - -DOCTEST_DEFINE_DECORATOR(test_suite, const char*, ""); -DOCTEST_DEFINE_DECORATOR(description, const char*, ""); -DOCTEST_DEFINE_DECORATOR(skip, bool, true); -DOCTEST_DEFINE_DECORATOR(no_breaks, bool, true); -DOCTEST_DEFINE_DECORATOR(no_output, bool, true); -DOCTEST_DEFINE_DECORATOR(timeout, double, 0); -DOCTEST_DEFINE_DECORATOR(may_fail, bool, true); -DOCTEST_DEFINE_DECORATOR(should_fail, bool, true); -DOCTEST_DEFINE_DECORATOR(expected_failures, int, 0); - -template -int -registerExceptionTranslator(String (*translateFunction)(T)) -{ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wexit-time-destructors") - static detail::ExceptionTranslator exceptionTranslator(translateFunction); - DOCTEST_CLANG_SUPPRESS_WARNING_POP - detail::registerExceptionTranslatorImpl(&exceptionTranslator); - return 0; -} - -} // namespace doctest - -// in a separate namespace outside of doctest because the DOCTEST_TEST_SUITE -// macro introduces an anonymous namespace in which getCurrentTestSuite gets -// overridden -namespace doctest_detail_test_suite_ns { -DOCTEST_INTERFACE doctest::detail::TestSuite& -getCurrentTestSuite(); -} // namespace doctest_detail_test_suite_ns - -namespace doctest { -#else // DOCTEST_CONFIG_DISABLE -template -int -registerExceptionTranslator(String (*)(T)) -{ - return 0; -} -#endif // DOCTEST_CONFIG_DISABLE - -namespace detail { -using assert_handler = void (*)(const AssertData&); -struct ContextState; -} // namespace detail - -class DOCTEST_INTERFACE Context -{ - detail::ContextState* p; - - void parseArgs(int argc, const char* const* argv, bool withDefaults = false); - -public: - explicit Context(int argc = 0, const char* const* argv = nullptr); - - Context(const Context&) = delete; - Context(Context&&) = delete; - - Context& operator=(const Context&) = delete; - Context& operator=(Context&&) = delete; - - ~Context(); // NOLINT(performance-trivially-destructible) - - void applyCommandLine(int argc, const char* const* argv); - - void addFilter(const char* filter, const char* value); - void clearFilters(); - void setOption(const char* option, bool value); - void setOption(const char* option, int value); - void setOption(const char* option, const char* value); - - bool shouldExit(); - - void setAsDefaultForAssertsOutOfTestCases(); - - void setAssertHandler(detail::assert_handler ah); - - void setCout(std::ostream* out); - - int run(); -}; - -namespace TestCaseFailureReason { -enum Enum -{ - None = 0, - AssertFailure = 1, // an assertion has failed in the test case - Exception = 2, // test case threw an exception - Crash = 4, // a crash... - TooManyFailedAsserts = 8, // the abort-after option - Timeout = 16, // see the timeout decorator - ShouldHaveFailedButDidnt = 32, // see the should_fail decorator - ShouldHaveFailedAndDid = 64, // see the should_fail decorator - DidntFailExactlyNumTimes = 128, // see the expected_failures decorator - FailedExactlyNumTimes = 256, // see the expected_failures decorator - CouldHaveFailedAndDid = 512 // see the may_fail decorator -}; -} // namespace TestCaseFailureReason - -struct DOCTEST_INTERFACE CurrentTestCaseStats -{ - int numAssertsCurrentTest; - int numAssertsFailedCurrentTest; - double seconds; - int failure_flags; // use TestCaseFailureReason::Enum - bool testCaseSuccess; -}; - -struct DOCTEST_INTERFACE TestCaseException -{ - String error_string; - bool is_crash; -}; - -struct DOCTEST_INTERFACE TestRunStats -{ - unsigned numTestCases; - unsigned numTestCasesPassingFilters; - unsigned numTestSuitesPassingFilters; - unsigned numTestCasesFailed; - int numAsserts; - int numAssertsFailed; -}; - -struct QueryData -{ - const TestRunStats* run_stats = nullptr; - const TestCaseData** data = nullptr; - unsigned num_data = 0; -}; - -struct DOCTEST_INTERFACE IReporter -{ - // The constructor has to accept "const ContextOptions&" as a single argument - // which has most of the options for the run + a pointer to the stdout stream - // Reporter(const ContextOptions& in) - - // called when a query should be reported (listing test cases, printing the - // version, etc.) - virtual void report_query(const QueryData&) = 0; - - // called when the whole test run starts - virtual void test_run_start() = 0; - // called when the whole test run ends (caching a pointer to the input doesn't - // make sense here) - virtual void test_run_end(const TestRunStats&) = 0; - - // called when a test case is started (safe to cache a pointer to the input) - virtual void test_case_start(const TestCaseData&) = 0; - // called when a test case is reentered because of unfinished subcases (safe - // to cache a pointer to the input) - virtual void test_case_reenter(const TestCaseData&) = 0; - // called when a test case has ended - virtual void test_case_end(const CurrentTestCaseStats&) = 0; - - // called when an exception is thrown from the test case (or it crashes) - virtual void test_case_exception(const TestCaseException&) = 0; - - // called whenever a subcase is entered (don't cache pointers to the input) - virtual void subcase_start(const SubcaseSignature&) = 0; - // called whenever a subcase is exited (don't cache pointers to the input) - virtual void subcase_end() = 0; - - // called for each assert (don't cache pointers to the input) - virtual void log_assert(const AssertData&) = 0; - // called for each message (don't cache pointers to the input) - virtual void log_message(const MessageData&) = 0; - - // called when a test case is skipped either because it doesn't pass the - // filters, has a skip decorator or isn't in the execution range (between - // first and last) (safe to cache a pointer to the input) - virtual void test_case_skipped(const TestCaseData&) = 0; - - DOCTEST_DECLARE_INTERFACE(IReporter) - - // can obtain all currently active contexts and stringify them if one wishes - // to do so - static int get_num_active_contexts(); - static const IContextScope* const* get_active_contexts(); - - // can iterate through contexts which have been stringified automatically in - // their destructors when an exception has been thrown - static int get_num_stringified_contexts(); - static const String* get_stringified_contexts(); -}; - -namespace detail { -using reporterCreatorFunc = IReporter* (*)(const ContextOptions&); - -DOCTEST_INTERFACE void -registerReporterImpl(const char* name, - int prio, - reporterCreatorFunc c, - bool isReporter); - -template -IReporter* -reporterCreator(const ContextOptions& o) -{ - return new Reporter(o); -} -} // namespace detail - -template -int -registerReporter(const char* name, int priority, bool isReporter) -{ - detail::registerReporterImpl( - name, priority, detail::reporterCreator, isReporter); - return 0; -} -} // namespace doctest - -#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES -#define DOCTEST_FUNC_EMPTY [] { return false; }() -#else -#define DOCTEST_FUNC_EMPTY (void)0 -#endif - -// if registering is not disabled -#ifndef DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES -#define DOCTEST_FUNC_SCOPE_BEGIN [&] -#define DOCTEST_FUNC_SCOPE_END () -#define DOCTEST_FUNC_SCOPE_RET(v) return v -#else -#define DOCTEST_FUNC_SCOPE_BEGIN do -#define DOCTEST_FUNC_SCOPE_END while (false) -#define DOCTEST_FUNC_SCOPE_RET(v) (void)0 -#endif - -// common code in asserts - for convenience -#define DOCTEST_ASSERT_LOG_REACT_RETURN(b) \ - if (b.log()) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - b.react(); \ - DOCTEST_FUNC_SCOPE_RET(!b.m_failed) - -#ifdef DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#define DOCTEST_WRAP_IN_TRY(x) x; -#else // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#define DOCTEST_WRAP_IN_TRY(x) \ - try { \ - x; \ - } catch (...) { \ - DOCTEST_RB.translateException(); \ - } -#endif // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS - -#ifdef DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS -#define DOCTEST_CAST_TO_VOID(...) \ - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wuseless-cast") \ - static_cast(__VA_ARGS__); \ - DOCTEST_GCC_SUPPRESS_WARNING_POP -#else // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS -#define DOCTEST_CAST_TO_VOID(...) __VA_ARGS__; -#endif // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS - -// registers the test by initializing a dummy var with a function -#define DOCTEST_REGISTER_FUNCTION(global_prefix, f, decorators) \ - global_prefix DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT */ \ - doctest::detail::regTest( \ - doctest::detail::TestCase( \ - f, \ - __FILE__, \ - __LINE__, \ - doctest_detail_test_suite_ns::getCurrentTestSuite()) * \ - decorators)) - -#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \ - namespace { /* NOLINT */ \ - struct der : public base \ - { \ - void f(); \ - }; \ - static inline DOCTEST_NOINLINE void func() \ - { \ - der v; \ - v.f(); \ - } \ - DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators) \ - } \ - inline DOCTEST_NOINLINE void der::f() // NOLINT(misc-definitions-in-headers) - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, decorators) \ - static void f(); \ - DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, f, decorators) \ - static void f() - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(f, proxy, decorators) \ - static doctest::detail::funcType proxy() \ - { \ - return f; \ - } \ - DOCTEST_REGISTER_FUNCTION(inline, proxy(), decorators) \ - static void f() - -// for registering tests -#define DOCTEST_TEST_CASE(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - decorators) - -// for registering tests in classes - requires C++17 for inline variables! -#if DOCTEST_CPLUSPLUS >= 201703L -#define DOCTEST_TEST_CASE_CLASS(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_PROXY_), \ - decorators) -#else // DOCTEST_TEST_CASE_CLASS -#define DOCTEST_TEST_CASE_CLASS(...) \ - TEST_CASES_CAN_BE_REGISTERED_IN_CLASSES_ONLY_IN_CPP17_MODE_OR_WITH_VS_2017_OR_NEWER -#endif // DOCTEST_TEST_CASE_CLASS - -// for registering tests with a fixture -#define DOCTEST_TEST_CASE_FIXTURE(c, decorators) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), \ - c, \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - decorators) - -// for converting types to strings without the header and demangling -#define DOCTEST_TYPE_TO_STRING_AS(str, ...) \ - namespace doctest { \ - template<> \ - inline String toString<__VA_ARGS__>() \ - { \ - return str; \ - } \ - } \ - static_assert(true, "") - -#define DOCTEST_TYPE_TO_STRING(...) \ - DOCTEST_TYPE_TO_STRING_AS(#__VA_ARGS__, __VA_ARGS__) - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, iter, func) \ - template \ - static void func(); \ - namespace { /* NOLINT */ \ - template \ - struct iter; \ - template \ - struct iter> \ - { \ - iter(const char* file, unsigned line, int index) \ - { \ - doctest::detail::regTest( \ - doctest::detail::TestCase( \ - func, \ - file, \ - line, \ - doctest_detail_test_suite_ns::getCurrentTestSuite(), \ - doctest::toString(), \ - int(line) * 1000 + index) * \ - dec); \ - iter>(file, line, index + 1); \ - } \ - }; \ - template<> \ - struct iter> \ - { \ - iter(const char*, unsigned, int) {} \ - }; \ - } \ - template \ - static void func() - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(dec, T, id) \ - DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL( \ - dec, T, DOCTEST_CAT(id, ITERATOR), DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)) - -#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, anon, ...) \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_CAT(anon, DUMMY), /* NOLINT(cert-err58-cpp, \ - fuchsia-statically-constructed-objects) */ \ - doctest::detail::instantiationHelper( \ - DOCTEST_CAT(id, ITERATOR) < __VA_ARGS__ > (__FILE__, __LINE__, 0))) - -#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL( \ - id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \ - static_assert(true, "") - -#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL( \ - id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) \ - static_assert(true, "") - -#define DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, anon, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL( \ - dec, T, DOCTEST_CAT(anon, ITERATOR), anon); \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL( \ - anon, anon, std::tuple<__VA_ARGS__>) \ - template \ - static void anon() - -#define DOCTEST_TEST_CASE_TEMPLATE(dec, T, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_IMPL( \ - dec, T, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) - -// for subcases -#define DOCTEST_SUBCASE(name) \ - if (const doctest::detail::Subcase& DOCTEST_ANONYMOUS(DOCTEST_ANON_SUBCASE_) \ - DOCTEST_UNUSED = doctest::detail::Subcase(name, __FILE__, __LINE__)) - -// for grouping tests in test suites by using code blocks -#define DOCTEST_TEST_SUITE_IMPL(decorators, ns_name) \ - namespace ns_name { \ - namespace doctest_detail_test_suite_ns { \ - static DOCTEST_NOINLINE doctest::detail::TestSuite& \ - getCurrentTestSuite() noexcept \ - { \ - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4640) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wexit-time-destructors") \ - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wmissing-field-initializers") \ - static doctest::detail::TestSuite data{}; \ - static bool inited = false; \ - DOCTEST_MSVC_SUPPRESS_WARNING_POP \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP \ - DOCTEST_GCC_SUPPRESS_WARNING_POP \ - if (!inited) { \ - data* decorators; \ - inited = true; \ - } \ - return data; \ - } \ - } \ - } \ - namespace ns_name - -#define DOCTEST_TEST_SUITE(decorators) \ - DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(DOCTEST_ANON_SUITE_)) - -// for starting a testsuite block -#define DOCTEST_TEST_SUITE_BEGIN(decorators) \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators)) \ - static_assert(true, "") - -// for ending a testsuite block -#define DOCTEST_TEST_SUITE_END \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * "")) \ - using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int - -// for registering exception translators -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(translatorName, signature) \ - inline doctest::String translatorName(signature); \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerExceptionTranslator(translatorName)) \ - doctest::String translatorName(signature) - -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ - DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), signature) - -// for registering reporters -#define DOCTEST_REGISTER_REPORTER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerReporter(name, priority, true)) \ - static_assert(true, "") - -// for registering listeners -#define DOCTEST_REGISTER_LISTENER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS( \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerReporter(name, priority, false)) \ - static_assert(true, "") - -// clang-format off -// for logging - disabling formatting because it's important to have these on 2 separate lines - see PR #557 -#define DOCTEST_INFO(...) \ - DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_), \ - DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_OTHER_), \ - __VA_ARGS__) -// clang-format on - -#define DOCTEST_INFO_IMPL(mb_name, s_name, ...) \ - auto DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_) = \ - doctest::detail::MakeContextScope([&](std::ostream* s_name) { \ - doctest::detail::MessageBuilder mb_name( \ - __FILE__, __LINE__, doctest::assertType::is_warn); \ - mb_name.m_stream = s_name; \ - mb_name* __VA_ARGS__; \ - }) - -#define DOCTEST_CAPTURE(x) DOCTEST_INFO(#x " := ", x) - -#define DOCTEST_ADD_AT_IMPL(type, file, line, mb, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - doctest::detail::MessageBuilder mb(file, line, doctest::assertType::type); \ - mb* __VA_ARGS__; \ - if (mb.log()) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - mb.react(); \ - } \ - DOCTEST_FUNC_SCOPE_END - -// clang-format off -#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -// clang-format on - -#define DOCTEST_MESSAGE(...) \ - DOCTEST_ADD_MESSAGE_AT(__FILE__, __LINE__, __VA_ARGS__) -#define DOCTEST_FAIL_CHECK(...) \ - DOCTEST_ADD_FAIL_CHECK_AT(__FILE__, __LINE__, __VA_ARGS__) -#define DOCTEST_FAIL(...) DOCTEST_ADD_FAIL_AT(__FILE__, __LINE__, __VA_ARGS__) - -#define DOCTEST_TO_LVALUE(...) \ - __VA_ARGS__ // Not removed to keep backwards compatibility. - -#ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -#define DOCTEST_ASSERT_IMPLEMENT_2(assert_type, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH( \ - "-Woverloaded-shift-op-parentheses") \ - /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) */ \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(DOCTEST_RB.setResult( \ - doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type) \ - << __VA_ARGS__)) /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) \ - */ \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB) \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__); \ - } \ - DOCTEST_FUNC_SCOPE_END // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) - -#define DOCTEST_BINARY_ASSERT(assert_type, comp, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY( \ - DOCTEST_RB.binary_assert( \ - __VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } \ - DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_UNARY_ASSERT(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(DOCTEST_RB.unary_assert(__VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } \ - DOCTEST_FUNC_SCOPE_END - -#else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -// necessary for _MESSAGE -#define DOCTEST_ASSERT_IMPLEMENT_2 DOCTEST_ASSERT_IMPLEMENT_1 - -#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH( \ - "-Woverloaded-shift-op-parentheses") \ - doctest::detail::decomp_assert( \ - doctest::assertType::assert_type, \ - __FILE__, \ - __LINE__, \ - #__VA_ARGS__, \ - doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type) \ - << __VA_ARGS__) DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#define DOCTEST_BINARY_ASSERT(assert_type, comparison, ...) \ - doctest::detail::binary_assert< \ - doctest::detail::binaryAssertComparison::comparison>( \ - doctest::assertType::assert_type, \ - __FILE__, \ - __LINE__, \ - #__VA_ARGS__, \ - __VA_ARGS__) - -#define DOCTEST_UNARY_ASSERT(assert_type, ...) \ - doctest::detail::unary_assert(doctest::assertType::assert_type, \ - __FILE__, \ - __LINE__, \ - #__VA_ARGS__, \ - __VA_ARGS__) - -#endif // DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -#define DOCTEST_WARN(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN, __VA_ARGS__) -#define DOCTEST_CHECK(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK, __VA_ARGS__) -#define DOCTEST_REQUIRE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE, __VA_ARGS__) -#define DOCTEST_WARN_FALSE(...) \ - DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN_FALSE, __VA_ARGS__) -#define DOCTEST_CHECK_FALSE(...) \ - DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK_FALSE, __VA_ARGS__) -#define DOCTEST_REQUIRE_FALSE(...) \ - DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE_FALSE, __VA_ARGS__) - -// clang-format off -#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -// clang-format on - -#define DOCTEST_WARN_EQ(...) DOCTEST_BINARY_ASSERT(DT_WARN_EQ, eq, __VA_ARGS__) -#define DOCTEST_CHECK_EQ(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_EQ, eq, __VA_ARGS__) -#define DOCTEST_REQUIRE_EQ(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_EQ, eq, __VA_ARGS__) -#define DOCTEST_WARN_NE(...) DOCTEST_BINARY_ASSERT(DT_WARN_NE, ne, __VA_ARGS__) -#define DOCTEST_CHECK_NE(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_NE, ne, __VA_ARGS__) -#define DOCTEST_REQUIRE_NE(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_NE, ne, __VA_ARGS__) -#define DOCTEST_WARN_GT(...) DOCTEST_BINARY_ASSERT(DT_WARN_GT, gt, __VA_ARGS__) -#define DOCTEST_CHECK_GT(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_GT, gt, __VA_ARGS__) -#define DOCTEST_REQUIRE_GT(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_GT, gt, __VA_ARGS__) -#define DOCTEST_WARN_LT(...) DOCTEST_BINARY_ASSERT(DT_WARN_LT, lt, __VA_ARGS__) -#define DOCTEST_CHECK_LT(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_LT, lt, __VA_ARGS__) -#define DOCTEST_REQUIRE_LT(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_LT, lt, __VA_ARGS__) -#define DOCTEST_WARN_GE(...) DOCTEST_BINARY_ASSERT(DT_WARN_GE, ge, __VA_ARGS__) -#define DOCTEST_CHECK_GE(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_GE, ge, __VA_ARGS__) -#define DOCTEST_REQUIRE_GE(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_GE, ge, __VA_ARGS__) -#define DOCTEST_WARN_LE(...) DOCTEST_BINARY_ASSERT(DT_WARN_LE, le, __VA_ARGS__) -#define DOCTEST_CHECK_LE(...) \ - DOCTEST_BINARY_ASSERT(DT_CHECK_LE, le, __VA_ARGS__) -#define DOCTEST_REQUIRE_LE(...) \ - DOCTEST_BINARY_ASSERT(DT_REQUIRE_LE, le, __VA_ARGS__) - -#define DOCTEST_WARN_UNARY(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY, __VA_ARGS__) -#define DOCTEST_CHECK_UNARY(...) \ - DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY, __VA_ARGS__) -#define DOCTEST_REQUIRE_UNARY(...) \ - DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY, __VA_ARGS__) -#define DOCTEST_WARN_UNARY_FALSE(...) \ - DOCTEST_UNARY_ASSERT(DT_WARN_UNARY_FALSE, __VA_ARGS__) -#define DOCTEST_CHECK_UNARY_FALSE(...) \ - DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY_FALSE, __VA_ARGS__) -#define DOCTEST_REQUIRE_UNARY_FALSE(...) \ - DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY_FALSE, __VA_ARGS__) - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_ASSERT_THROWS_AS(expr, assert_type, message, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - if (!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, \ - __FILE__, \ - __LINE__, \ - #expr, \ - #__VA_ARGS__, \ - message); \ - try { \ - DOCTEST_CAST_TO_VOID(expr) \ - } catch (const typename doctest::detail::types::remove_const< \ - typename doctest::detail::types::remove_reference< \ - __VA_ARGS__>::type>::type&) { \ - DOCTEST_RB.translateException(); \ - DOCTEST_RB.m_threw_as = true; \ - } catch (...) { \ - DOCTEST_RB.translateException(); \ - } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } else { /* NOLINT(*-else-after-return) */ \ - DOCTEST_FUNC_SCOPE_RET(false); \ - } \ - } \ - DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_ASSERT_THROWS_WITH(expr, expr_str, assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - if (!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, \ - __FILE__, \ - __LINE__, \ - expr_str, \ - "", \ - __VA_ARGS__); \ - try { \ - DOCTEST_CAST_TO_VOID(expr) \ - } catch (...) { \ - DOCTEST_RB.translateException(); \ - } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } else { /* NOLINT(*-else-after-return) */ \ - DOCTEST_FUNC_SCOPE_RET(false); \ - } \ - } \ - DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_ASSERT_NOTHROW(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN \ - { \ - doctest::detail::ResultBuilder DOCTEST_RB( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__); \ - try { \ - DOCTEST_CAST_TO_VOID(__VA_ARGS__) \ - } catch (...) { \ - DOCTEST_RB.translateException(); \ - } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } \ - DOCTEST_FUNC_SCOPE_END - -// clang-format off -#define DOCTEST_WARN_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_WARN_THROWS, "") -#define DOCTEST_CHECK_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_CHECK_THROWS, "") -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_REQUIRE_THROWS, "") - -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_AS, "", __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_AS, "", __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_AS, "", __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_WARN_THROWS_WITH, __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_CHECK_THROWS_WITH, __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_REQUIRE_THROWS_WITH, __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_WITH_AS, message, __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_WITH_AS, message, __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_WITH_AS, message, __VA_ARGS__) - -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_WARN_NOTHROW, __VA_ARGS__) -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_CHECK_NOTHROW, __VA_ARGS__) -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_REQUIRE_NOTHROW, __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -// clang-format on - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -// ================================================================================================= -// == WHAT FOLLOWS IS VERSIONS OF THE MACROS THAT DO NOT DO ANY REGISTERING! == -// == THIS CAN BE ENABLED BY DEFINING DOCTEST_CONFIG_DISABLE GLOBALLY! == -// ================================================================================================= -#else // DOCTEST_CONFIG_DISABLE - -#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, name) \ - namespace /* NOLINT */ { \ - template \ - struct der : public base \ - { \ - void f(); \ - }; \ - } \ - template \ - inline void der::f() - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, name) \ - template \ - static inline void f() - -// for registering tests -#define DOCTEST_TEST_CASE(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - name) - -// for registering tests in classes -#define DOCTEST_TEST_CASE_CLASS(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - name) - -// for registering tests with a fixture -#define DOCTEST_TEST_CASE_FIXTURE(x, name) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), \ - x, \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - name) - -// for converting types to strings without the header and demangling -#define DOCTEST_TYPE_TO_STRING_AS(str, ...) static_assert(true, "") -#define DOCTEST_TYPE_TO_STRING(...) static_assert(true, "") - -// for typed tests -#define DOCTEST_TEST_CASE_TEMPLATE(name, type, ...) \ - template \ - inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, type, id) \ - template \ - inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() - -#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) static_assert(true, "") -#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) static_assert(true, "") - -// for subcases -#define DOCTEST_SUBCASE(name) - -// for a testsuite block -#define DOCTEST_TEST_SUITE(name) namespace // NOLINT - -// for starting a testsuite block -#define DOCTEST_TEST_SUITE_BEGIN(name) static_assert(true, "") - -// for ending a testsuite block -#define DOCTEST_TEST_SUITE_END \ - using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int - -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ - template \ - static inline doctest::String DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_)( \ - signature) - -#define DOCTEST_REGISTER_REPORTER(name, priority, reporter) -#define DOCTEST_REGISTER_LISTENER(name, priority, reporter) - -#define DOCTEST_INFO(...) (static_cast(0)) -#define DOCTEST_CAPTURE(x) (static_cast(0)) -#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_ADD_FAIL_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_MESSAGE(...) (static_cast(0)) -#define DOCTEST_FAIL_CHECK(...) (static_cast(0)) -#define DOCTEST_FAIL(...) (static_cast(0)) - -#if defined(DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED) && \ - defined(DOCTEST_CONFIG_ASSERTS_RETURN_VALUES) - -#define DOCTEST_WARN(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_CHECK(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_REQUIRE(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_WARN_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_CHECK_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_FALSE(...) [&] { return !(__VA_ARGS__); }() - -#define DOCTEST_WARN_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_CHECK_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() - -namespace doctest { -namespace detail { -#define DOCTEST_RELATIONAL_OP(name, op) \ - template \ - bool name(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) \ - { \ - return lhs op rhs; \ - } - -DOCTEST_RELATIONAL_OP(eq, ==) -DOCTEST_RELATIONAL_OP(ne, !=) -DOCTEST_RELATIONAL_OP(lt, <) -DOCTEST_RELATIONAL_OP(gt, >) -DOCTEST_RELATIONAL_OP(le, <=) -DOCTEST_RELATIONAL_OP(ge, >=) -} // namespace detail -} // namespace doctest - -#define DOCTEST_WARN_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_CHECK_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_EQ(...) \ - [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_WARN_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_CHECK_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_NE(...) \ - [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_WARN_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_CHECK_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_LT(...) \ - [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_WARN_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_CHECK_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_GT(...) \ - [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_WARN_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_CHECK_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_LE(...) \ - [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_WARN_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_CHECK_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_GE(...) \ - [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_WARN_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_CHECK_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_REQUIRE_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_WARN_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_CHECK_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_WARN_THROWS_WITH(expr, with, ...) \ - [] { \ - static_assert( \ - false, \ - "Exception translation is not available when doctest is disabled."); \ - return false; \ - }() -#define DOCTEST_CHECK_THROWS_WITH(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) - -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH(, , ) - -#define DOCTEST_WARN_THROWS(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_CHECK_THROWS(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_REQUIRE_THROWS(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_WARN_THROWS_AS(expr, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_CHECK_THROWS_AS(expr, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_WARN_NOTHROW(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() -#define DOCTEST_CHECK_NOTHROW(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() -#define DOCTEST_REQUIRE_NOTHROW(...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return false; \ - } catch (...) { \ - return true; \ - } \ - }() -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) \ - [&] { \ - try { \ - expr; \ - } catch (__VA_ARGS__) { \ - return true; \ - } catch (...) { \ - } \ - return false; \ - }() -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) \ - [&] { \ - try { \ - __VA_ARGS__; \ - return true; \ - } catch (...) { \ - return false; \ - } \ - }() - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#else // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED - -#define DOCTEST_WARN(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_LE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_LE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_LE(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_WARN_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#endif // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED - -#endif // DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#define DOCTEST_EXCEPTION_EMPTY_FUNC DOCTEST_FUNC_EMPTY -#else // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#define DOCTEST_EXCEPTION_EMPTY_FUNC \ - [] { \ - static_assert(false, \ - "Exceptions are disabled! " \ - "Use DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS if " \ - "you want to compile with exceptions disabled."); \ - return false; \ - }() - -#undef DOCTEST_REQUIRE -#undef DOCTEST_REQUIRE_FALSE -#undef DOCTEST_REQUIRE_MESSAGE -#undef DOCTEST_REQUIRE_FALSE_MESSAGE -#undef DOCTEST_REQUIRE_EQ -#undef DOCTEST_REQUIRE_NE -#undef DOCTEST_REQUIRE_GT -#undef DOCTEST_REQUIRE_LT -#undef DOCTEST_REQUIRE_GE -#undef DOCTEST_REQUIRE_LE -#undef DOCTEST_REQUIRE_UNARY -#undef DOCTEST_REQUIRE_UNARY_FALSE - -#define DOCTEST_REQUIRE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_FALSE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_EQ DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_GT DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_LT DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_GE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_LE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_UNARY DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_UNARY_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS - -#define DOCTEST_WARN_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -// clang-format off -// KEPT FOR BACKWARDS COMPATIBILITY - FORWARDING TO THE RIGHT MACROS -#define DOCTEST_FAST_WARN_EQ DOCTEST_WARN_EQ -#define DOCTEST_FAST_CHECK_EQ DOCTEST_CHECK_EQ -#define DOCTEST_FAST_REQUIRE_EQ DOCTEST_REQUIRE_EQ -#define DOCTEST_FAST_WARN_NE DOCTEST_WARN_NE -#define DOCTEST_FAST_CHECK_NE DOCTEST_CHECK_NE -#define DOCTEST_FAST_REQUIRE_NE DOCTEST_REQUIRE_NE -#define DOCTEST_FAST_WARN_GT DOCTEST_WARN_GT -#define DOCTEST_FAST_CHECK_GT DOCTEST_CHECK_GT -#define DOCTEST_FAST_REQUIRE_GT DOCTEST_REQUIRE_GT -#define DOCTEST_FAST_WARN_LT DOCTEST_WARN_LT -#define DOCTEST_FAST_CHECK_LT DOCTEST_CHECK_LT -#define DOCTEST_FAST_REQUIRE_LT DOCTEST_REQUIRE_LT -#define DOCTEST_FAST_WARN_GE DOCTEST_WARN_GE -#define DOCTEST_FAST_CHECK_GE DOCTEST_CHECK_GE -#define DOCTEST_FAST_REQUIRE_GE DOCTEST_REQUIRE_GE -#define DOCTEST_FAST_WARN_LE DOCTEST_WARN_LE -#define DOCTEST_FAST_CHECK_LE DOCTEST_CHECK_LE -#define DOCTEST_FAST_REQUIRE_LE DOCTEST_REQUIRE_LE - -#define DOCTEST_FAST_WARN_UNARY DOCTEST_WARN_UNARY -#define DOCTEST_FAST_CHECK_UNARY DOCTEST_CHECK_UNARY -#define DOCTEST_FAST_REQUIRE_UNARY DOCTEST_REQUIRE_UNARY -#define DOCTEST_FAST_WARN_UNARY_FALSE DOCTEST_WARN_UNARY_FALSE -#define DOCTEST_FAST_CHECK_UNARY_FALSE DOCTEST_CHECK_UNARY_FALSE -#define DOCTEST_FAST_REQUIRE_UNARY_FALSE DOCTEST_REQUIRE_UNARY_FALSE - -#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id,__VA_ARGS__) -// clang-format on - -// BDD style macros -// clang-format off -#define DOCTEST_SCENARIO(name) DOCTEST_TEST_CASE(" Scenario: " name) -#define DOCTEST_SCENARIO_CLASS(name) DOCTEST_TEST_CASE_CLASS(" Scenario: " name) -#define DOCTEST_SCENARIO_TEMPLATE(name, T, ...) DOCTEST_TEST_CASE_TEMPLATE(" Scenario: " name, T, __VA_ARGS__) -#define DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(" Scenario: " name, T, id) - -#define DOCTEST_GIVEN(name) DOCTEST_SUBCASE(" Given: " name) -#define DOCTEST_WHEN(name) DOCTEST_SUBCASE(" When: " name) -#define DOCTEST_AND_WHEN(name) DOCTEST_SUBCASE("And when: " name) -#define DOCTEST_THEN(name) DOCTEST_SUBCASE(" Then: " name) -#define DOCTEST_AND_THEN(name) DOCTEST_SUBCASE(" And: " name) -// clang-format on - -// == SHORT VERSIONS OF THE MACROS -#ifndef DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES - -#define TEST_CASE(name) DOCTEST_TEST_CASE(name) -#define TEST_CASE_CLASS(name) DOCTEST_TEST_CASE_CLASS(name) -#define TEST_CASE_FIXTURE(x, name) DOCTEST_TEST_CASE_FIXTURE(x, name) -#define TYPE_TO_STRING_AS(str, ...) DOCTEST_TYPE_TO_STRING_AS(str, __VA_ARGS__) -#define TYPE_TO_STRING(...) DOCTEST_TYPE_TO_STRING(__VA_ARGS__) -#define TEST_CASE_TEMPLATE(name, T, ...) \ - DOCTEST_TEST_CASE_TEMPLATE(name, T, __VA_ARGS__) -#define TEST_CASE_TEMPLATE_DEFINE(name, T, id) \ - DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, T, id) -#define TEST_CASE_TEMPLATE_INVOKE(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, __VA_ARGS__) -#define TEST_CASE_TEMPLATE_APPLY(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, __VA_ARGS__) -#define SUBCASE(name) DOCTEST_SUBCASE(name) -#define TEST_SUITE(decorators) DOCTEST_TEST_SUITE(decorators) -#define TEST_SUITE_BEGIN(name) DOCTEST_TEST_SUITE_BEGIN(name) -#define TEST_SUITE_END DOCTEST_TEST_SUITE_END -#define REGISTER_EXCEPTION_TRANSLATOR(signature) \ - DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) -#define REGISTER_REPORTER(name, priority, reporter) \ - DOCTEST_REGISTER_REPORTER(name, priority, reporter) -#define REGISTER_LISTENER(name, priority, reporter) \ - DOCTEST_REGISTER_LISTENER(name, priority, reporter) -#define INFO(...) DOCTEST_INFO(__VA_ARGS__) -#define CAPTURE(x) DOCTEST_CAPTURE(x) -#define ADD_MESSAGE_AT(file, line, ...) \ - DOCTEST_ADD_MESSAGE_AT(file, line, __VA_ARGS__) -#define ADD_FAIL_CHECK_AT(file, line, ...) \ - DOCTEST_ADD_FAIL_CHECK_AT(file, line, __VA_ARGS__) -#define ADD_FAIL_AT(file, line, ...) \ - DOCTEST_ADD_FAIL_AT(file, line, __VA_ARGS__) -#define MESSAGE(...) DOCTEST_MESSAGE(__VA_ARGS__) -#define FAIL_CHECK(...) DOCTEST_FAIL_CHECK(__VA_ARGS__) -#define FAIL(...) DOCTEST_FAIL(__VA_ARGS__) -#define TO_LVALUE(...) DOCTEST_TO_LVALUE(__VA_ARGS__) - -#define WARN(...) DOCTEST_WARN(__VA_ARGS__) -#define WARN_FALSE(...) DOCTEST_WARN_FALSE(__VA_ARGS__) -#define WARN_THROWS(...) DOCTEST_WARN_THROWS(__VA_ARGS__) -#define WARN_THROWS_AS(expr, ...) DOCTEST_WARN_THROWS_AS(expr, __VA_ARGS__) -#define WARN_THROWS_WITH(expr, ...) DOCTEST_WARN_THROWS_WITH(expr, __VA_ARGS__) -#define WARN_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define WARN_NOTHROW(...) DOCTEST_WARN_NOTHROW(__VA_ARGS__) -#define CHECK(...) DOCTEST_CHECK(__VA_ARGS__) -#define CHECK_FALSE(...) DOCTEST_CHECK_FALSE(__VA_ARGS__) -#define CHECK_THROWS(...) DOCTEST_CHECK_THROWS(__VA_ARGS__) -#define CHECK_THROWS_AS(expr, ...) DOCTEST_CHECK_THROWS_AS(expr, __VA_ARGS__) -#define CHECK_THROWS_WITH(expr, ...) \ - DOCTEST_CHECK_THROWS_WITH(expr, __VA_ARGS__) -#define CHECK_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_CHECK_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define CHECK_NOTHROW(...) DOCTEST_CHECK_NOTHROW(__VA_ARGS__) -#define REQUIRE(...) DOCTEST_REQUIRE(__VA_ARGS__) -#define REQUIRE_FALSE(...) DOCTEST_REQUIRE_FALSE(__VA_ARGS__) -#define REQUIRE_THROWS(...) DOCTEST_REQUIRE_THROWS(__VA_ARGS__) -#define REQUIRE_THROWS_AS(expr, ...) \ - DOCTEST_REQUIRE_THROWS_AS(expr, __VA_ARGS__) -#define REQUIRE_THROWS_WITH(expr, ...) \ - DOCTEST_REQUIRE_THROWS_WITH(expr, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_AS(expr, with, ...) \ - DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define REQUIRE_NOTHROW(...) DOCTEST_REQUIRE_NOTHROW(__VA_ARGS__) - -#define WARN_MESSAGE(cond, ...) DOCTEST_WARN_MESSAGE(cond, __VA_ARGS__) -#define WARN_FALSE_MESSAGE(cond, ...) \ - DOCTEST_WARN_FALSE_MESSAGE(cond, __VA_ARGS__) -#define WARN_THROWS_MESSAGE(expr, ...) \ - DOCTEST_WARN_THROWS_MESSAGE(expr, __VA_ARGS__) -#define WARN_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define WARN_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define WARN_NOTHROW_MESSAGE(expr, ...) \ - DOCTEST_WARN_NOTHROW_MESSAGE(expr, __VA_ARGS__) -#define CHECK_MESSAGE(cond, ...) DOCTEST_CHECK_MESSAGE(cond, __VA_ARGS__) -#define CHECK_FALSE_MESSAGE(cond, ...) \ - DOCTEST_CHECK_FALSE_MESSAGE(cond, __VA_ARGS__) -#define CHECK_THROWS_MESSAGE(expr, ...) \ - DOCTEST_CHECK_THROWS_MESSAGE(expr, __VA_ARGS__) -#define CHECK_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define CHECK_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define CHECK_NOTHROW_MESSAGE(expr, ...) \ - DOCTEST_CHECK_NOTHROW_MESSAGE(expr, __VA_ARGS__) -#define REQUIRE_MESSAGE(cond, ...) DOCTEST_REQUIRE_MESSAGE(cond, __VA_ARGS__) -#define REQUIRE_FALSE_MESSAGE(cond, ...) \ - DOCTEST_REQUIRE_FALSE_MESSAGE(cond, __VA_ARGS__) -#define REQUIRE_THROWS_MESSAGE(expr, ...) \ - DOCTEST_REQUIRE_THROWS_MESSAGE(expr, __VA_ARGS__) -#define REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) \ - DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) \ - DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) \ - DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define REQUIRE_NOTHROW_MESSAGE(expr, ...) \ - DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, __VA_ARGS__) - -#define SCENARIO(name) DOCTEST_SCENARIO(name) -#define SCENARIO_CLASS(name) DOCTEST_SCENARIO_CLASS(name) -#define SCENARIO_TEMPLATE(name, T, ...) \ - DOCTEST_SCENARIO_TEMPLATE(name, T, __VA_ARGS__) -#define SCENARIO_TEMPLATE_DEFINE(name, T, id) \ - DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) -#define GIVEN(name) DOCTEST_GIVEN(name) -#define WHEN(name) DOCTEST_WHEN(name) -#define AND_WHEN(name) DOCTEST_AND_WHEN(name) -#define THEN(name) DOCTEST_THEN(name) -#define AND_THEN(name) DOCTEST_AND_THEN(name) - -#define WARN_EQ(...) DOCTEST_WARN_EQ(__VA_ARGS__) -#define CHECK_EQ(...) DOCTEST_CHECK_EQ(__VA_ARGS__) -#define REQUIRE_EQ(...) DOCTEST_REQUIRE_EQ(__VA_ARGS__) -#define WARN_NE(...) DOCTEST_WARN_NE(__VA_ARGS__) -#define CHECK_NE(...) DOCTEST_CHECK_NE(__VA_ARGS__) -#define REQUIRE_NE(...) DOCTEST_REQUIRE_NE(__VA_ARGS__) -#define WARN_GT(...) DOCTEST_WARN_GT(__VA_ARGS__) -#define CHECK_GT(...) DOCTEST_CHECK_GT(__VA_ARGS__) -#define REQUIRE_GT(...) DOCTEST_REQUIRE_GT(__VA_ARGS__) -#define WARN_LT(...) DOCTEST_WARN_LT(__VA_ARGS__) -#define CHECK_LT(...) DOCTEST_CHECK_LT(__VA_ARGS__) -#define REQUIRE_LT(...) DOCTEST_REQUIRE_LT(__VA_ARGS__) -#define WARN_GE(...) DOCTEST_WARN_GE(__VA_ARGS__) -#define CHECK_GE(...) DOCTEST_CHECK_GE(__VA_ARGS__) -#define REQUIRE_GE(...) DOCTEST_REQUIRE_GE(__VA_ARGS__) -#define WARN_LE(...) DOCTEST_WARN_LE(__VA_ARGS__) -#define CHECK_LE(...) DOCTEST_CHECK_LE(__VA_ARGS__) -#define REQUIRE_LE(...) DOCTEST_REQUIRE_LE(__VA_ARGS__) -#define WARN_UNARY(...) DOCTEST_WARN_UNARY(__VA_ARGS__) -#define CHECK_UNARY(...) DOCTEST_CHECK_UNARY(__VA_ARGS__) -#define REQUIRE_UNARY(...) DOCTEST_REQUIRE_UNARY(__VA_ARGS__) -#define WARN_UNARY_FALSE(...) DOCTEST_WARN_UNARY_FALSE(__VA_ARGS__) -#define CHECK_UNARY_FALSE(...) DOCTEST_CHECK_UNARY_FALSE(__VA_ARGS__) -#define REQUIRE_UNARY_FALSE(...) DOCTEST_REQUIRE_UNARY_FALSE(__VA_ARGS__) - -// KEPT FOR BACKWARDS COMPATIBILITY -#define FAST_WARN_EQ(...) DOCTEST_FAST_WARN_EQ(__VA_ARGS__) -#define FAST_CHECK_EQ(...) DOCTEST_FAST_CHECK_EQ(__VA_ARGS__) -#define FAST_REQUIRE_EQ(...) DOCTEST_FAST_REQUIRE_EQ(__VA_ARGS__) -#define FAST_WARN_NE(...) DOCTEST_FAST_WARN_NE(__VA_ARGS__) -#define FAST_CHECK_NE(...) DOCTEST_FAST_CHECK_NE(__VA_ARGS__) -#define FAST_REQUIRE_NE(...) DOCTEST_FAST_REQUIRE_NE(__VA_ARGS__) -#define FAST_WARN_GT(...) DOCTEST_FAST_WARN_GT(__VA_ARGS__) -#define FAST_CHECK_GT(...) DOCTEST_FAST_CHECK_GT(__VA_ARGS__) -#define FAST_REQUIRE_GT(...) DOCTEST_FAST_REQUIRE_GT(__VA_ARGS__) -#define FAST_WARN_LT(...) DOCTEST_FAST_WARN_LT(__VA_ARGS__) -#define FAST_CHECK_LT(...) DOCTEST_FAST_CHECK_LT(__VA_ARGS__) -#define FAST_REQUIRE_LT(...) DOCTEST_FAST_REQUIRE_LT(__VA_ARGS__) -#define FAST_WARN_GE(...) DOCTEST_FAST_WARN_GE(__VA_ARGS__) -#define FAST_CHECK_GE(...) DOCTEST_FAST_CHECK_GE(__VA_ARGS__) -#define FAST_REQUIRE_GE(...) DOCTEST_FAST_REQUIRE_GE(__VA_ARGS__) -#define FAST_WARN_LE(...) DOCTEST_FAST_WARN_LE(__VA_ARGS__) -#define FAST_CHECK_LE(...) DOCTEST_FAST_CHECK_LE(__VA_ARGS__) -#define FAST_REQUIRE_LE(...) DOCTEST_FAST_REQUIRE_LE(__VA_ARGS__) - -#define FAST_WARN_UNARY(...) DOCTEST_FAST_WARN_UNARY(__VA_ARGS__) -#define FAST_CHECK_UNARY(...) DOCTEST_FAST_CHECK_UNARY(__VA_ARGS__) -#define FAST_REQUIRE_UNARY(...) DOCTEST_FAST_REQUIRE_UNARY(__VA_ARGS__) -#define FAST_WARN_UNARY_FALSE(...) DOCTEST_FAST_WARN_UNARY_FALSE(__VA_ARGS__) -#define FAST_CHECK_UNARY_FALSE(...) DOCTEST_FAST_CHECK_UNARY_FALSE(__VA_ARGS__) -#define FAST_REQUIRE_UNARY_FALSE(...) \ - DOCTEST_FAST_REQUIRE_UNARY_FALSE(__VA_ARGS__) - -#define TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, __VA_ARGS__) - -#endif // DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES - -#ifndef DOCTEST_CONFIG_DISABLE - -// this is here to clear the 'current test suite' for the current translation -// unit - at the top -DOCTEST_TEST_SUITE_END(); - -#endif // DOCTEST_CONFIG_DISABLE - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_POP - -#endif // DOCTEST_LIBRARY_INCLUDED - -#ifndef DOCTEST_SINGLE_HEADER -#define DOCTEST_SINGLE_HEADER -#endif // DOCTEST_SINGLE_HEADER - -#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER) - -#ifndef DOCTEST_SINGLE_HEADER -#include "doctest_fwd.h" -#endif // DOCTEST_SINGLE_HEADER - -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-macros") - -#ifndef DOCTEST_LIBRARY_IMPLEMENTATION -#define DOCTEST_LIBRARY_IMPLEMENTATION - -DOCTEST_CLANG_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH - -DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wglobal-constructors") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wexit-time-destructors") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wshorten-64-to-32") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-variable-declarations") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch-enum") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wcovered-switch-default") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-noreturn") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wdisabled-macro-expansion") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-braces") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-field-initializers") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-member-function") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wnonportable-system-include-path") - -DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wconversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-field-initializers") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-braces") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-enum") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-default") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunsafe-loop-optimizations") -DOCTEST_GCC_SUPPRESS_WARNING("-Wold-style-cast") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-function") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmultiple-inheritance") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsuggest-attribute") - -DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING( - 4267) // 'var' : conversion from 'x' to 'y', possible loss of data -DOCTEST_MSVC_SUPPRESS_WARNING( - 4530) // C++ exception handler used, but unwind semantics not enabled -DOCTEST_MSVC_SUPPRESS_WARNING( - 4577) // 'noexcept' used with no exception handling mode specified -DOCTEST_MSVC_SUPPRESS_WARNING( - 4774) // format string expected in argument is not a string literal -DOCTEST_MSVC_SUPPRESS_WARNING( - 4365) // conversion from 'int' to 'unsigned', signed/unsigned mismatch -DOCTEST_MSVC_SUPPRESS_WARNING( - 5039) // pointer to potentially throwing function passed to extern C -DOCTEST_MSVC_SUPPRESS_WARNING( - 4800) // forcing value to bool 'true' or 'false' (performance warning) -DOCTEST_MSVC_SUPPRESS_WARNING( - 5245) // unreferenced function with internal linkage has been removed - -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN - -// required includes - will go only in one translation unit! -#include -#include -#include -// borland (Embarcadero) compiler requires math.h and not cmath - -// https://github.com/doctest/doctest/pull/37 -#ifdef __BORLANDC__ -#include -#endif // __BORLANDC__ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef DOCTEST_CONFIG_NO_MULTITHREADING -#include -#include -#define DOCTEST_DECLARE_MUTEX(name) std::mutex name; -#define DOCTEST_DECLARE_STATIC_MUTEX(name) static DOCTEST_DECLARE_MUTEX(name) -#define DOCTEST_LOCK_MUTEX(name) \ - std::lock_guard DOCTEST_ANONYMOUS(DOCTEST_ANON_LOCK_)(name); -#else // DOCTEST_CONFIG_NO_MULTITHREADING -#define DOCTEST_DECLARE_MUTEX(name) -#define DOCTEST_DECLARE_STATIC_MUTEX(name) -#define DOCTEST_LOCK_MUTEX(name) -#endif // DOCTEST_CONFIG_NO_MULTITHREADING -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DOCTEST_PLATFORM_MAC -#include -#include -#include -#endif // DOCTEST_PLATFORM_MAC - -#ifdef DOCTEST_PLATFORM_WINDOWS - -// defines for a leaner windows.h -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif // WIN32_LEAN_AND_MEAN -#ifndef NOMINMAX -#define NOMINMAX -#endif // NOMINMAX - -// not sure what AfxWin.h is for - here I do what Catch does -#ifdef __AFXDLL -#include -#else -#include -#endif -#include - -#else // DOCTEST_PLATFORM_WINDOWS - -#include -#include - -#endif // DOCTEST_PLATFORM_WINDOWS - -// this is a fix for https://github.com/doctest/doctest/issues/348 -// https://mail.gnome.org/archives/xml/2012-January/msg00000.html -#if !defined(HAVE_UNISTD_H) && !defined(STDOUT_FILENO) -#define STDOUT_FILENO fileno(stdout) -#endif // HAVE_UNISTD_H - -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END - -// counts the number of elements in a C array -#define DOCTEST_COUNTOF(x) (sizeof(x) / sizeof(x[0])) - -#ifdef DOCTEST_CONFIG_DISABLE -#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_disabled -#else // DOCTEST_CONFIG_DISABLE -#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_not_disabled -#endif // DOCTEST_CONFIG_DISABLE - -#ifndef DOCTEST_CONFIG_OPTIONS_PREFIX -#define DOCTEST_CONFIG_OPTIONS_PREFIX "dt-" -#endif - -#ifndef DOCTEST_THREAD_LOCAL -#if defined(DOCTEST_CONFIG_NO_MULTITHREADING) || \ - DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_THREAD_LOCAL -#else // DOCTEST_MSVC -#define DOCTEST_THREAD_LOCAL thread_local -#endif // DOCTEST_MSVC -#endif // DOCTEST_THREAD_LOCAL - -#ifndef DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES -#define DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES 32 -#endif - -#ifndef DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE -#define DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE 64 -#endif - -#ifdef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS -#define DOCTEST_OPTIONS_PREFIX_DISPLAY DOCTEST_CONFIG_OPTIONS_PREFIX -#else -#define DOCTEST_OPTIONS_PREFIX_DISPLAY "" -#endif - -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -#define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS -#endif - -#ifndef DOCTEST_CDECL -#define DOCTEST_CDECL __cdecl -#endif - -namespace doctest { - -bool is_running_in_test = false; - -namespace { -using namespace detail; - -template -DOCTEST_NORETURN void -throw_exception(Ex const& e) -{ -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - throw e; -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - std::cerr - << "doctest will terminate because it needed to throw an exception.\n" - << "The message was: " << e.what() << '\n'; - std::terminate(); -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -} - -#ifndef DOCTEST_INTERNAL_ERROR -#define DOCTEST_INTERNAL_ERROR(msg) \ - throw_exception(std::logic_error( \ - __FILE__ ":" DOCTEST_TOSTR(__LINE__) ": Internal doctest error: " msg)) -#endif // DOCTEST_INTERNAL_ERROR - -// case insensitive strcmp -int -stricmp(const char* a, const char* b) -{ - for (;; a++, b++) { - const int d = tolower(*a) - tolower(*b); - if (d != 0 || !*a) - return d; - } -} - -struct Endianness -{ - enum Arch - { - Big, - Little - }; - - static Arch which() - { - int x = 1; - // casting any data pointer to char* is allowed - auto ptr = reinterpret_cast(&x); - if (*ptr) - return Little; - return Big; - } -}; -} // namespace - -namespace detail { -DOCTEST_THREAD_LOCAL class -{ - std::vector stack; - std::stringstream ss; - -public: - std::ostream* push() - { - stack.push_back(ss.tellp()); - return &ss; - } - - String pop() - { - if (stack.empty()) - DOCTEST_INTERNAL_ERROR("TLSS was empty when trying to pop!"); - - std::streampos pos = stack.back(); - stack.pop_back(); - unsigned sz = static_cast(ss.tellp() - pos); - ss.rdbuf()->pubseekpos(pos, std::ios::in | std::ios::out); - return String(ss, sz); - } -} g_oss; - -std::ostream* -tlssPush() -{ - return g_oss.push(); -} - -String -tlssPop() -{ - return g_oss.pop(); -} - -#ifndef DOCTEST_CONFIG_DISABLE - -namespace timer_large_integer { - -#if defined(DOCTEST_PLATFORM_WINDOWS) -using type = ULONGLONG; -#else // DOCTEST_PLATFORM_WINDOWS -using type = std::uint64_t; -#endif // DOCTEST_PLATFORM_WINDOWS -} - -using ticks_t = timer_large_integer::type; - -#ifdef DOCTEST_CONFIG_GETCURRENTTICKS -ticks_t -getCurrentTicks() -{ - return DOCTEST_CONFIG_GETCURRENTTICKS(); -} -#elif defined(DOCTEST_PLATFORM_WINDOWS) -ticks_t -getCurrentTicks() -{ - static LARGE_INTEGER hz = { { 0 } }, hzo = { { 0 } }; - if (!hz.QuadPart) { - QueryPerformanceFrequency(&hz); - QueryPerformanceCounter(&hzo); - } - LARGE_INTEGER t; - QueryPerformanceCounter(&t); - return ((t.QuadPart - hzo.QuadPart) * LONGLONG(1000000)) / hz.QuadPart; -} -#else // DOCTEST_PLATFORM_WINDOWS -ticks_t -getCurrentTicks() -{ - timeval t; - gettimeofday(&t, nullptr); - return static_cast(t.tv_sec) * 1000000 + - static_cast(t.tv_usec); -} -#endif // DOCTEST_PLATFORM_WINDOWS - -struct Timer -{ - void start() { m_ticks = getCurrentTicks(); } - unsigned int getElapsedMicroseconds() const - { - return static_cast(getCurrentTicks() - m_ticks); - } - // unsigned int getElapsedMilliseconds() const { - // return static_cast(getElapsedMicroseconds() / 1000); - // } - double getElapsedSeconds() const - { - return static_cast(getCurrentTicks() - m_ticks) / 1000000.0; - } - -private: - ticks_t m_ticks = 0; -}; - -#ifdef DOCTEST_CONFIG_NO_MULTITHREADING -template -using Atomic = T; -#else // DOCTEST_CONFIG_NO_MULTITHREADING -template -using Atomic = std::atomic; -#endif // DOCTEST_CONFIG_NO_MULTITHREADING - -#if defined(DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS) || \ - defined(DOCTEST_CONFIG_NO_MULTITHREADING) -template -using MultiLaneAtomic = Atomic; -#else // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS -// Provides a multilane implementation of an atomic variable that supports add, -// sub, load, store. Instead of using a single atomic variable, this splits up -// into multiple ones, each sitting on a separate cache line. The goal is to -// provide a speedup when most operations are modifying. It achieves this with -// two properties: -// -// * Multiple atomics are used, so chance of congestion from the same atomic is -// reduced. -// * Each atomic sits on a separate cache line, so false sharing is reduced. -// -// The disadvantage is that there is a small overhead due to the use of TLS, and -// load/store is slower because all atomics have to be accessed. -template -class MultiLaneAtomic -{ - struct CacheLineAlignedAtomic - { - Atomic atomic{}; - char - padding[DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE - sizeof(Atomic)]; - }; - CacheLineAlignedAtomic m_atomics[DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES]; - - static_assert(sizeof(CacheLineAlignedAtomic) == - DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE, - "guarantee one atomic takes exactly one cache line"); - -public: - T operator++() DOCTEST_NOEXCEPT { return fetch_add(1) + 1; } - - T operator++(int) DOCTEST_NOEXCEPT { return fetch_add(1); } - - T fetch_add(T arg, std::memory_order order = std::memory_order_seq_cst) - DOCTEST_NOEXCEPT - { - return myAtomic().fetch_add(arg, order); - } - - T fetch_sub(T arg, std::memory_order order = std::memory_order_seq_cst) - DOCTEST_NOEXCEPT - { - return myAtomic().fetch_sub(arg, order); - } - - operator T() const DOCTEST_NOEXCEPT { return load(); } - - T load(std::memory_order order = std::memory_order_seq_cst) const - DOCTEST_NOEXCEPT - { - auto result = T(); - for (auto const& c : m_atomics) { - result += c.atomic.load(order); - } - return result; - } - - T operator=(T desired) DOCTEST_NOEXCEPT - { // lgtm [cpp/assignment-does-not-return-this] - store(desired); - return desired; - } - - void store(T desired, std::memory_order order = std::memory_order_seq_cst) - DOCTEST_NOEXCEPT - { - // first value becomes desired", all others become 0. - for (auto& c : m_atomics) { - c.atomic.store(desired, order); - desired = {}; - } - } - -private: - // Each thread has a different atomic that it operates on. If more than - // NumLanes threads use this, some will use the same atomic. So performance - // will degrade a bit, but still everything will work. - // - // The logic here is a bit tricky. The call should be as fast as possible, so - // that there is minimal to no overhead in determining the correct atomic for - // the current thread. - // - // 1. A global static counter laneCounter counts continuously up. - // 2. Each successive thread will use modulo operation of that counter so it - // gets an atomic - // assigned in a round-robin fashion. - // 3. This tlsLaneIdx is stored in the thread local data, so it is directly - // available with - // little overhead. - Atomic& myAtomic() DOCTEST_NOEXCEPT - { - static Atomic laneCounter; - DOCTEST_THREAD_LOCAL size_t tlsLaneIdx = - laneCounter++ % DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES; - - return m_atomics[tlsLaneIdx].atomic; - } -}; -#endif // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS - -// this holds both parameters from the command line and runtime data for tests -struct ContextState - : ContextOptions - , TestRunStats - , CurrentTestCaseStats -{ - MultiLaneAtomic numAssertsCurrentTest_atomic; - MultiLaneAtomic numAssertsFailedCurrentTest_atomic; - - std::vector> filters = - decltype(filters)(9); // 9 different filters - - std::vector reporters_currently_used; - - assert_handler ah = nullptr; - - Timer timer; - - std::vector - stringifiedContexts; // logging from INFO() due to an exception - - // stuff for subcases - bool reachedLeaf; - std::vector subcaseStack; - std::vector nextSubcaseStack; - std::unordered_set fullyTraversedSubcases; - size_t currentSubcaseDepth; - Atomic shouldLogCurrentException; - - void resetRunData() - { - numTestCases = 0; - numTestCasesPassingFilters = 0; - numTestSuitesPassingFilters = 0; - numTestCasesFailed = 0; - numAsserts = 0; - numAssertsFailed = 0; - numAssertsCurrentTest = 0; - numAssertsFailedCurrentTest = 0; - } - - void finalizeTestCaseData() - { - seconds = timer.getElapsedSeconds(); - - // update the non-atomic counters - numAsserts += numAssertsCurrentTest_atomic; - numAssertsFailed += numAssertsFailedCurrentTest_atomic; - numAssertsCurrentTest = numAssertsCurrentTest_atomic; - numAssertsFailedCurrentTest = numAssertsFailedCurrentTest_atomic; - - if (numAssertsFailedCurrentTest) - failure_flags |= TestCaseFailureReason::AssertFailure; - - if (Approx(currentTest->m_timeout).epsilon(DBL_EPSILON) != 0 && - Approx(seconds).epsilon(DBL_EPSILON) > currentTest->m_timeout) - failure_flags |= TestCaseFailureReason::Timeout; - - if (currentTest->m_should_fail) { - if (failure_flags) { - failure_flags |= TestCaseFailureReason::ShouldHaveFailedAndDid; - } else { - failure_flags |= TestCaseFailureReason::ShouldHaveFailedButDidnt; - } - } else if (failure_flags && currentTest->m_may_fail) { - failure_flags |= TestCaseFailureReason::CouldHaveFailedAndDid; - } else if (currentTest->m_expected_failures > 0) { - if (numAssertsFailedCurrentTest == currentTest->m_expected_failures) { - failure_flags |= TestCaseFailureReason::FailedExactlyNumTimes; - } else { - failure_flags |= TestCaseFailureReason::DidntFailExactlyNumTimes; - } - } - - bool ok_to_fail = - (TestCaseFailureReason::ShouldHaveFailedAndDid & failure_flags) || - (TestCaseFailureReason::CouldHaveFailedAndDid & failure_flags) || - (TestCaseFailureReason::FailedExactlyNumTimes & failure_flags); - - // if any subcase has failed - the whole test case has failed - testCaseSuccess = !(failure_flags && !ok_to_fail); - if (!testCaseSuccess) - numTestCasesFailed++; - } -}; - -ContextState* g_cs = nullptr; - -// used to avoid locks for the debug output -// TODO: figure out if this is indeed necessary/correct - seems like either -// there still could be a race or that there wouldn't be a race even if using -// the context directly -DOCTEST_THREAD_LOCAL bool g_no_colors; - -#endif // DOCTEST_CONFIG_DISABLE -} // namespace detail - -char* -String::allocate(size_type sz) -{ - if (sz <= last) { - buf[sz] = '\0'; - setLast(last - sz); - return buf; - } else { - setOnHeap(); - data.size = sz; - data.capacity = data.size + 1; - data.ptr = new char[data.capacity]; - data.ptr[sz] = '\0'; - return data.ptr; - } -} - -void -String::setOnHeap() noexcept -{ - *reinterpret_cast(&buf[last]) = 128; -} -void -String::setLast(size_type in) noexcept -{ - buf[last] = char(in); -} -void -String::setSize(size_type sz) noexcept -{ - if (isOnStack()) { - buf[sz] = '\0'; - setLast(last - sz); - } else { - data.ptr[sz] = '\0'; - data.size = sz; - } -} - -void -String::copy(const String& other) -{ - if (other.isOnStack()) { - memcpy(buf, other.buf, len); - } else { - memcpy(allocate(other.data.size), other.data.ptr, other.data.size); - } -} - -String::String() noexcept -{ - buf[0] = '\0'; - setLast(); -} - -String::~String() -{ - if (!isOnStack()) - delete[] data.ptr; -} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) - -String::String(const char* in) - : String(in, strlen(in)) -{ -} - -String::String(const char* in, size_type in_size) -{ - memcpy(allocate(in_size), in, in_size); -} - -String::String(std::istream& in, size_type in_size) -{ - in.read(allocate(in_size), in_size); -} - -String::String(const String& other) -{ - copy(other); -} - -String& -String::operator=(const String& other) -{ - if (this != &other) { - if (!isOnStack()) - delete[] data.ptr; - - copy(other); - } - - return *this; -} - -String& -String::operator+=(const String& other) -{ - const size_type my_old_size = size(); - const size_type other_size = other.size(); - const size_type total_size = my_old_size + other_size; - if (isOnStack()) { - if (total_size < len) { - // append to the current stack space - memcpy(buf + my_old_size, other.c_str(), other_size + 1); - // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) - setLast(last - total_size); - } else { - // alloc new chunk - char* temp = new char[total_size + 1]; - // copy current data to new location before writing in the union - memcpy(temp, buf, my_old_size); // skip the +1 ('\0') for speed - // update data in union - setOnHeap(); - data.size = total_size; - data.capacity = data.size + 1; - data.ptr = temp; - // transfer the rest of the data - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } - } else { - if (data.capacity > total_size) { - // append to the current heap block - data.size = total_size; - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } else { - // resize - data.capacity *= 2; - if (data.capacity <= total_size) - data.capacity = total_size + 1; - // alloc new chunk - char* temp = new char[data.capacity]; - // copy current data to new location before releasing it - memcpy(temp, data.ptr, my_old_size); // skip the +1 ('\0') for speed - // release old chunk - delete[] data.ptr; - // update the rest of the union members - data.size = total_size; - data.ptr = temp; - // transfer the rest of the data - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } - } - - return *this; -} - -String::String(String&& other) noexcept -{ - memcpy(buf, other.buf, len); - other.buf[0] = '\0'; - other.setLast(); -} - -String& -String::operator=(String&& other) noexcept -{ - if (this != &other) { - if (!isOnStack()) - delete[] data.ptr; - memcpy(buf, other.buf, len); - other.buf[0] = '\0'; - other.setLast(); - } - return *this; -} - -char -String::operator[](size_type i) const -{ - return const_cast(this)->operator[](i); -} - -char& -String::operator[](size_type i) -{ - if (isOnStack()) - return reinterpret_cast(buf)[i]; - return data.ptr[i]; -} - -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wmaybe-uninitialized") -String::size_type -String::size() const -{ - if (isOnStack()) - return last - (size_type(buf[last]) & - 31); // using "last" would work only if "len" is 32 - return data.size; -} -DOCTEST_GCC_SUPPRESS_WARNING_POP - -String::size_type -String::capacity() const -{ - if (isOnStack()) - return len; - return data.capacity; -} - -String -String::substr(size_type pos, size_type cnt) && -{ - cnt = std::min(cnt, size() - 1 - pos); - char* cptr = c_str(); - memmove(cptr, cptr + pos, cnt); - setSize(cnt); - return std::move(*this); -} - -String -String::substr(size_type pos, size_type cnt) const& -{ - cnt = std::min(cnt, size() - 1 - pos); - return String{ c_str() + pos, cnt }; -} - -String::size_type -String::find(char ch, size_type pos) const -{ - const char* begin = c_str(); - const char* end = begin + size(); - const char* it = begin + pos; - for (; it < end && *it != ch; it++) - ; - if (it < end) { - return static_cast(it - begin); - } else { - return npos; - } -} - -String::size_type -String::rfind(char ch, size_type pos) const -{ - const char* begin = c_str(); - const char* it = begin + std::min(pos, size() - 1); - for (; it >= begin && *it != ch; it--) - ; - if (it >= begin) { - return static_cast(it - begin); - } else { - return npos; - } -} - -int -String::compare(const char* other, bool no_case) const -{ - if (no_case) - return doctest::stricmp(c_str(), other); - return std::strcmp(c_str(), other); -} - -int -String::compare(const String& other, bool no_case) const -{ - return compare(other.c_str(), no_case); -} - -String -operator+(const String& lhs, const String& rhs) -{ - return String(lhs) += rhs; -} - -bool -operator==(const String& lhs, const String& rhs) -{ - return lhs.compare(rhs) == 0; -} -bool -operator!=(const String& lhs, const String& rhs) -{ - return lhs.compare(rhs) != 0; -} -bool -operator<(const String& lhs, const String& rhs) -{ - return lhs.compare(rhs) < 0; -} -bool -operator>(const String& lhs, const String& rhs) -{ - return lhs.compare(rhs) > 0; -} -bool -operator<=(const String& lhs, const String& rhs) -{ - return (lhs != rhs) ? lhs.compare(rhs) < 0 : true; -} -bool -operator>=(const String& lhs, const String& rhs) -{ - return (lhs != rhs) ? lhs.compare(rhs) > 0 : true; -} - -std::ostream& -operator<<(std::ostream& s, const String& in) -{ - return s << in.c_str(); -} - -Contains::Contains(const String& str) - : string(str) -{ -} - -bool -Contains::checkWith(const String& other) const -{ - return strstr(other.c_str(), string.c_str()) != nullptr; -} - -String -toString(const Contains& in) -{ - return "Contains( " + in.string + " )"; -} - -bool -operator==(const String& lhs, const Contains& rhs) -{ - return rhs.checkWith(lhs); -} -bool -operator==(const Contains& lhs, const String& rhs) -{ - return lhs.checkWith(rhs); -} -bool -operator!=(const String& lhs, const Contains& rhs) -{ - return !rhs.checkWith(lhs); -} -bool -operator!=(const Contains& lhs, const String& rhs) -{ - return !lhs.checkWith(rhs); -} - -namespace { -void -color_to_stream(std::ostream&, Color::Enum) DOCTEST_BRANCH_ON_DISABLED({}, ;) -} // namespace - -namespace Color { -std::ostream& -operator<<(std::ostream& s, Color::Enum code) -{ - color_to_stream(s, code); - return s; -} -} // namespace Color - -// clang-format off -const char* assertString(assertType::Enum at) { - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4061) // enum 'x' in switch of enum 'y' is not explicitely handled - #define DOCTEST_GENERATE_ASSERT_TYPE_CASE(assert_type) case assertType::DT_ ## assert_type: return #assert_type - #define DOCTEST_GENERATE_ASSERT_TYPE_CASES(assert_type) \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN_ ## assert_type); \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK_ ## assert_type); \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE_ ## assert_type) - switch(at) { - DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN); - DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK); - DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(FALSE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_AS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH_AS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(NOTHROW); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(EQ); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(NE); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(GT); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(LT); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(GE); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(LE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY_FALSE); - - default: DOCTEST_INTERNAL_ERROR("Tried stringifying invalid assert type!"); - } - DOCTEST_MSVC_SUPPRESS_WARNING_POP -} -// clang-format on - -const char* -failureString(assertType::Enum at) -{ - if (at & assertType::is_warn) //! OCLINT bitwise operator in conditional - return "WARNING"; - if (at & assertType::is_check) //! OCLINT bitwise operator in conditional - return "ERROR"; - if (at & assertType::is_require) //! OCLINT bitwise operator in conditional - return "FATAL ERROR"; - return ""; -} - -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference") -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference") -// depending on the current options this will remove the path of filenames -const char* -skipPathFromFilename(const char* file) -{ -#ifndef DOCTEST_CONFIG_DISABLE - if (getContextOptions()->no_path_in_filenames) { - auto back = std::strrchr(file, '\\'); - auto forward = std::strrchr(file, '/'); - if (back || forward) { - if (back > forward) - forward = back; - return forward + 1; - } - } -#endif // DOCTEST_CONFIG_DISABLE - return file; -} -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -bool -SubcaseSignature::operator==(const SubcaseSignature& other) const -{ - return m_line == other.m_line && std::strcmp(m_file, other.m_file) == 0 && - m_name == other.m_name; -} - -bool -SubcaseSignature::operator<(const SubcaseSignature& other) const -{ - if (m_line != other.m_line) - return m_line < other.m_line; - if (std::strcmp(m_file, other.m_file) != 0) - return std::strcmp(m_file, other.m_file) < 0; - return m_name.compare(other.m_name) < 0; -} - -DOCTEST_DEFINE_INTERFACE(IContextScope) - -namespace detail { -void -filldata::fill(std::ostream* stream, const void* in) -{ - if (in) { - *stream << in; - } else { - *stream << "nullptr"; - } -} - -template -String -toStreamLit(T t) -{ - std::ostream* os = tlssPush(); - os->operator<<(t); - return tlssPop(); -} -} - -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -String -toString(const char* in) -{ - return String("\"") + (in ? in : "{null string}") + "\""; -} -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: -// https://github.com/doctest/doctest/issues/183 -String -toString(const std::string& in) -{ - return in.c_str(); -} -#endif // VS 2019 - -String -toString(String in) -{ - return in; -} - -String -toString(std::nullptr_t) -{ - return "nullptr"; -} - -String -toString(bool in) -{ - return in ? "true" : "false"; -} - -String -toString(float in) -{ - return toStreamLit(in); -} -String -toString(double in) -{ - return toStreamLit(in); -} -String -toString(double long in) -{ - return toStreamLit(in); -} - -String -toString(char in) -{ - return toStreamLit(static_cast(in)); -} -String -toString(char signed in) -{ - return toStreamLit(static_cast(in)); -} -String -toString(char unsigned in) -{ - return toStreamLit(static_cast(in)); -} -String -toString(short in) -{ - return toStreamLit(in); -} -String -toString(short unsigned in) -{ - return toStreamLit(in); -} -String -toString(signed in) -{ - return toStreamLit(in); -} -String -toString(unsigned in) -{ - return toStreamLit(in); -} -String -toString(long in) -{ - return toStreamLit(in); -} -String -toString(long unsigned in) -{ - return toStreamLit(in); -} -String -toString(long long in) -{ - return toStreamLit(in); -} -String -toString(long long unsigned in) -{ - return toStreamLit(in); -} - -Approx::Approx(double value) - : m_epsilon(static_cast(std::numeric_limits::epsilon()) * 100) - , m_scale(1.0) - , m_value(value) -{ -} - -Approx -Approx::operator()(double value) const -{ - Approx approx(value); - approx.epsilon(m_epsilon); - approx.scale(m_scale); - return approx; -} - -Approx& -Approx::epsilon(double newEpsilon) -{ - m_epsilon = newEpsilon; - return *this; -} -Approx& -Approx::scale(double newScale) -{ - m_scale = newScale; - return *this; -} - -bool -operator==(double lhs, const Approx& rhs) -{ - // Thanks to Richard Harris for his help refining this formula - return std::fabs(lhs - rhs.m_value) < - rhs.m_epsilon * - (rhs.m_scale + - std::max(std::fabs(lhs), std::fabs(rhs.m_value))); -} -bool -operator==(const Approx& lhs, double rhs) -{ - return operator==(rhs, lhs); -} -bool -operator!=(double lhs, const Approx& rhs) -{ - return !operator==(lhs, rhs); -} -bool -operator!=(const Approx& lhs, double rhs) -{ - return !operator==(rhs, lhs); -} -bool -operator<=(double lhs, const Approx& rhs) -{ - return lhs < rhs.m_value || lhs == rhs; -} -bool -operator<=(const Approx& lhs, double rhs) -{ - return lhs.m_value < rhs || lhs == rhs; -} -bool -operator>=(double lhs, const Approx& rhs) -{ - return lhs > rhs.m_value || lhs == rhs; -} -bool -operator>=(const Approx& lhs, double rhs) -{ - return lhs.m_value > rhs || lhs == rhs; -} -bool -operator<(double lhs, const Approx& rhs) -{ - return lhs < rhs.m_value && lhs != rhs; -} -bool -operator<(const Approx& lhs, double rhs) -{ - return lhs.m_value < rhs && lhs != rhs; -} -bool -operator>(double lhs, const Approx& rhs) -{ - return lhs > rhs.m_value && lhs != rhs; -} -bool -operator>(const Approx& lhs, double rhs) -{ - return lhs.m_value > rhs && lhs != rhs; -} - -String -toString(const Approx& in) -{ - return "Approx( " + doctest::toString(in.m_value) + " )"; -} -const ContextOptions* -getContextOptions() -{ - return DOCTEST_BRANCH_ON_DISABLED(nullptr, g_cs); -} - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4738) -template -IsNaN:: -operator bool() const -{ - return std::isnan(value) ^ flipped; -} -DOCTEST_MSVC_SUPPRESS_WARNING_POP -template struct DOCTEST_INTERFACE_DEF IsNaN; -template struct DOCTEST_INTERFACE_DEF IsNaN; -template struct DOCTEST_INTERFACE_DEF IsNaN; -template -String -toString(IsNaN in) -{ - return String(in.flipped ? "! " : "") + "IsNaN( " + - doctest::toString(in.value) + " )"; -} -String -toString(IsNaN in) -{ - return toString(in); -} -String -toString(IsNaN in) -{ - return toString(in); -} -String -toString(IsNaN in) -{ - return toString(in); -} - -} // namespace doctest - -#ifdef DOCTEST_CONFIG_DISABLE -namespace doctest { -Context::Context(int, const char* const*) {} -Context::~Context() = default; -void -Context::applyCommandLine(int, const char* const*) -{ -} -void -Context::addFilter(const char*, const char*) -{ -} -void -Context::clearFilters() -{ -} -void -Context::setOption(const char*, bool) -{ -} -void -Context::setOption(const char*, int) -{ -} -void -Context::setOption(const char*, const char*) -{ -} -bool -Context::shouldExit() -{ - return false; -} -void -Context::setAsDefaultForAssertsOutOfTestCases() -{ -} -void -Context::setAssertHandler(detail::assert_handler) -{ -} -void -Context::setCout(std::ostream*) -{ -} -int -Context::run() -{ - return 0; -} - -int -IReporter::get_num_active_contexts() -{ - return 0; -} -const IContextScope* const* -IReporter::get_active_contexts() -{ - return nullptr; -} -int -IReporter::get_num_stringified_contexts() -{ - return 0; -} -const String* -IReporter::get_stringified_contexts() -{ - return nullptr; -} - -int -registerReporter(const char*, int, IReporter*) -{ - return 0; -} - -} // namespace doctest -#else // DOCTEST_CONFIG_DISABLE - -#if !defined(DOCTEST_CONFIG_COLORS_NONE) -#if !defined(DOCTEST_CONFIG_COLORS_WINDOWS) && \ - !defined(DOCTEST_CONFIG_COLORS_ANSI) -#ifdef DOCTEST_PLATFORM_WINDOWS -#define DOCTEST_CONFIG_COLORS_WINDOWS -#else // linux -#define DOCTEST_CONFIG_COLORS_ANSI -#endif // platform -#endif // DOCTEST_CONFIG_COLORS_WINDOWS && DOCTEST_CONFIG_COLORS_ANSI -#endif // DOCTEST_CONFIG_COLORS_NONE - -namespace doctest_detail_test_suite_ns { -// holds the current test suite -doctest::detail::TestSuite& -getCurrentTestSuite() -{ - static doctest::detail::TestSuite data{}; - return data; -} -} // namespace doctest_detail_test_suite_ns - -namespace doctest { -namespace { -// the int (priority) is part of the key for automatic sorting - sadly one can -// register a reporter with a duplicate name and a different priority but -// hopefully that won't happen often :| -using reporterMap = std::map, reporterCreatorFunc>; - -reporterMap& -getReporters() -{ - static reporterMap data; - return data; -} -reporterMap& -getListeners() -{ - static reporterMap data; - return data; -} -} // namespace -namespace detail { -#define DOCTEST_ITERATE_THROUGH_REPORTERS(function, ...) \ - for (auto& curr_rep : g_cs->reporters_currently_used) \ - curr_rep->function(__VA_ARGS__) - -bool -checkIfShouldThrow(assertType::Enum at) -{ - if (at & assertType::is_require) //! OCLINT bitwise operator in conditional - return true; - - if ((at & assertType::is_check) //! OCLINT bitwise operator in conditional - && getContextOptions()->abort_after > 0 && - (g_cs->numAssertsFailed + g_cs->numAssertsFailedCurrentTest_atomic) >= - getContextOptions()->abort_after) - return true; - - return false; -} - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -DOCTEST_NORETURN void -throwException() -{ - g_cs->shouldLogCurrentException = false; - throw TestFailureException(); // NOLINT(hicpp-exception-baseclass) -} -#else // DOCTEST_CONFIG_NO_EXCEPTIONS -void -throwException() -{ -} -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -} // namespace detail - -namespace { -using namespace detail; -// matching of a string against a wildcard mask (case sensitivity configurable) -// taken from -// https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing -int -wildcmp(const char* str, const char* wild, bool caseSensitive) -{ - const char* cp = str; - const char* mp = wild; - - while ((*str) && (*wild != '*')) { - if ((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) && - (*wild != '?')) { - return 0; - } - wild++; - str++; - } - - while (*str) { - if (*wild == '*') { - if (!*++wild) { - return 1; - } - mp = wild; - cp = str + 1; - } else if ((caseSensitive ? (*wild == *str) - : (tolower(*wild) == tolower(*str))) || - (*wild == '?')) { - wild++; - str++; - } else { - wild = mp; //! OCLINT parameter reassignment - str = cp++; //! OCLINT parameter reassignment - } - } - - while (*wild == '*') { - wild++; - } - return !*wild; -} - -// checks if the name matches any of the filters (and can be configured what to -// do when empty) -bool -matchesAny(const char* name, - const std::vector& filters, - bool matchEmpty, - bool caseSensitive) -{ - if (filters.empty() && matchEmpty) - return true; - for (auto& curr : filters) - if (wildcmp(name, curr.c_str(), caseSensitive)) - return true; - return false; -} - -unsigned long long -hash(unsigned long long a, unsigned long long b) -{ - return (a << 5) + b; -} - -// C string hash function (djb2) - taken from -// http://www.cse.yorku.ca/~oz/hash.html -unsigned long long -hash(const char* str) -{ - unsigned long long hash = 5381; - char c; - while ((c = *str++)) - hash = ((hash << 5) + hash) + c; // hash * 33 + c - return hash; -} - -unsigned long long -hash(const SubcaseSignature& sig) -{ - return hash(hash(hash(sig.m_file), hash(sig.m_name.c_str())), sig.m_line); -} - -unsigned long long -hash(const std::vector& sigs, size_t count) -{ - unsigned long long running = 0; - auto end = sigs.begin() + count; - for (auto it = sigs.begin(); it != end; it++) { - running = hash(running, hash(*it)); - } - return running; -} - -unsigned long long -hash(const std::vector& sigs) -{ - unsigned long long running = 0; - for (const SubcaseSignature& sig : sigs) { - running = hash(running, hash(sig)); - } - return running; -} -} // namespace -namespace detail { -bool -Subcase::checkFilters() -{ - if (g_cs->subcaseStack.size() < size_t(g_cs->subcase_filter_levels)) { - if (!matchesAny(m_signature.m_name.c_str(), - g_cs->filters[6], - true, - g_cs->case_sensitive)) - return true; - if (matchesAny(m_signature.m_name.c_str(), - g_cs->filters[7], - false, - g_cs->case_sensitive)) - return true; - } - return false; -} - -Subcase::Subcase(const String& name, const char* file, int line) - : m_signature({ name, file, line }) -{ - if (!g_cs->reachedLeaf) { - if (g_cs->nextSubcaseStack.size() <= g_cs->subcaseStack.size() || - g_cs->nextSubcaseStack[g_cs->subcaseStack.size()] == m_signature) { - // Going down. - if (checkFilters()) { - return; - } - - g_cs->subcaseStack.push_back(m_signature); - g_cs->currentSubcaseDepth++; - m_entered = true; - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); - } - } else { - if (g_cs->subcaseStack[g_cs->currentSubcaseDepth] == m_signature) { - // This subcase is reentered via control flow. - g_cs->currentSubcaseDepth++; - m_entered = true; - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); - } else if (g_cs->nextSubcaseStack.size() <= g_cs->currentSubcaseDepth && - g_cs->fullyTraversedSubcases.find(hash( - hash(g_cs->subcaseStack, g_cs->currentSubcaseDepth), - hash(m_signature))) == g_cs->fullyTraversedSubcases.end()) { - if (checkFilters()) { - return; - } - // This subcase is part of the one to be executed next. - g_cs->nextSubcaseStack.clear(); - g_cs->nextSubcaseStack.insert(g_cs->nextSubcaseStack.end(), - g_cs->subcaseStack.begin(), - g_cs->subcaseStack.begin() + - g_cs->currentSubcaseDepth); - g_cs->nextSubcaseStack.push_back(m_signature); - } - } -} - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH( - 4996) // std::uncaught_exception is deprecated in C++17 -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - -Subcase::~Subcase() -{ - if (m_entered) { - g_cs->currentSubcaseDepth--; - - if (!g_cs->reachedLeaf) { - // Leaf. - g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack)); - g_cs->nextSubcaseStack.clear(); - g_cs->reachedLeaf = true; - } else if (g_cs->nextSubcaseStack.empty()) { - // All children are finished. - g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack)); - } - -#if defined(__cpp_lib_uncaught_exceptions) && \ - __cpp_lib_uncaught_exceptions >= 201411L && \ - (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || \ - __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) - if (std::uncaught_exceptions() > 0 -#else - if (std::uncaught_exception() -#endif - && g_cs->shouldLogCurrentException) { - DOCTEST_ITERATE_THROUGH_REPORTERS( - test_case_exception, - { "exception thrown in subcase - will translate later " - "when the whole test case has been exited (cannot " - "translate while there is an active exception)", - false }); - g_cs->shouldLogCurrentException = false; - } - - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY); - } -} - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP - -Subcase:: -operator bool() const -{ - return m_entered; -} - -Result::Result(bool passed, const String& decomposition) - : m_passed(passed) - , m_decomp(decomposition) -{ -} - -ExpressionDecomposer::ExpressionDecomposer(assertType::Enum at) - : m_at(at) -{ -} - -TestSuite& -TestSuite::operator*(const char* in) -{ - m_test_suite = in; - return *this; -} - -TestCase::TestCase(funcType test, - const char* file, - unsigned line, - const TestSuite& test_suite, - const String& type, - int template_id) -{ - m_file = file; - m_line = line; - m_name = nullptr; // will be later overridden in operator* - m_test_suite = test_suite.m_test_suite; - m_description = test_suite.m_description; - m_skip = test_suite.m_skip; - m_no_breaks = test_suite.m_no_breaks; - m_no_output = test_suite.m_no_output; - m_may_fail = test_suite.m_may_fail; - m_should_fail = test_suite.m_should_fail; - m_expected_failures = test_suite.m_expected_failures; - m_timeout = test_suite.m_timeout; - - m_test = test; - m_type = type; - m_template_id = template_id; -} - -TestCase::TestCase(const TestCase& other) - : TestCaseData() -{ - *this = other; -} - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function -TestCase& -TestCase::operator=(const TestCase& other) -{ - TestCaseData::operator=(other); - m_test = other.m_test; - m_type = other.m_type; - m_template_id = other.m_template_id; - m_full_name = other.m_full_name; - - if (m_template_id != -1) - m_name = m_full_name.c_str(); - return *this; -} -DOCTEST_MSVC_SUPPRESS_WARNING_POP - -TestCase& -TestCase::operator*(const char* in) -{ - m_name = in; - // make a new name with an appended type for templated test case - if (m_template_id != -1) { - m_full_name = String(m_name) + "<" + m_type + ">"; - // redirect the name to point to the newly constructed full name - m_name = m_full_name.c_str(); - } - return *this; -} - -bool -TestCase::operator<(const TestCase& other) const -{ - // this will be used only to differentiate between test cases - not relevant - // for sorting - if (m_line != other.m_line) - return m_line < other.m_line; - const int name_cmp = strcmp(m_name, other.m_name); - if (name_cmp != 0) - return name_cmp < 0; - const int file_cmp = m_file.compare(other.m_file); - if (file_cmp != 0) - return file_cmp < 0; - return m_template_id < other.m_template_id; -} - -// all the registered tests -std::set& -getRegisteredTests() -{ - static std::set data; - return data; -} -} // namespace detail -namespace { -using namespace detail; -// for sorting tests by file/line -bool -fileOrderComparator(const TestCase* lhs, const TestCase* rhs) -{ - // this is needed because MSVC gives different case for drive letters - // for __FILE__ when evaluated in a header and a source file - const int res = lhs->m_file.compare(rhs->m_file, bool(DOCTEST_MSVC)); - if (res != 0) - return res < 0; - if (lhs->m_line != rhs->m_line) - return lhs->m_line < rhs->m_line; - return lhs->m_template_id < rhs->m_template_id; -} - -// for sorting tests by suite/file/line -bool -suiteOrderComparator(const TestCase* lhs, const TestCase* rhs) -{ - const int res = std::strcmp(lhs->m_test_suite, rhs->m_test_suite); - if (res != 0) - return res < 0; - return fileOrderComparator(lhs, rhs); -} - -// for sorting tests by name/suite/file/line -bool -nameOrderComparator(const TestCase* lhs, const TestCase* rhs) -{ - const int res = std::strcmp(lhs->m_name, rhs->m_name); - if (res != 0) - return res < 0; - return suiteOrderComparator(lhs, rhs); -} - -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") -void -color_to_stream(std::ostream& s, Color::Enum code) -{ - static_cast( - s); // for DOCTEST_CONFIG_COLORS_NONE or DOCTEST_CONFIG_COLORS_WINDOWS - static_cast(code); // for DOCTEST_CONFIG_COLORS_NONE -#ifdef DOCTEST_CONFIG_COLORS_ANSI - if (g_no_colors || (isatty(STDOUT_FILENO) == false && - getContextOptions()->force_colors == false)) - return; - - auto col = ""; - // clang-format off - switch(code) { //!OCLINT missing break in switch statement / unnecessary default statement in covered switch statement - case Color::Red: col = "[0;31m"; break; - case Color::Green: col = "[0;32m"; break; - case Color::Blue: col = "[0;34m"; break; - case Color::Cyan: col = "[0;36m"; break; - case Color::Yellow: col = "[0;33m"; break; - case Color::Grey: col = "[1;30m"; break; - case Color::LightGrey: col = "[0;37m"; break; - case Color::BrightRed: col = "[1;31m"; break; - case Color::BrightGreen: col = "[1;32m"; break; - case Color::BrightWhite: col = "[1;37m"; break; - case Color::Bright: // invalid - case Color::None: - case Color::White: - default: col = "[0m"; - } - // clang-format on - s << "\033" << col; -#endif // DOCTEST_CONFIG_COLORS_ANSI - -#ifdef DOCTEST_CONFIG_COLORS_WINDOWS - if (g_no_colors || (_isatty(_fileno(stdout)) == false && - getContextOptions()->force_colors == false)) - return; - - static struct ConsoleHelper - { - HANDLE stdoutHandle; - WORD origFgAttrs; - WORD origBgAttrs; - - ConsoleHelper() - { - stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - GetConsoleScreenBufferInfo(stdoutHandle, &csbiInfo); - origFgAttrs = - csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED | - BACKGROUND_BLUE | BACKGROUND_INTENSITY); - origBgAttrs = - csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED | - FOREGROUND_BLUE | FOREGROUND_INTENSITY); - } - } ch; - -#define DOCTEST_SET_ATTR(x) \ - SetConsoleTextAttribute(ch.stdoutHandle, x | ch.origBgAttrs) - - // clang-format off - switch (code) { - case Color::White: DOCTEST_SET_ATTR(FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break; - case Color::Red: DOCTEST_SET_ATTR(FOREGROUND_RED); break; - case Color::Green: DOCTEST_SET_ATTR(FOREGROUND_GREEN); break; - case Color::Blue: DOCTEST_SET_ATTR(FOREGROUND_BLUE); break; - case Color::Cyan: DOCTEST_SET_ATTR(FOREGROUND_BLUE | FOREGROUND_GREEN); break; - case Color::Yellow: DOCTEST_SET_ATTR(FOREGROUND_RED | FOREGROUND_GREEN); break; - case Color::Grey: DOCTEST_SET_ATTR(0); break; - case Color::LightGrey: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY); break; - case Color::BrightRed: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_RED); break; - case Color::BrightGreen: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN); break; - case Color::BrightWhite: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break; - case Color::None: - case Color::Bright: // invalid - default: DOCTEST_SET_ATTR(ch.origFgAttrs); - } - // clang-format on -#endif // DOCTEST_CONFIG_COLORS_WINDOWS -} -DOCTEST_CLANG_SUPPRESS_WARNING_POP - -std::vector& -getExceptionTranslators() -{ - static std::vector data; - return data; -} - -String -translateActiveException() -{ -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - String res; - auto& translators = getExceptionTranslators(); - for (auto& curr : translators) - if (curr->translate(res)) - return res; - // clang-format off - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wcatch-value") - try { - throw; - } catch(std::exception& ex) { - return ex.what(); - } catch(std::string& msg) { - return msg.c_str(); - } catch(const char* msg) { - return msg; - } catch(...) { - return "unknown exception"; - } - DOCTEST_GCC_SUPPRESS_WARNING_POP -// clang-format on -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - return ""; -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -} -} // namespace - -namespace detail { -// used by the macros for registering tests -int -regTest(const TestCase& tc) -{ - getRegisteredTests().insert(tc); - return 0; -} - -// sets the current test suite -int -setTestSuite(const TestSuite& ts) -{ - doctest_detail_test_suite_ns::getCurrentTestSuite() = ts; - return 0; -} - -#ifdef DOCTEST_IS_DEBUGGER_ACTIVE -bool -isDebuggerActive() -{ - return DOCTEST_IS_DEBUGGER_ACTIVE(); -} -#else // DOCTEST_IS_DEBUGGER_ACTIVE -#ifdef DOCTEST_PLATFORM_LINUX -class ErrnoGuard -{ -public: - ErrnoGuard() - : m_oldErrno(errno) - { - } - ~ErrnoGuard() { errno = m_oldErrno; } - -private: - int m_oldErrno; -}; -// See the comments in Catch2 for the reasoning behind this implementation: -// https://github.com/catchorg/Catch2/blob/v2.13.1/include/internal/catch_debugger.cpp#L79-L102 -bool -isDebuggerActive() -{ - ErrnoGuard guard; - std::ifstream in("/proc/self/status"); - for (std::string line; std::getline(in, line);) { - static const int PREFIX_LEN = 11; - if (line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0) { - return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; - } - } - return false; -} -#elif defined(DOCTEST_PLATFORM_MAC) -// The following function is taken directly from the following technical note: -// https://developer.apple.com/library/archive/qa/qa1361/_index.html -// Returns true if the current process is being debugged (either -// running under the debugger or has a debugger attached post facto). -bool -isDebuggerActive() -{ - int mib[4]; - kinfo_proc info; - size_t size; - // Initialize the flags so that, if sysctl fails for some bizarre - // reason, we get a predictable result. - info.kp_proc.p_flag = 0; - // Initialize mib, which tells sysctl the info we want, in this case - // we're looking for information about a specific process ID. - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - // Call sysctl. - size = sizeof(info); - if (sysctl(mib, DOCTEST_COUNTOF(mib), &info, &size, 0, 0) != 0) { - std::cerr << "\nCall to sysctl failed - unable to determine if debugger is " - "active **\n"; - return false; - } - // We're being debugged if the P_TRACED flag is set. - return ((info.kp_proc.p_flag & P_TRACED) != 0); -} -#elif DOCTEST_MSVC || defined(__MINGW32__) || defined(__MINGW64__) -bool -isDebuggerActive() -{ - return ::IsDebuggerPresent() != 0; -} -#else -bool -isDebuggerActive() -{ - return false; -} -#endif // Platform -#endif // DOCTEST_IS_DEBUGGER_ACTIVE - -void -registerExceptionTranslatorImpl(const IExceptionTranslator* et) -{ - if (std::find(getExceptionTranslators().begin(), - getExceptionTranslators().end(), - et) == getExceptionTranslators().end()) - getExceptionTranslators().push_back(et); -} - -DOCTEST_THREAD_LOCAL std::vector - g_infoContexts; // for logging with INFO() - -ContextScopeBase::ContextScopeBase() -{ - g_infoContexts.push_back(this); -} - -ContextScopeBase::ContextScopeBase(ContextScopeBase&& other) noexcept -{ - if (other.need_to_destroy) { - other.destroy(); - } - other.need_to_destroy = false; - g_infoContexts.push_back(this); -} - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH( - 4996) // std::uncaught_exception is deprecated in C++17 -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - -// destroy cannot be inlined into the destructor because that would mean calling -// stringify after ContextScope has been destroyed (base class destructors run -// after derived class destructors). Instead, ContextScope calls this method -// directly from its destructor. -void -ContextScopeBase::destroy() -{ -#if defined(__cpp_lib_uncaught_exceptions) && \ - __cpp_lib_uncaught_exceptions >= 201411L && \ - (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || \ - __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) - if (std::uncaught_exceptions() > 0) { -#else - if (std::uncaught_exception()) { -#endif - std::ostringstream s; - this->stringify(&s); - g_cs->stringifiedContexts.push_back(s.str().c_str()); - } - g_infoContexts.pop_back(); -} - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -} // namespace detail -namespace { -using namespace detail; - -#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && \ - !defined(DOCTEST_CONFIG_WINDOWS_SEH) -struct FatalConditionHandler -{ - static void reset() {} - static void allocateAltStackMem() {} - static void freeAltStackMem() {} -}; -#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH - -void -reportFatal(const std::string&); - -#ifdef DOCTEST_PLATFORM_WINDOWS - -struct SignalDefs -{ - DWORD id; - const char* name; -}; -// There is no 1-1 mapping between signals and windows exceptions. -// Windows can easily distinguish between SO and SigSegV, -// but SigInt, SigTerm, etc are handled differently. -SignalDefs signalDefs[] = { - { static_cast(EXCEPTION_ILLEGAL_INSTRUCTION), - "SIGILL - Illegal instruction signal" }, - { static_cast(EXCEPTION_STACK_OVERFLOW), "SIGSEGV - Stack overflow" }, - { static_cast(EXCEPTION_ACCESS_VIOLATION), - "SIGSEGV - Segmentation violation signal" }, - { static_cast(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error" }, -}; - -struct FatalConditionHandler -{ - static LONG CALLBACK handleException(PEXCEPTION_POINTERS ExceptionInfo) - { - // Multiple threads may enter this filter/handler at once. We want the error - // message to be printed on the console just once no matter how many threads - // have crashed. - DOCTEST_DECLARE_STATIC_MUTEX(mutex) - static bool execute = true; - { - DOCTEST_LOCK_MUTEX(mutex) - if (execute) { - bool reported = false; - for (size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - if (ExceptionInfo->ExceptionRecord->ExceptionCode == - signalDefs[i].id) { - reportFatal(signalDefs[i].name); - reported = true; - break; - } - } - if (reported == false) - reportFatal("Unhandled SEH exception caught"); - if (isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - } - execute = false; - } - std::exit(EXIT_FAILURE); - } - - static void allocateAltStackMem() {} - static void freeAltStackMem() {} - - FatalConditionHandler() - { - isSet = true; - // 32k seems enough for doctest to handle stack overflow, - // but the value was found experimentally, so there is no strong guarantee - guaranteeSize = 32 * 1024; - // Register an unhandled exception filter - previousTop = SetUnhandledExceptionFilter(handleException); - // Pass in guarantee size to be filled - SetThreadStackGuarantee(&guaranteeSize); - - // On Windows uncaught exceptions from another thread, exceptions from - // destructors, or calls to std::terminate are not a SEH exception - - // The terminal handler gets called when: - // - std::terminate is called FROM THE TEST RUNNER THREAD - // - an exception is thrown from a destructor FROM THE TEST RUNNER THREAD - original_terminate_handler = std::get_terminate(); - std::set_terminate([]() DOCTEST_NOEXCEPT { - reportFatal("Terminate handler called"); - if (isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - std::exit(EXIT_FAILURE); // explicitly exit - otherwise the SIGABRT - // handler may be called as well - }); - - // SIGABRT is raised when: - // - std::terminate is called FROM A DIFFERENT THREAD - // - an exception is thrown from a destructor FROM A DIFFERENT THREAD - // - an uncaught exception is thrown FROM A DIFFERENT THREAD - prev_sigabrt_handler = - std::signal(SIGABRT, [](int signal) DOCTEST_NOEXCEPT { - if (signal == SIGABRT) { - reportFatal("SIGABRT - Abort (abnormal termination) signal"); - if (isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - std::exit(EXIT_FAILURE); - } - }); - - // The following settings are taken from google test, and more - // specifically from UnitTest::Run() inside of gtest.cc - - // the user does not want to see pop-up dialogs about crashes - prev_error_mode_1 = - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | - SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); - // This forces the abort message to go to stderr in all circumstances. - prev_error_mode_2 = _set_error_mode(_OUT_TO_STDERR); - // In the debug version, Visual Studio pops up a separate dialog - // offering a choice to debug the aborted program - we want to disable that. - prev_abort_behavior = - _set_abort_behavior(0x0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); - // In debug mode, the Windows CRT can crash with an assertion over invalid - // input (e.g. passing an invalid file descriptor). The default handling - // for these assertions is to pop up a dialog and wait for user input. - // Instead ask the CRT to dump such assertions to stderr non-interactively. - prev_report_mode = - _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); - prev_report_file = _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); - } - - static void reset() - { - if (isSet) { - // Unregister handler and restore the old guarantee - SetUnhandledExceptionFilter(previousTop); - SetThreadStackGuarantee(&guaranteeSize); - std::set_terminate(original_terminate_handler); - std::signal(SIGABRT, prev_sigabrt_handler); - SetErrorMode(prev_error_mode_1); - _set_error_mode(prev_error_mode_2); - _set_abort_behavior(prev_abort_behavior, - _WRITE_ABORT_MSG | _CALL_REPORTFAULT); - static_cast(_CrtSetReportMode(_CRT_ASSERT, prev_report_mode)); - static_cast(_CrtSetReportFile(_CRT_ASSERT, prev_report_file)); - isSet = false; - } - } - - ~FatalConditionHandler() { reset(); } - -private: - static UINT prev_error_mode_1; - static int prev_error_mode_2; - static unsigned int prev_abort_behavior; - static int prev_report_mode; - static _HFILE prev_report_file; - static void(DOCTEST_CDECL* prev_sigabrt_handler)(int); - static std::terminate_handler original_terminate_handler; - static bool isSet; - static ULONG guaranteeSize; - static LPTOP_LEVEL_EXCEPTION_FILTER previousTop; -}; - -UINT FatalConditionHandler::prev_error_mode_1; -int FatalConditionHandler::prev_error_mode_2; -unsigned int FatalConditionHandler::prev_abort_behavior; -int FatalConditionHandler::prev_report_mode; -_HFILE FatalConditionHandler::prev_report_file; -void(DOCTEST_CDECL* FatalConditionHandler::prev_sigabrt_handler)(int); -std::terminate_handler FatalConditionHandler::original_terminate_handler; -bool FatalConditionHandler::isSet = false; -ULONG FatalConditionHandler::guaranteeSize = 0; -LPTOP_LEVEL_EXCEPTION_FILTER FatalConditionHandler::previousTop = nullptr; - -#else // DOCTEST_PLATFORM_WINDOWS - -struct SignalDefs -{ - int id; - const char* name; -}; -SignalDefs signalDefs[] = { - { SIGINT, "SIGINT - Terminal interrupt signal" }, - { SIGILL, "SIGILL - Illegal instruction signal" }, - { SIGFPE, "SIGFPE - Floating point error signal" }, - { SIGSEGV, "SIGSEGV - Segmentation violation signal" }, - { SIGTERM, "SIGTERM - Termination request signal" }, - { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } -}; - -struct FatalConditionHandler -{ - static bool isSet; - static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)]; - static stack_t oldSigStack; - static size_t altStackSize; - static char* altStackMem; - - static void handleSignal(int sig) - { - const char* name = ""; - for (std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - SignalDefs& def = signalDefs[i]; - if (sig == def.id) { - name = def.name; - break; - } - } - reset(); - reportFatal(name); - raise(sig); - } - - static void allocateAltStackMem() { altStackMem = new char[altStackSize]; } - - static void freeAltStackMem() { delete[] altStackMem; } - - FatalConditionHandler() - { - isSet = true; - stack_t sigStack; - sigStack.ss_sp = altStackMem; - sigStack.ss_size = altStackSize; - sigStack.ss_flags = 0; - sigaltstack(&sigStack, &oldSigStack); - struct sigaction sa = {}; - sa.sa_handler = handleSignal; - sa.sa_flags = SA_ONSTACK; - for (std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); - } - } - - ~FatalConditionHandler() { reset(); } - static void reset() - { - if (isSet) { - // Set signals back to previous values -- hopefully nobody overwrote them - // in the meantime - for (std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); - } - // Return the old stack - sigaltstack(&oldSigStack, nullptr); - isSet = false; - } - } -}; - -bool FatalConditionHandler::isSet = false; -struct sigaction - FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {}; -stack_t FatalConditionHandler::oldSigStack = {}; -size_t FatalConditionHandler::altStackSize = 4 * SIGSTKSZ; -char* FatalConditionHandler::altStackMem = nullptr; - -#endif // DOCTEST_PLATFORM_WINDOWS -#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH - -} // namespace - -namespace { -using namespace detail; - -#ifdef DOCTEST_PLATFORM_WINDOWS -#define DOCTEST_OUTPUT_DEBUG_STRING(text) ::OutputDebugStringA(text) -#else -// TODO: integration with XCode and other IDEs -#define DOCTEST_OUTPUT_DEBUG_STRING(text) -#endif // Platform - -void -addAssert(assertType::Enum at) -{ - if ((at & assertType::is_warn) == 0) //! OCLINT bitwise operator in - //! conditional - g_cs->numAssertsCurrentTest_atomic++; -} - -void -addFailedAssert(assertType::Enum at) -{ - if ((at & assertType::is_warn) == 0) //! OCLINT bitwise operator in - //! conditional - g_cs->numAssertsFailedCurrentTest_atomic++; -} - -#if defined(DOCTEST_CONFIG_POSIX_SIGNALS) || defined(DOCTEST_CONFIG_WINDOWS_SEH) -void -reportFatal(const std::string& message) -{ - g_cs->failure_flags |= TestCaseFailureReason::Crash; - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, - { message.c_str(), true }); - - while (g_cs->subcaseStack.size()) { - g_cs->subcaseStack.pop_back(); - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY); - } - - g_cs->finalizeTestCaseData(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs); -} -#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH -} // namespace - -AssertData::AssertData(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type, - const StringContains& exception_string) - : m_test_case(g_cs->currentTest) - , m_at(at) - , m_file(file) - , m_line(line) - , m_expr(expr) - , m_failed(true) - , m_threw(false) - , m_threw_as(false) - , m_exception_type(exception_type) - , m_exception_string(exception_string) -{ -#if DOCTEST_MSVC - if (m_expr[0] == - ' ') // this happens when variadic macros are disabled under MSVC - ++m_expr; -#endif // MSVC -} - -namespace detail { -ResultBuilder::ResultBuilder(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type, - const String& exception_string) - : AssertData(at, file, line, expr, exception_type, exception_string) -{ -} - -ResultBuilder::ResultBuilder(assertType::Enum at, - const char* file, - int line, - const char* expr, - const char* exception_type, - const Contains& exception_string) - : AssertData(at, file, line, expr, exception_type, exception_string) -{ -} - -void -ResultBuilder::setResult(const Result& res) -{ - m_decomp = res.m_decomp; - m_failed = !res.m_passed; -} - -void -ResultBuilder::translateException() -{ - m_threw = true; - m_exception = translateActiveException(); -} - -bool -ResultBuilder::log() -{ - if (m_at & assertType::is_throws) { //! OCLINT bitwise operator in conditional - m_failed = !m_threw; - } else if ((m_at & assertType::is_throws_as) && - (m_at & assertType::is_throws_with)) { //! OCLINT - m_failed = !m_threw_as || !m_exception_string.check(m_exception); - } else if (m_at & assertType::is_throws_as) { //! OCLINT bitwise operator in - //! conditional - m_failed = !m_threw_as; - } else if (m_at & assertType::is_throws_with) { //! OCLINT bitwise operator in - //! conditional - m_failed = !m_exception_string.check(m_exception); - } else if (m_at & assertType::is_nothrow) { //! OCLINT bitwise operator in - //! conditional - m_failed = m_threw; - } - - if (m_exception.size()) - m_exception = "\"" + m_exception + "\""; - - if (is_running_in_test) { - addAssert(m_at); - DOCTEST_ITERATE_THROUGH_REPORTERS(log_assert, *this); - - if (m_failed) - addFailedAssert(m_at); - } else if (m_failed) { - failed_out_of_a_testing_context(*this); - } - - return m_failed && isDebuggerActive() && !getContextOptions()->no_breaks && - (g_cs->currentTest == nullptr || - !g_cs->currentTest->m_no_breaks); // break into debugger -} - -void -ResultBuilder::react() const -{ - if (m_failed && checkIfShouldThrow(m_at)) - throwException(); -} - -void -failed_out_of_a_testing_context(const AssertData& ad) -{ - if (g_cs->ah) - g_cs->ah(ad); - else - std::abort(); -} - -bool -decomp_assert(assertType::Enum at, - const char* file, - int line, - const char* expr, - const Result& result) -{ - bool failed = !result.m_passed; - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE - // FAILING ASSERT THIS IS THE EFFECT OF HAVING - // 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp); - DOCTEST_ASSERT_IN_TESTS(result.m_decomp); - return !failed; -} - -MessageBuilder::MessageBuilder(const char* file, - int line, - assertType::Enum severity) -{ - m_stream = tlssPush(); - m_file = file; - m_line = line; - m_severity = severity; -} - -MessageBuilder::~MessageBuilder() -{ - if (!logged) - tlssPop(); -} - -DOCTEST_DEFINE_INTERFACE(IExceptionTranslator) - -bool -MessageBuilder::log() -{ - if (!logged) { - m_string = tlssPop(); - logged = true; - } - - DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this); - - const bool isWarn = m_severity & assertType::is_warn; - - // warn is just a message in this context so we don't treat it as an assert - if (!isWarn) { - addAssert(m_severity); - addFailedAssert(m_severity); - } - - return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn && - (g_cs->currentTest == nullptr || - !g_cs->currentTest->m_no_breaks); // break into debugger -} - -void -MessageBuilder::react() -{ - if (m_severity & - assertType::is_require) //! OCLINT bitwise operator in conditional - throwException(); -} -} // namespace detail -namespace { -using namespace detail; - -// clang-format off - -// ================================================================================================= -// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp -// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched. -// ================================================================================================= - - class XmlEncode { - public: - enum ForWhat { ForTextNodes, ForAttributes }; - - XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes ); - - void encodeTo( std::ostream& os ) const; - - friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ); - - private: - std::string m_str; - ForWhat m_forWhat; - }; - - class XmlWriter { - public: - - class ScopedElement { - public: - ScopedElement( XmlWriter* writer ); - - ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT; - ScopedElement& operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT; - - ~ScopedElement(); - - ScopedElement& writeText( std::string const& text, bool indent = true ); - - template - ScopedElement& writeAttribute( std::string const& name, T const& attribute ) { - m_writer->writeAttribute( name, attribute ); - return *this; - } - - private: - mutable XmlWriter* m_writer = nullptr; - }; - - XmlWriter( std::ostream& os = std::cout ); - ~XmlWriter(); - - XmlWriter( XmlWriter const& ) = delete; - XmlWriter& operator=( XmlWriter const& ) = delete; - - XmlWriter& startElement( std::string const& name ); - - ScopedElement scopedElement( std::string const& name ); - - XmlWriter& endElement(); - - XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ); - - XmlWriter& writeAttribute( std::string const& name, const char* attribute ); - - XmlWriter& writeAttribute( std::string const& name, bool attribute ); - - template - XmlWriter& writeAttribute( std::string const& name, T const& attribute ) { - std::stringstream rss; - rss << attribute; - return writeAttribute( name, rss.str() ); - } - - XmlWriter& writeText( std::string const& text, bool indent = true ); - - //XmlWriter& writeComment( std::string const& text ); - - //void writeStylesheetRef( std::string const& url ); - - //XmlWriter& writeBlankLine(); - - void ensureTagClosed(); - - void writeDeclaration(); - - private: - - void newlineIfNecessary(); - - bool m_tagIsOpen = false; - bool m_needsNewline = false; - std::vector m_tags; - std::string m_indent; - std::ostream& m_os; - }; - -// ================================================================================================= -// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp -// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched. -// ================================================================================================= - -using uchar = unsigned char; - -namespace { - - size_t trailingBytes(unsigned char c) { - if ((c & 0xE0) == 0xC0) { - return 2; - } - if ((c & 0xF0) == 0xE0) { - return 3; - } - if ((c & 0xF8) == 0xF0) { - return 4; - } - DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); - } - - uint32_t headerValue(unsigned char c) { - if ((c & 0xE0) == 0xC0) { - return c & 0x1F; - } - if ((c & 0xF0) == 0xE0) { - return c & 0x0F; - } - if ((c & 0xF8) == 0xF0) { - return c & 0x07; - } - DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); - } - - void hexEscapeChar(std::ostream& os, unsigned char c) { - std::ios_base::fmtflags f(os.flags()); - os << "\\x" - << std::uppercase << std::hex << std::setfill('0') << std::setw(2) - << static_cast(c); - os.flags(f); - } - -} // anonymous namespace - - XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat ) - : m_str( str ), - m_forWhat( forWhat ) - {} - - void XmlEncode::encodeTo( std::ostream& os ) const { - // Apostrophe escaping not necessary if we always use " to write attributes - // (see: https://www.w3.org/TR/xml/#syntax) - - for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) { - uchar c = m_str[idx]; - switch (c) { - case '<': os << "<"; break; - case '&': os << "&"; break; - - case '>': - // See: https://www.w3.org/TR/xml/#syntax - if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']') - os << ">"; - else - os << c; - break; - - case '\"': - if (m_forWhat == ForAttributes) - os << """; - else - os << c; - break; - - default: - // Check for control characters and invalid utf-8 - - // Escape control characters in standard ascii - // see https://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0 - if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) { - hexEscapeChar(os, c); - break; - } - - // Plain ASCII: Write it to stream - if (c < 0x7F) { - os << c; - break; - } - - // UTF-8 territory - // Check if the encoding is valid and if it is not, hex escape bytes. - // Important: We do not check the exact decoded values for validity, only the encoding format - // First check that this bytes is a valid lead byte: - // This means that it is not encoded as 1111 1XXX - // Or as 10XX XXXX - if (c < 0xC0 || - c >= 0xF8) { - hexEscapeChar(os, c); - break; - } - - auto encBytes = trailingBytes(c); - // Are there enough bytes left to avoid accessing out-of-bounds memory? - if (idx + encBytes - 1 >= m_str.size()) { - hexEscapeChar(os, c); - break; - } - // The header is valid, check data - // The next encBytes bytes must together be a valid utf-8 - // This means: bitpattern 10XX XXXX and the extracted value is sane (ish) - bool valid = true; - uint32_t value = headerValue(c); - for (std::size_t n = 1; n < encBytes; ++n) { - uchar nc = m_str[idx + n]; - valid &= ((nc & 0xC0) == 0x80); - value = (value << 6) | (nc & 0x3F); - } - - if ( - // Wrong bit pattern of following bytes - (!valid) || - // Overlong encodings - (value < 0x80) || - ( value < 0x800 && encBytes > 2) || // removed "0x80 <= value &&" because redundant - (0x800 < value && value < 0x10000 && encBytes > 3) || - // Encoded value out of range - (value >= 0x110000) - ) { - hexEscapeChar(os, c); - break; - } - - // If we got here, this is in fact a valid(ish) utf-8 sequence - for (std::size_t n = 0; n < encBytes; ++n) { - os << m_str[idx + n]; - } - idx += encBytes - 1; - break; - } - } - } - - std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) { - xmlEncode.encodeTo( os ); - return os; - } - - XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer ) - : m_writer( writer ) - {} - - XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT - : m_writer( other.m_writer ){ - other.m_writer = nullptr; - } - XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT { - if ( m_writer ) { - m_writer->endElement(); - } - m_writer = other.m_writer; - other.m_writer = nullptr; - return *this; - } - - - XmlWriter::ScopedElement::~ScopedElement() { - if( m_writer ) - m_writer->endElement(); - } - - XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) { - m_writer->writeText( text, indent ); - return *this; - } - - XmlWriter::XmlWriter( std::ostream& os ) : m_os( os ) - { - // writeDeclaration(); // called explicitly by the reporters that use the writer class - see issue #627 - } - - XmlWriter::~XmlWriter() { - while( !m_tags.empty() ) - endElement(); - } - - XmlWriter& XmlWriter::startElement( std::string const& name ) { - ensureTagClosed(); - newlineIfNecessary(); - m_os << m_indent << '<' << name; - m_tags.push_back( name ); - m_indent += " "; - m_tagIsOpen = true; - return *this; - } - - XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) { - ScopedElement scoped( this ); - startElement( name ); - return scoped; - } - - XmlWriter& XmlWriter::endElement() { - newlineIfNecessary(); - m_indent = m_indent.substr( 0, m_indent.size()-2 ); - if( m_tagIsOpen ) { - m_os << "/>"; - m_tagIsOpen = false; - } - else { - m_os << m_indent << ""; - } - m_os << std::endl; - m_tags.pop_back(); - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) { - if( !name.empty() && !attribute.empty() ) - m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, const char* attribute ) { - if( !name.empty() && attribute && attribute[0] != '\0' ) - m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) { - m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) { - if( !text.empty() ){ - bool tagWasOpen = m_tagIsOpen; - ensureTagClosed(); - if( tagWasOpen && indent ) - m_os << m_indent; - m_os << XmlEncode( text ); - m_needsNewline = true; - } - return *this; - } - - //XmlWriter& XmlWriter::writeComment( std::string const& text ) { - // ensureTagClosed(); - // m_os << m_indent << ""; - // m_needsNewline = true; - // return *this; - //} - - //void XmlWriter::writeStylesheetRef( std::string const& url ) { - // m_os << "\n"; - //} - - //XmlWriter& XmlWriter::writeBlankLine() { - // ensureTagClosed(); - // m_os << '\n'; - // return *this; - //} - - void XmlWriter::ensureTagClosed() { - if( m_tagIsOpen ) { - m_os << ">" << std::endl; - m_tagIsOpen = false; - } - } - - void XmlWriter::writeDeclaration() { - m_os << "\n"; - } - - void XmlWriter::newlineIfNecessary() { - if( m_needsNewline ) { - m_os << std::endl; - m_needsNewline = false; - } - } - -// ================================================================================================= -// End of copy-pasted code from Catch -// ================================================================================================= - -// clang-format on - -struct XmlReporter : public IReporter -{ - XmlWriter xml; - DOCTEST_DECLARE_MUTEX(mutex) - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc = nullptr; - - XmlReporter(const ContextOptions& co) - : xml(*co.cout) - , opt(co) - { - } - - void log_contexts() - { - int num_contexts = get_num_active_contexts(); - if (num_contexts) { - auto contexts = get_active_contexts(); - std::stringstream ss; - for (int i = 0; i < num_contexts; ++i) { - contexts[i]->stringify(&ss); - xml.scopedElement("Info").writeText(ss.str()); - ss.str(""); - } - } - } - - unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; } - - void test_case_start_impl(const TestCaseData& in) - { - bool open_ts_tag = false; - if (tc != nullptr) { // we have already opened a test suite - if (std::strcmp(tc->m_test_suite, in.m_test_suite) != 0) { - xml.endElement(); - open_ts_tag = true; - } - } else { - open_ts_tag = true; // first test case ==> first test suite - } - - if (open_ts_tag) { - xml.startElement("TestSuite"); - xml.writeAttribute("name", in.m_test_suite); - } - - tc = ∈ - xml.startElement("TestCase") - .writeAttribute("name", in.m_name) - .writeAttribute("filename", skipPathFromFilename(in.m_file.c_str())) - .writeAttribute("line", line(in.m_line)) - .writeAttribute("description", in.m_description); - - if (Approx(in.m_timeout) != 0) - xml.writeAttribute("timeout", in.m_timeout); - if (in.m_may_fail) - xml.writeAttribute("may_fail", true); - if (in.m_should_fail) - xml.writeAttribute("should_fail", true); - } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData& in) override - { - test_run_start(); - if (opt.list_reporters) { - for (auto& curr : getListeners()) - xml.scopedElement("Listener") - .writeAttribute("priority", curr.first.first) - .writeAttribute("name", curr.first.second); - for (auto& curr : getReporters()) - xml.scopedElement("Reporter") - .writeAttribute("priority", curr.first.first) - .writeAttribute("name", curr.first.second); - } else if (opt.count || opt.list_test_cases) { - for (unsigned i = 0; i < in.num_data; ++i) { - xml.scopedElement("TestCase") - .writeAttribute("name", in.data[i]->m_name) - .writeAttribute("testsuite", in.data[i]->m_test_suite) - .writeAttribute("filename", - skipPathFromFilename(in.data[i]->m_file.c_str())) - .writeAttribute("line", line(in.data[i]->m_line)) - .writeAttribute("skipped", in.data[i]->m_skip); - } - xml.scopedElement("OverallResultsTestCases") - .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); - } else if (opt.list_test_suites) { - for (unsigned i = 0; i < in.num_data; ++i) - xml.scopedElement("TestSuite") - .writeAttribute("name", in.data[i]->m_test_suite); - xml.scopedElement("OverallResultsTestCases") - .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); - xml.scopedElement("OverallResultsTestSuites") - .writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters); - } - xml.endElement(); - } - - void test_run_start() override - { - xml.writeDeclaration(); - - // remove .exe extension - mainly to have the same output on UNIX and - // Windows - std::string binary_name = skipPathFromFilename(opt.binary_name.c_str()); -#ifdef DOCTEST_PLATFORM_WINDOWS - if (binary_name.rfind(".exe") != std::string::npos) - binary_name = binary_name.substr(0, binary_name.length() - 4); -#endif // DOCTEST_PLATFORM_WINDOWS - - xml.startElement("doctest").writeAttribute("binary", binary_name); - if (opt.no_version == false) - xml.writeAttribute("version", DOCTEST_VERSION_STR); - - // only the consequential ones (TODO: filters) - xml.scopedElement("Options") - .writeAttribute("order_by", opt.order_by.c_str()) - .writeAttribute("rand_seed", opt.rand_seed) - .writeAttribute("first", opt.first) - .writeAttribute("last", opt.last) - .writeAttribute("abort_after", opt.abort_after) - .writeAttribute("subcase_filter_levels", opt.subcase_filter_levels) - .writeAttribute("case_sensitive", opt.case_sensitive) - .writeAttribute("no_throw", opt.no_throw) - .writeAttribute("no_skip", opt.no_skip); - } - - void test_run_end(const TestRunStats& p) override - { - if (tc) // the TestSuite tag - only if there has been at least 1 test case - xml.endElement(); - - xml.scopedElement("OverallResultsAsserts") - .writeAttribute("successes", p.numAsserts - p.numAssertsFailed) - .writeAttribute("failures", p.numAssertsFailed); - - xml.startElement("OverallResultsTestCases") - .writeAttribute("successes", - p.numTestCasesPassingFilters - p.numTestCasesFailed) - .writeAttribute("failures", p.numTestCasesFailed); - if (opt.no_skipped_summary == false) - xml.writeAttribute("skipped", - p.numTestCases - p.numTestCasesPassingFilters); - xml.endElement(); - - xml.endElement(); - } - - void test_case_start(const TestCaseData& in) override - { - test_case_start_impl(in); - xml.ensureTagClosed(); - } - - void test_case_reenter(const TestCaseData&) override {} - - void test_case_end(const CurrentTestCaseStats& st) override - { - xml.startElement("OverallResultsAsserts") - .writeAttribute("successes", - st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest) - .writeAttribute("failures", st.numAssertsFailedCurrentTest) - .writeAttribute("test_case_success", st.testCaseSuccess); - if (opt.duration) - xml.writeAttribute("duration", st.seconds); - if (tc->m_expected_failures) - xml.writeAttribute("expected_failures", tc->m_expected_failures); - xml.endElement(); - - xml.endElement(); - } - - void test_case_exception(const TestCaseException& e) override - { - DOCTEST_LOCK_MUTEX(mutex) - - xml.scopedElement("Exception") - .writeAttribute("crash", e.is_crash) - .writeText(e.error_string.c_str()); - } - - void subcase_start(const SubcaseSignature& in) override - { - xml.startElement("SubCase") - .writeAttribute("name", in.m_name) - .writeAttribute("filename", skipPathFromFilename(in.m_file)) - .writeAttribute("line", line(in.m_line)); - xml.ensureTagClosed(); - } - - void subcase_end() override { xml.endElement(); } - - void log_assert(const AssertData& rb) override - { - if (!rb.m_failed && !opt.success) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - xml.startElement("Expression") - .writeAttribute("success", !rb.m_failed) - .writeAttribute("type", assertString(rb.m_at)) - .writeAttribute("filename", skipPathFromFilename(rb.m_file)) - .writeAttribute("line", line(rb.m_line)); - - xml.scopedElement("Original").writeText(rb.m_expr); - - if (rb.m_threw) - xml.scopedElement("Exception").writeText(rb.m_exception.c_str()); - - if (rb.m_at & assertType::is_throws_as) - xml.scopedElement("ExpectedException").writeText(rb.m_exception_type); - if (rb.m_at & assertType::is_throws_with) - xml.scopedElement("ExpectedExceptionString") - .writeText(rb.m_exception_string.c_str()); - if ((rb.m_at & assertType::is_normal) && !rb.m_threw) - xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str()); - - log_contexts(); - - xml.endElement(); - } - - void log_message(const MessageData& mb) override - { - DOCTEST_LOCK_MUTEX(mutex) - - xml.startElement("Message") - .writeAttribute("type", failureString(mb.m_severity)) - .writeAttribute("filename", skipPathFromFilename(mb.m_file)) - .writeAttribute("line", line(mb.m_line)); - - xml.scopedElement("Text").writeText(mb.m_string.c_str()); - - log_contexts(); - - xml.endElement(); - } - - void test_case_skipped(const TestCaseData& in) override - { - if (opt.no_skipped_summary == false) { - test_case_start_impl(in); - xml.writeAttribute("skipped", "true"); - xml.endElement(); - } - } -}; - -DOCTEST_REGISTER_REPORTER("xml", 0, XmlReporter); - -void -fulltext_log_assert_to_stream(std::ostream& s, const AssertData& rb) -{ - if ((rb.m_at & (assertType::is_throws_as | assertType::is_throws_with)) == - 0) //! OCLINT bitwise operator in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << " ) " - << Color::None; - - if (rb.m_at & - assertType::is_throws) { //! OCLINT bitwise operator in conditional - s << (rb.m_threw ? "threw as expected!" : "did NOT throw at all!") << "\n"; - } else if ((rb.m_at & assertType::is_throws_as) && - (rb.m_at & assertType::is_throws_with)) { //! OCLINT - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \"" - << rb.m_exception_string.c_str() << "\", " << rb.m_exception_type << " ) " - << Color::None; - if (rb.m_threw) { - if (!rb.m_failed) { - s << "threw as expected!\n"; - } else { - s << "threw a DIFFERENT exception! (contents: " << rb.m_exception - << ")\n"; - } - } else { - s << "did NOT throw at all!\n"; - } - } else if (rb.m_at & assertType::is_throws_as) { //! OCLINT bitwise operator - //! in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", " - << rb.m_exception_type << " ) " << Color::None - << (rb.m_threw ? (rb.m_threw_as ? "threw as expected!" - : "threw a DIFFERENT exception: ") - : "did NOT throw at all!") - << Color::Cyan << rb.m_exception << "\n"; - } else if (rb.m_at & assertType::is_throws_with) { //! OCLINT bitwise operator - //! in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \"" - << rb.m_exception_string.c_str() << "\" ) " << Color::None - << (rb.m_threw ? (!rb.m_failed ? "threw as expected!" - : "threw a DIFFERENT exception: ") - : "did NOT throw at all!") - << Color::Cyan << rb.m_exception << "\n"; - } else if (rb.m_at & assertType::is_nothrow) { //! OCLINT bitwise operator in - //! conditional - s << (rb.m_threw ? "THREW exception: " : "didn't throw!") << Color::Cyan - << rb.m_exception << "\n"; - } else { - s << (rb.m_threw ? "THREW exception: " - : (!rb.m_failed ? "is correct!\n" : "is NOT correct!\n")); - if (rb.m_threw) - s << rb.m_exception << "\n"; - else - s << " values: " << assertString(rb.m_at) << "( " << rb.m_decomp - << " )\n"; - } -} - -// TODO: -// - log_message() -// - respond to queries -// - honor remaining options -// - more attributes in tags -struct JUnitReporter : public IReporter -{ - XmlWriter xml; - DOCTEST_DECLARE_MUTEX(mutex) - Timer timer; - std::vector deepestSubcaseStackNames; - - struct JUnitTestCaseData - { - static std::string getCurrentTimestamp() - { - // Beware, this is not reentrant because of backward compatibility issues - // Also, UTC only, again because of backward compatibility (%z is C++11) - time_t rawtime; - std::time(&rawtime); - auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); - - std::tm timeInfo; -#ifdef DOCTEST_PLATFORM_WINDOWS - gmtime_s(&timeInfo, &rawtime); -#else // DOCTEST_PLATFORM_WINDOWS - gmtime_r(&rawtime, &timeInfo); -#endif // DOCTEST_PLATFORM_WINDOWS - - char timeStamp[timeStampSize]; - const char* const fmt = "%Y-%m-%dT%H:%M:%SZ"; - - std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); - return std::string(timeStamp); - } - - struct JUnitTestMessage - { - JUnitTestMessage(const std::string& _message, - const std::string& _type, - const std::string& _details) - : message(_message) - , type(_type) - , details(_details) - { - } - - JUnitTestMessage(const std::string& _message, const std::string& _details) - : message(_message) - , type() - , details(_details) - { - } - - std::string message, type, details; - }; - - struct JUnitTestCase - { - JUnitTestCase(const std::string& _classname, const std::string& _name) - : classname(_classname) - , name(_name) - , time(0) - , failures() - { - } - - std::string classname, name; - double time; - std::vector failures, errors; - }; - - void add(const std::string& classname, const std::string& name) - { - testcases.emplace_back(classname, name); - } - - void appendSubcaseNamesToLastTestcase(std::vector nameStack) - { - for (auto& curr : nameStack) - if (curr.size()) - testcases.back().name += std::string("/") + curr.c_str(); - } - - void addTime(double time) - { - if (time < 1e-4) - time = 0; - testcases.back().time = time; - totalSeconds += time; - } - - void addFailure(const std::string& message, - const std::string& type, - const std::string& details) - { - testcases.back().failures.emplace_back(message, type, details); - ++totalFailures; - } - - void addError(const std::string& message, const std::string& details) - { - testcases.back().errors.emplace_back(message, details); - ++totalErrors; - } - - std::vector testcases; - double totalSeconds = 0; - int totalErrors = 0, totalFailures = 0; - }; - - JUnitTestCaseData testCaseData; - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc = nullptr; - - JUnitReporter(const ContextOptions& co) - : xml(*co.cout) - , opt(co) - { - } - - unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData&) override { xml.writeDeclaration(); } - - void test_run_start() override { xml.writeDeclaration(); } - - void test_run_end(const TestRunStats& p) override - { - // remove .exe extension - mainly to have the same output on UNIX and - // Windows - std::string binary_name = skipPathFromFilename(opt.binary_name.c_str()); -#ifdef DOCTEST_PLATFORM_WINDOWS - if (binary_name.rfind(".exe") != std::string::npos) - binary_name = binary_name.substr(0, binary_name.length() - 4); -#endif // DOCTEST_PLATFORM_WINDOWS - xml.startElement("testsuites"); - xml.startElement("testsuite") - .writeAttribute("name", binary_name) - .writeAttribute("errors", testCaseData.totalErrors) - .writeAttribute("failures", testCaseData.totalFailures) - .writeAttribute("tests", p.numAsserts); - if (opt.no_time_in_output == false) { - xml.writeAttribute("time", testCaseData.totalSeconds); - xml.writeAttribute("timestamp", JUnitTestCaseData::getCurrentTimestamp()); - } - if (opt.no_version == false) - xml.writeAttribute("doctest_version", DOCTEST_VERSION_STR); - - for (const auto& testCase : testCaseData.testcases) { - xml.startElement("testcase") - .writeAttribute("classname", testCase.classname) - .writeAttribute("name", testCase.name); - if (opt.no_time_in_output == false) - xml.writeAttribute("time", testCase.time); - // This is not ideal, but it should be enough to mimic gtest's junit - // output. - xml.writeAttribute("status", "run"); - - for (const auto& failure : testCase.failures) { - xml.scopedElement("failure") - .writeAttribute("message", failure.message) - .writeAttribute("type", failure.type) - .writeText(failure.details, false); - } - - for (const auto& error : testCase.errors) { - xml.scopedElement("error") - .writeAttribute("message", error.message) - .writeText(error.details); - } - - xml.endElement(); - } - xml.endElement(); - xml.endElement(); - } - - void test_case_start(const TestCaseData& in) override - { - testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name); - timer.start(); - } - - void test_case_reenter(const TestCaseData& in) override - { - testCaseData.addTime(timer.getElapsedSeconds()); - testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames); - deepestSubcaseStackNames.clear(); - - timer.start(); - testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name); - } - - void test_case_end(const CurrentTestCaseStats&) override - { - testCaseData.addTime(timer.getElapsedSeconds()); - testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames); - deepestSubcaseStackNames.clear(); - } - - void test_case_exception(const TestCaseException& e) override - { - DOCTEST_LOCK_MUTEX(mutex) - testCaseData.addError("exception", e.error_string.c_str()); - } - - void subcase_start(const SubcaseSignature& in) override - { - deepestSubcaseStackNames.push_back(in.m_name); - } - - void subcase_end() override {} - - void log_assert(const AssertData& rb) override - { - if (!rb.m_failed) // report only failures & ignore the `success` option - return; - - DOCTEST_LOCK_MUTEX(mutex) - - std::ostringstream os; - os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? ":" : "(") - << line(rb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl; - - fulltext_log_assert_to_stream(os, rb); - log_contexts(os); - testCaseData.addFailure( - rb.m_decomp.c_str(), assertString(rb.m_at), os.str()); - } - - void log_message(const MessageData&) override {} - - void test_case_skipped(const TestCaseData&) override {} - - void log_contexts(std::ostringstream& s) - { - int num_contexts = get_num_active_contexts(); - if (num_contexts) { - auto contexts = get_active_contexts(); - - s << " logged: "; - for (int i = 0; i < num_contexts; ++i) { - s << (i == 0 ? "" : " "); - contexts[i]->stringify(&s); - s << std::endl; - } - } - } -}; - -DOCTEST_REGISTER_REPORTER("junit", 0, JUnitReporter); - -struct Whitespace -{ - int nrSpaces; - explicit Whitespace(int nr) - : nrSpaces(nr) - { - } -}; - -std::ostream& -operator<<(std::ostream& out, const Whitespace& ws) -{ - if (ws.nrSpaces != 0) - out << std::setw(ws.nrSpaces) << ' '; - return out; -} - -struct ConsoleReporter : public IReporter -{ - std::ostream& s; - bool hasLoggedCurrentTestStart; - std::vector subcasesStack; - size_t currentSubcaseLevel; - DOCTEST_DECLARE_MUTEX(mutex) - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc; - - ConsoleReporter(const ContextOptions& co) - : s(*co.cout) - , opt(co) - { - } - - ConsoleReporter(const ContextOptions& co, std::ostream& ostr) - : s(ostr) - , opt(co) - { - } - - // ========================================================================================= - // WHAT FOLLOWS ARE HELPERS USED BY THE OVERRIDES OF THE VIRTUAL METHODS OF - // THE INTERFACE - // ========================================================================================= - - void separator_to_stream() - { - s << Color::Yellow - << "=====================================================================" - "==========" - "\n"; - } - - const char* getSuccessOrFailString(bool success, - assertType::Enum at, - const char* success_str) - { - if (success) - return success_str; - return failureString(at); - } - - Color::Enum getSuccessOrFailColor(bool success, assertType::Enum at) - { - return success ? Color::BrightGreen - : (at & assertType::is_warn) ? Color::Yellow - : Color::Red; - } - - void successOrFailColoredStringToStream(bool success, - assertType::Enum at, - const char* success_str = "SUCCESS") - { - s << getSuccessOrFailColor(success, at) - << getSuccessOrFailString(success, at, success_str) << ": "; - } - - void log_contexts() - { - int num_contexts = get_num_active_contexts(); - if (num_contexts) { - auto contexts = get_active_contexts(); - - s << Color::None << " logged: "; - for (int i = 0; i < num_contexts; ++i) { - s << (i == 0 ? "" : " "); - contexts[i]->stringify(&s); - s << "\n"; - } - } - - s << "\n"; - } - - // this was requested to be made virtual so users could override it - virtual void file_line_to_stream(const char* file, - int line, - const char* tail = "") - { - s << Color::LightGrey << skipPathFromFilename(file) - << (opt.gnu_file_line ? ":" : "(") - << (opt.no_line_numbers - ? 0 - : line) // 0 or the real num depending on the option - << (opt.gnu_file_line ? ":" : "):") << tail; - } - - void logTestStart() - { - if (hasLoggedCurrentTestStart) - return; - - separator_to_stream(); - file_line_to_stream(tc->m_file.c_str(), tc->m_line, "\n"); - if (tc->m_description) - s << Color::Yellow << "DESCRIPTION: " << Color::None << tc->m_description - << "\n"; - if (tc->m_test_suite && tc->m_test_suite[0] != '\0') - s << Color::Yellow << "TEST SUITE: " << Color::None << tc->m_test_suite - << "\n"; - if (strncmp(tc->m_name, " Scenario:", 11) != 0) - s << Color::Yellow << "TEST CASE: "; - s << Color::None << tc->m_name << "\n"; - - for (size_t i = 0; i < currentSubcaseLevel; ++i) { - if (subcasesStack[i].m_name[0] != '\0') - s << " " << subcasesStack[i].m_name << "\n"; - } - - if (currentSubcaseLevel != subcasesStack.size()) { - s << Color::Yellow - << "\nDEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):\n" - << Color::None; - for (size_t i = 0; i < subcasesStack.size(); ++i) { - if (subcasesStack[i].m_name[0] != '\0') - s << " " << subcasesStack[i].m_name << "\n"; - } - } - - s << "\n"; - - hasLoggedCurrentTestStart = true; - } - - void printVersion() - { - if (opt.no_version == false) - s << Color::Cyan << "[doctest] " << Color::None << "doctest version is \"" - << DOCTEST_VERSION_STR << "\"\n"; - } - - void printIntro() - { - if (opt.no_intro == false) { - printVersion(); - s << Color::Cyan << "[doctest] " << Color::None - << "run with \"--" DOCTEST_OPTIONS_PREFIX_DISPLAY - "help\" for options\n"; - } - } - - void printHelp() - { - int sizePrefixDisplay = - static_cast(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY)); - printVersion(); - // clang-format off - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "boolean values: \"1/on/yes/true\" or \"0/off/no/false\"\n"; - s << Color::Cyan << "[doctest] " << Color::None; - s << "filter values: \"str1,str2,str3\" (comma separated strings)\n"; - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "filters use wildcards for matching strings\n"; - s << Color::Cyan << "[doctest] " << Color::None; - s << "something passes a filter if any of the strings in a filter matches\n"; -#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \"" DOCTEST_CONFIG_OPTIONS_PREFIX "\" PREFIX!!!\n"; -#endif - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "Query flags - the program quits after them. Available:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "?, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "help, -" DOCTEST_OPTIONS_PREFIX_DISPLAY "h " - << Whitespace(sizePrefixDisplay*0) << "prints this message\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "v, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "version " - << Whitespace(sizePrefixDisplay*1) << "prints the version\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "c, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "count " - << Whitespace(sizePrefixDisplay*1) << "prints the number of matching tests\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ltc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-cases " - << Whitespace(sizePrefixDisplay*1) << "lists all matching tests by name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-suites " - << Whitespace(sizePrefixDisplay*1) << "lists all matching test suites\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-reporters " - << Whitespace(sizePrefixDisplay*1) << "lists all registered reporters\n\n"; - // ================================================================================== << 79 - s << Color::Cyan << "[doctest] " << Color::None; - s << "The available / options/filters are:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case= " - << Whitespace(sizePrefixDisplay*1) << "filters tests by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file= " - << Whitespace(sizePrefixDisplay*1) << "filters tests by their file\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sfe, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their file\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite= " - << Whitespace(sizePrefixDisplay*1) << "filters tests by their test suite\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tse, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their test suite\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase= " - << Whitespace(sizePrefixDisplay*1) << "filters subcases by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT subcases by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "r, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "reporters= " - << Whitespace(sizePrefixDisplay*1) << "reporters to use (console is default)\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "o, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "out= " - << Whitespace(sizePrefixDisplay*1) << "output filename\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ob, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "order-by= " - << Whitespace(sizePrefixDisplay*1) << "how the tests should be ordered\n"; - s << Whitespace(sizePrefixDisplay*3) << " - [file/suite/name/rand/none]\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "rs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "rand-seed= " - << Whitespace(sizePrefixDisplay*1) << "seed for random ordering\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "f, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "first= " - << Whitespace(sizePrefixDisplay*1) << "the first test passing the filters to\n"; - s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "l, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "last= " - << Whitespace(sizePrefixDisplay*1) << "the last test passing the filters to\n"; - s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "aa, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "abort-after= " - << Whitespace(sizePrefixDisplay*1) << "stop after failed assertions\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "scfl,--" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-filter-levels= " - << Whitespace(sizePrefixDisplay*1) << "apply filters for the first levels\n"; - s << Color::Cyan << "\n[doctest] " << Color::None; - s << "Bool options - can be used like flags and true is assumed. Available:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "s, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "success= " - << Whitespace(sizePrefixDisplay*1) << "include successful assertions in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "cs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "case-sensitive= " - << Whitespace(sizePrefixDisplay*1) << "filters being treated as case sensitive\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "e, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "exit= " - << Whitespace(sizePrefixDisplay*1) << "exits after the tests finish\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "d, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "duration= " - << Whitespace(sizePrefixDisplay*1) << "prints the time duration of each test\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "m, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "minimal= " - << Whitespace(sizePrefixDisplay*1) << "minimal console output (only failures)\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "q, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "quiet= " - << Whitespace(sizePrefixDisplay*1) << "no console output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nt, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-throw= " - << Whitespace(sizePrefixDisplay*1) << "skips exceptions-related assert checks\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ne, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-exitcode= " - << Whitespace(sizePrefixDisplay*1) << "returns (or exits) always with success\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-run= " - << Whitespace(sizePrefixDisplay*1) << "skips all runtime doctest operations\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ni, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-intro= " - << Whitespace(sizePrefixDisplay*1) << "omit the framework intro in the output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nv, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-version= " - << Whitespace(sizePrefixDisplay*1) << "omit the framework version in the output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-colors= " - << Whitespace(sizePrefixDisplay*1) << "disables colors in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "fc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "force-colors= " - << Whitespace(sizePrefixDisplay*1) << "use colors even when not in a tty\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nb, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-breaks= " - << Whitespace(sizePrefixDisplay*1) << "disables breakpoints in debuggers\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ns, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-skip= " - << Whitespace(sizePrefixDisplay*1) << "don't skip test cases marked as skip\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "gfl, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "gnu-file-line= " - << Whitespace(sizePrefixDisplay*1) << ":n: vs (n): for line numbers in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "npf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-path-filenames= " - << Whitespace(sizePrefixDisplay*1) << "only filenames and no paths in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nln, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-line-numbers= " - << Whitespace(sizePrefixDisplay*1) << "0 instead of real line numbers in output\n"; - // ================================================================================== << 79 - // clang-format on - - s << Color::Cyan << "\n[doctest] " << Color::None; - s << "for more information visit the project documentation\n\n"; - } - - void printRegisteredReporters() - { - printVersion(); - auto printReporters = [this](const reporterMap& reporters, - const char* type) { - if (reporters.size()) { - s << Color::Cyan << "[doctest] " << Color::None - << "listing all registered " << type << "\n"; - for (auto& curr : reporters) - s << "priority: " << std::setw(5) << curr.first.first - << " name: " << curr.first.second << "\n"; - } - }; - printReporters(getListeners(), "listeners"); - printReporters(getReporters(), "reporters"); - } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData& in) override - { - if (opt.version) { - printVersion(); - } else if (opt.help) { - printHelp(); - } else if (opt.list_reporters) { - printRegisteredReporters(); - } else if (opt.count || opt.list_test_cases) { - if (opt.list_test_cases) { - s << Color::Cyan << "[doctest] " << Color::None - << "listing all test case names\n"; - separator_to_stream(); - } - - for (unsigned i = 0; i < in.num_data; ++i) - s << Color::None << in.data[i]->m_name << "\n"; - - separator_to_stream(); - - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - - } else if (opt.list_test_suites) { - s << Color::Cyan << "[doctest] " << Color::None - << "listing all test suites\n"; - separator_to_stream(); - - for (unsigned i = 0; i < in.num_data; ++i) - s << Color::None << in.data[i]->m_test_suite << "\n"; - - separator_to_stream(); - - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "test suites with unskipped test cases passing the current filters: " - << g_cs->numTestSuitesPassingFilters << "\n"; - } - } - - void test_run_start() override - { - if (!opt.minimal) - printIntro(); - } - - void test_run_end(const TestRunStats& p) override - { - if (opt.minimal && p.numTestCasesFailed == 0) - return; - - separator_to_stream(); - s << std::dec; - - auto totwidth = - int(std::ceil(log10((std::max(p.numTestCasesPassingFilters, - static_cast(p.numAsserts))) + - 1))); - auto passwidth = int(std::ceil(log10( - (std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, - static_cast(p.numAsserts - p.numAssertsFailed))) + - 1))); - auto failwidth = int( - std::ceil(log10((std::max(p.numTestCasesFailed, - static_cast(p.numAssertsFailed))) + - 1))); - const bool anythingFailed = - p.numTestCasesFailed > 0 || p.numAssertsFailed > 0; - s << Color::Cyan << "[doctest] " << Color::None - << "test cases: " << std::setw(totwidth) << p.numTestCasesPassingFilters - << " | " - << ((p.numTestCasesPassingFilters == 0 || anythingFailed) ? Color::None - : Color::Green) - << std::setw(passwidth) - << p.numTestCasesPassingFilters - p.numTestCasesFailed << " passed" - << Color::None << " | " - << (p.numTestCasesFailed > 0 ? Color::Red : Color::None) - << std::setw(failwidth) << p.numTestCasesFailed << " failed" - << Color::None << " |"; - if (opt.no_skipped_summary == false) { - const int numSkipped = p.numTestCases - p.numTestCasesPassingFilters; - s << " " << (numSkipped == 0 ? Color::None : Color::Yellow) << numSkipped - << " skipped" << Color::None; - } - s << "\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "assertions: " << std::setw(totwidth) << p.numAsserts << " | " - << ((p.numAsserts == 0 || anythingFailed) ? Color::None : Color::Green) - << std::setw(passwidth) << (p.numAsserts - p.numAssertsFailed) - << " passed" << Color::None << " | " - << (p.numAssertsFailed > 0 ? Color::Red : Color::None) - << std::setw(failwidth) << p.numAssertsFailed << " failed" << Color::None - << " |\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "Status: " << (p.numTestCasesFailed > 0 ? Color::Red : Color::Green) - << ((p.numTestCasesFailed > 0) ? "FAILURE!" : "SUCCESS!") << Color::None - << std::endl; - } - - void test_case_start(const TestCaseData& in) override - { - hasLoggedCurrentTestStart = false; - tc = ∈ - subcasesStack.clear(); - currentSubcaseLevel = 0; - } - - void test_case_reenter(const TestCaseData&) override - { - subcasesStack.clear(); - } - - void test_case_end(const CurrentTestCaseStats& st) override - { - if (tc->m_no_output) - return; - - // log the preamble of the test case only if there is something - // else to print - something other than that an assert has failed - if (opt.duration || - (st.failure_flags && - st.failure_flags != - static_cast(TestCaseFailureReason::AssertFailure))) - logTestStart(); - - if (opt.duration) - s << Color::None << std::setprecision(6) << std::fixed << st.seconds - << " s: " << tc->m_name << "\n"; - - if (st.failure_flags & TestCaseFailureReason::Timeout) - s << Color::Red << "Test case exceeded time limit of " - << std::setprecision(6) << std::fixed << tc->m_timeout << "!\n"; - - if (st.failure_flags & TestCaseFailureReason::ShouldHaveFailedButDidnt) { - s << Color::Red - << "Should have failed but didn't! Marking it as failed!\n"; - } else if (st.failure_flags & - TestCaseFailureReason::ShouldHaveFailedAndDid) { - s << Color::Yellow << "Failed as expected so marking it as not failed\n"; - } else if (st.failure_flags & - TestCaseFailureReason::CouldHaveFailedAndDid) { - s << Color::Yellow << "Allowed to fail so marking it as not failed\n"; - } else if (st.failure_flags & - TestCaseFailureReason::DidntFailExactlyNumTimes) { - s << Color::Red << "Didn't fail exactly " << tc->m_expected_failures - << " times so marking it as failed!\n"; - } else if (st.failure_flags & - TestCaseFailureReason::FailedExactlyNumTimes) { - s << Color::Yellow << "Failed exactly " << tc->m_expected_failures - << " times as expected so marking it as not failed!\n"; - } - if (st.failure_flags & TestCaseFailureReason::TooManyFailedAsserts) { - s << Color::Red << "Aborting - too many failed asserts!\n"; - } - s << Color::None; // lgtm [cpp/useless-expression] - } - - void test_case_exception(const TestCaseException& e) override - { - DOCTEST_LOCK_MUTEX(mutex) - if (tc->m_no_output) - return; - - logTestStart(); - - file_line_to_stream(tc->m_file.c_str(), tc->m_line, " "); - successOrFailColoredStringToStream( - false, e.is_crash ? assertType::is_require : assertType::is_check); - s << Color::Red - << (e.is_crash ? "test case CRASHED: " : "test case THREW exception: ") - << Color::Cyan << e.error_string << "\n"; - - int num_stringified_contexts = get_num_stringified_contexts(); - if (num_stringified_contexts) { - auto stringified_contexts = get_stringified_contexts(); - s << Color::None << " logged: "; - for (int i = num_stringified_contexts; i > 0; --i) { - s << (i == num_stringified_contexts ? "" : " ") - << stringified_contexts[i - 1] << "\n"; - } - } - s << "\n" << Color::None; - } - - void subcase_start(const SubcaseSignature& subc) override - { - subcasesStack.push_back(subc); - ++currentSubcaseLevel; - hasLoggedCurrentTestStart = false; - } - - void subcase_end() override - { - --currentSubcaseLevel; - hasLoggedCurrentTestStart = false; - } - - void log_assert(const AssertData& rb) override - { - if ((!rb.m_failed && !opt.success) || tc->m_no_output) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - logTestStart(); - - file_line_to_stream(rb.m_file, rb.m_line, " "); - successOrFailColoredStringToStream(!rb.m_failed, rb.m_at); - - fulltext_log_assert_to_stream(s, rb); - - log_contexts(); - } - - void log_message(const MessageData& mb) override - { - if (tc->m_no_output) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - logTestStart(); - - file_line_to_stream(mb.m_file, mb.m_line, " "); - s << getSuccessOrFailColor(false, mb.m_severity) - << getSuccessOrFailString( - mb.m_severity & assertType::is_warn, mb.m_severity, "MESSAGE") - << ": "; - s << Color::None << mb.m_string << "\n"; - log_contexts(); - } - - void test_case_skipped(const TestCaseData&) override {} -}; - -DOCTEST_REGISTER_REPORTER("console", 0, ConsoleReporter); - -#ifdef DOCTEST_PLATFORM_WINDOWS -struct DebugOutputWindowReporter : public ConsoleReporter -{ - DOCTEST_THREAD_LOCAL static std::ostringstream oss; - - DebugOutputWindowReporter(const ContextOptions& co) - : ConsoleReporter(co, oss) - { - } - -#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg) \ - void func(type arg) override \ - { \ - bool with_col = g_no_colors; \ - g_no_colors = false; \ - ConsoleReporter::func(arg); \ - if (oss.tellp() != std::streampos{}) { \ - DOCTEST_OUTPUT_DEBUG_STRING(oss.str().c_str()); \ - oss.str(""); \ - } \ - g_no_colors = with_col; \ - } - - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, - DOCTEST_EMPTY, - DOCTEST_EMPTY) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, - const TestCaseData&, - in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, - const TestCaseData&, - in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, - const CurrentTestCaseStats&, - in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, - const TestCaseException&, - in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, - const SubcaseSignature&, - in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, - DOCTEST_EMPTY, - DOCTEST_EMPTY) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, - const TestCaseData&, - in) -}; - -DOCTEST_THREAD_LOCAL std::ostringstream DebugOutputWindowReporter::oss; -#endif // DOCTEST_PLATFORM_WINDOWS - -// the implementation of parseOption() -bool -parseOptionImpl(int argc, - const char* const* argv, - const char* pattern, - String* value) -{ - // going from the end to the beginning and stopping on the first occurrence - // from the end - for (int i = argc; i > 0; --i) { - auto index = i - 1; - auto temp = std::strstr(argv[index], pattern); - if (temp && - (value || - strlen(temp) == - strlen(pattern))) { //! OCLINT prefer early exits and continue - // eliminate matches in which the chars before the option are not '-' - bool noBadCharsFound = true; - auto curr = argv[index]; - while (curr != temp) { - if (*curr++ != '-') { - noBadCharsFound = false; - break; - } - } - if (noBadCharsFound && argv[index][0] == '-') { - if (value) { - // parsing the value of an option - temp += strlen(pattern); - const unsigned len = strlen(temp); - if (len) { - *value = temp; - return true; - } - } else { - // just a flag - no value - return true; - } - } - } - } - return false; -} - -// parses an option and returns the string after the '=' character -bool -parseOption(int argc, - const char* const* argv, - const char* pattern, - String* value = nullptr, - const String& defaultVal = String()) -{ - if (value) - *value = defaultVal; -#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - // offset (normally 3 for "dt-") to skip prefix - if (parseOptionImpl( - argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) - return true; -#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - return parseOptionImpl(argc, argv, pattern, value); -} - -// locates a flag on the command line -bool -parseFlag(int argc, const char* const* argv, const char* pattern) -{ - return parseOption(argc, argv, pattern); -} - -// parses a comma separated list of words after a pattern in one of the -// arguments in argv -bool -parseCommaSepArgs(int argc, - const char* const* argv, - const char* pattern, - std::vector& res) -{ - String filtersString; - if (parseOption(argc, argv, pattern, &filtersString)) { - // tokenize with "," as a separator, unless escaped with backslash - std::ostringstream s; - auto flush = [&s, &res]() { - auto string = s.str(); - if (string.size() > 0) { - res.push_back(string.c_str()); - } - s.str(""); - }; - - bool seenBackslash = false; - const char* current = filtersString.c_str(); - const char* end = current + strlen(current); - while (current != end) { - char character = *current++; - if (seenBackslash) { - seenBackslash = false; - if (character == ',' || character == '\\') { - s.put(character); - continue; - } - s.put('\\'); - } - if (character == '\\') { - seenBackslash = true; - } else if (character == ',') { - flush(); - } else { - s.put(character); - } - } - - if (seenBackslash) { - s.put('\\'); - } - flush(); - return true; - } - return false; -} - -enum optionType -{ - option_bool, - option_int -}; - -// parses an int/bool option from the command line -bool -parseIntOption(int argc, - const char* const* argv, - const char* pattern, - optionType type, - int& res) -{ - String parsedValue; - if (!parseOption(argc, argv, pattern, &parsedValue)) - return false; - - if (type) { - // integer - // TODO: change this to use std::stoi or something else! currently it uses - // undefined behavior - assumes '0' on failed parse... - int theInt = std::atoi(parsedValue.c_str()); - if (theInt != 0) { - res = theInt; //! OCLINT parameter reassignment - return true; - } - } else { - // boolean - const char positive[][5] = { - "1", "true", "on", "yes" - }; // 5 - strlen("true") + 1 - const char negative[][6] = { - "0", "false", "off", "no" - }; // 6 - strlen("false") + 1 - - // if the value matches any of the positive/negative possibilities - for (unsigned i = 0; i < 4; i++) { - if (parsedValue.compare(positive[i], true) == 0) { - res = 1; //! OCLINT parameter reassignment - return true; - } - if (parsedValue.compare(negative[i], true) == 0) { - res = 0; //! OCLINT parameter reassignment - return true; - } - } - } - return false; -} -} // namespace - -Context::Context(int argc, const char* const* argv) - : p(new detail::ContextState) -{ - parseArgs(argc, argv, true); - if (argc) - p->binary_name = argv[0]; -} - -Context::~Context() -{ - if (g_cs == p) - g_cs = nullptr; - delete p; -} - -void -Context::applyCommandLine(int argc, const char* const* argv) -{ - parseArgs(argc, argv); - if (argc) - p->binary_name = argv[0]; -} - -// parses args -void -Context::parseArgs(int argc, const char* const* argv, bool withDefaults) -{ - using namespace detail; - - // clang-format off - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file=", p->filters[0]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sf=", p->filters[0]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file-exclude=",p->filters[1]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sfe=", p->filters[1]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite=", p->filters[2]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ts=", p->filters[2]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite-exclude=", p->filters[3]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tse=", p->filters[3]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case=", p->filters[4]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tc=", p->filters[4]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case-exclude=", p->filters[5]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tce=", p->filters[5]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase=", p->filters[6]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sc=", p->filters[6]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase-exclude=", p->filters[7]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sce=", p->filters[7]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "reporters=", p->filters[8]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "r=", p->filters[8]); - // clang-format on - - int intRes = 0; - String strRes; - -#define DOCTEST_PARSE_AS_BOOL_OR_FLAG(name, sname, var, default) \ - if (parseIntOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX name "=", \ - option_bool, \ - intRes) || \ - parseIntOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", \ - option_bool, \ - intRes)) \ - p->var = static_cast(intRes); \ - else if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name) || \ - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname)) \ - p->var = true; \ - else if (withDefaults) \ - p->var = default - -#define DOCTEST_PARSE_INT_OPTION(name, sname, var, default) \ - if (parseIntOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX name "=", \ - option_int, \ - intRes) || \ - parseIntOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", \ - option_int, \ - intRes)) \ - p->var = intRes; \ - else if (withDefaults) \ - p->var = default - -#define DOCTEST_PARSE_STR_OPTION(name, sname, var, default) \ - if (parseOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX name "=", \ - &strRes, \ - default) || \ - parseOption(argc, \ - argv, \ - DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", \ - &strRes, \ - default) || \ - withDefaults) \ - p->var = strRes - - // clang-format off - DOCTEST_PARSE_STR_OPTION("out", "o", out, ""); - DOCTEST_PARSE_STR_OPTION("order-by", "ob", order_by, "file"); - DOCTEST_PARSE_INT_OPTION("rand-seed", "rs", rand_seed, 0); - - DOCTEST_PARSE_INT_OPTION("first", "f", first, 0); - DOCTEST_PARSE_INT_OPTION("last", "l", last, UINT_MAX); - - DOCTEST_PARSE_INT_OPTION("abort-after", "aa", abort_after, 0); - DOCTEST_PARSE_INT_OPTION("subcase-filter-levels", "scfl", subcase_filter_levels, INT_MAX); - - DOCTEST_PARSE_AS_BOOL_OR_FLAG("success", "s", success, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("case-sensitive", "cs", case_sensitive, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("exit", "e", exit, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("duration", "d", duration, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("minimal", "m", minimal, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("quiet", "q", quiet, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-throw", "nt", no_throw, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-exitcode", "ne", no_exitcode, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-run", "nr", no_run, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-intro", "ni", no_intro, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-version", "nv", no_version, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-colors", "nc", no_colors, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("force-colors", "fc", force_colors, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-breaks", "nb", no_breaks, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skip", "ns", no_skip, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("gnu-file-line", "gfl", gnu_file_line, !bool(DOCTEST_MSVC)); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-path-filenames", "npf", no_path_in_filenames, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-line-numbers", "nln", no_line_numbers, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-debug-output", "ndo", no_debug_output, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skipped-summary", "nss", no_skipped_summary, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-time-in-output", "ntio", no_time_in_output, false); - // clang-format on - - if (withDefaults) { - p->help = false; - p->version = false; - p->count = false; - p->list_test_cases = false; - p->list_test_suites = false; - p->list_reporters = false; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "help") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "h") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "?")) { - p->help = true; - p->exit = true; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "version") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "v")) { - p->version = true; - p->exit = true; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "count") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "c")) { - p->count = true; - p->exit = true; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-cases") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ltc")) { - p->list_test_cases = true; - p->exit = true; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-suites") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lts")) { - p->list_test_suites = true; - p->exit = true; - } - if (parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-reporters") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lr")) { - p->list_reporters = true; - p->exit = true; - } -} - -// allows the user to add procedurally to the filters from the command line -void -Context::addFilter(const char* filter, const char* value) -{ - setOption(filter, value); -} - -// allows the user to clear all filters from the command line -void -Context::clearFilters() -{ - for (auto& curr : p->filters) - curr.clear(); -} - -// allows the user to override procedurally the bool options from the command -// line -void -Context::setOption(const char* option, bool value) -{ - setOption(option, value ? "true" : "false"); -} - -// allows the user to override procedurally the int options from the command -// line -void -Context::setOption(const char* option, int value) -{ - setOption(option, toString(value).c_str()); -} - -// allows the user to override procedurally the string options from the command -// line -void -Context::setOption(const char* option, const char* value) -{ - auto argv = String("-") + option + "=" + value; - auto lvalue = argv.c_str(); - parseArgs(1, &lvalue); -} - -// users should query this in their main() and exit the program if true -bool -Context::shouldExit() -{ - return p->exit; -} - -void -Context::setAsDefaultForAssertsOutOfTestCases() -{ - g_cs = p; -} - -void -Context::setAssertHandler(detail::assert_handler ah) -{ - p->ah = ah; -} - -void -Context::setCout(std::ostream* out) -{ - p->cout = out; -} - -static class DiscardOStream : public std::ostream -{ -private: - class : public std::streambuf - { - private: - // allowing some buffering decreases the amount of calls to overflow - char buf[1024]; - - protected: - std::streamsize xsputn(const char_type*, std::streamsize count) override - { - return count; - } - - int_type overflow(int_type ch) override - { - setp(std::begin(buf), std::end(buf)); - return traits_type::not_eof(ch); - } - } discardBuf; - -public: - DiscardOStream() - : std::ostream(&discardBuf) - { - } -} discardOut; - -// the main function that does all the filtering and test running -int -Context::run() -{ - using namespace detail; - - // save the old context state in case such was setup - for using asserts out - // of a testing context - auto old_cs = g_cs; - // this is the current contest - g_cs = p; - is_running_in_test = true; - - g_no_colors = p->no_colors; - p->resetRunData(); - - std::fstream fstr; - if (p->cout == nullptr) { - if (p->quiet) { - p->cout = &discardOut; - } else if (p->out.size()) { - // to a file if specified - fstr.open(p->out.c_str(), std::fstream::out); - p->cout = &fstr; - } else { - // stdout by default - p->cout = &std::cout; - } - } - - FatalConditionHandler::allocateAltStackMem(); - - auto cleanup_and_return = [&]() { - FatalConditionHandler::freeAltStackMem(); - - if (fstr.is_open()) - fstr.close(); - - // restore context - g_cs = old_cs; - is_running_in_test = false; - - // we have to free the reporters which were allocated when the run started - for (auto& curr : p->reporters_currently_used) - delete curr; - p->reporters_currently_used.clear(); - - if (p->numTestCasesFailed && !p->no_exitcode) - return EXIT_FAILURE; - return EXIT_SUCCESS; - }; - - // setup default reporter if none is given through the command line - if (p->filters[8].empty()) - p->filters[8].push_back("console"); - - // check to see if any of the registered reporters has been selected - for (auto& curr : getReporters()) { - if (matchesAny( - curr.first.second.c_str(), p->filters[8], false, p->case_sensitive)) - p->reporters_currently_used.push_back(curr.second(*g_cs)); - } - - // TODO: check if there is nothing in reporters_currently_used - - // prepend all listeners - for (auto& curr : getListeners()) - p->reporters_currently_used.insert(p->reporters_currently_used.begin(), - curr.second(*g_cs)); - -#ifdef DOCTEST_PLATFORM_WINDOWS - if (isDebuggerActive() && p->no_debug_output == false) - p->reporters_currently_used.push_back(new DebugOutputWindowReporter(*g_cs)); -#endif // DOCTEST_PLATFORM_WINDOWS - - // handle version, help and no_run - if (p->no_run || p->version || p->help || p->list_reporters) { - DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, QueryData()); - - return cleanup_and_return(); - } - - std::vector testArray; - for (auto& curr : getRegisteredTests()) - testArray.push_back(&curr); - p->numTestCases = testArray.size(); - - // sort the collected records - if (!testArray.empty()) { - if (p->order_by.compare("file", true) == 0) { - std::sort(testArray.begin(), testArray.end(), fileOrderComparator); - } else if (p->order_by.compare("suite", true) == 0) { - std::sort(testArray.begin(), testArray.end(), suiteOrderComparator); - } else if (p->order_by.compare("name", true) == 0) { - std::sort(testArray.begin(), testArray.end(), nameOrderComparator); - } else if (p->order_by.compare("rand", true) == 0) { - std::srand(p->rand_seed); - - // random_shuffle implementation - const auto first = &testArray[0]; - for (size_t i = testArray.size() - 1; i > 0; --i) { - int idxToSwap = std::rand() % (i + 1); - - const auto temp = first[i]; - - first[i] = first[idxToSwap]; - first[idxToSwap] = temp; - } - } else if (p->order_by.compare("none", true) == 0) { - // means no sorting - beneficial for death tests which call into the - // executable with a specific test case in mind - we don't want to slow - // down the startup times - } - } - - std::set testSuitesPassingFilt; - - bool query_mode = p->count || p->list_test_cases || p->list_test_suites; - std::vector queryResults; - - if (!query_mode) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_start, DOCTEST_EMPTY); - - // invoke the registered functions if they match the filter criteria (or just - // count them) - for (auto& curr : testArray) { - const auto& tc = *curr; - - bool skip_me = false; - if (tc.m_skip && !p->no_skip) - skip_me = true; - - if (!matchesAny(tc.m_file.c_str(), p->filters[0], true, p->case_sensitive)) - skip_me = true; - if (matchesAny(tc.m_file.c_str(), p->filters[1], false, p->case_sensitive)) - skip_me = true; - if (!matchesAny(tc.m_test_suite, p->filters[2], true, p->case_sensitive)) - skip_me = true; - if (matchesAny(tc.m_test_suite, p->filters[3], false, p->case_sensitive)) - skip_me = true; - if (!matchesAny(tc.m_name, p->filters[4], true, p->case_sensitive)) - skip_me = true; - if (matchesAny(tc.m_name, p->filters[5], false, p->case_sensitive)) - skip_me = true; - - if (!skip_me) - p->numTestCasesPassingFilters++; - - // skip the test if it is not in the execution range - if ((p->last < p->numTestCasesPassingFilters && p->first <= p->last) || - (p->first > p->numTestCasesPassingFilters)) - skip_me = true; - - if (skip_me) { - if (!query_mode) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_skipped, tc); - continue; - } - - // do not execute the test if we are to only count the number of filter - // passing tests - if (p->count) - continue; - - // print the name of the test and don't execute it - if (p->list_test_cases) { - queryResults.push_back(&tc); - continue; - } - - // print the name of the test suite if not done already and don't execute it - if (p->list_test_suites) { - if ((testSuitesPassingFilt.count(tc.m_test_suite) == 0) && - tc.m_test_suite[0] != '\0') { - queryResults.push_back(&tc); - testSuitesPassingFilt.insert(tc.m_test_suite); - p->numTestSuitesPassingFilters++; - } - continue; - } - - // execute the test if it passes all the filtering - { - p->currentTest = &tc; - - p->failure_flags = TestCaseFailureReason::None; - p->seconds = 0; - - // reset atomic counters - p->numAssertsFailedCurrentTest_atomic = 0; - p->numAssertsCurrentTest_atomic = 0; - - p->fullyTraversedSubcases.clear(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc); - - p->timer.start(); - - bool run_test = true; - - do { - // reset some of the fields for subcases (except for the set of fully - // passed ones) - p->reachedLeaf = false; - // May not be empty if previous subcase exited via exception. - p->subcaseStack.clear(); - p->currentSubcaseDepth = 0; - - p->shouldLogCurrentException = true; - - // reset stuff for logging with INFO() - p->stringifiedContexts.clear(); - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - try { -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - // MSVC 2015 diagnoses fatalConditionHandler as unused (because - // reset() is a static method) - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH( - 4101) // unreferenced local variable - FatalConditionHandler fatalConditionHandler; // Handle signals - // execute the test - tc.m_test(); - fatalConditionHandler.reset(); - DOCTEST_MSVC_SUPPRESS_WARNING_POP -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - } catch (const TestFailureException&) { - p->failure_flags |= TestCaseFailureReason::AssertFailure; - } catch (...) { - DOCTEST_ITERATE_THROUGH_REPORTERS( - test_case_exception, { translateActiveException(), false }); - p->failure_flags |= TestCaseFailureReason::Exception; - } -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - - // exit this loop if enough assertions have failed - even if there are - // more subcases - if (p->abort_after > 0 && - p->numAssertsFailed + p->numAssertsFailedCurrentTest_atomic >= - p->abort_after) { - run_test = false; - p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts; - } - - if (!p->nextSubcaseStack.empty() && run_test) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc); - if (p->nextSubcaseStack.empty()) - run_test = false; - } while (run_test); - - p->finalizeTestCaseData(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs); - - p->currentTest = nullptr; - - // stop executing tests if enough assertions have failed - if (p->abort_after > 0 && p->numAssertsFailed >= p->abort_after) - break; - } - } - - if (!query_mode) { - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs); - } else { - QueryData qdata; - qdata.run_stats = g_cs; - qdata.data = queryResults.data(); - qdata.num_data = unsigned(queryResults.size()); - DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata); - } - - return cleanup_and_return(); -} - -DOCTEST_DEFINE_INTERFACE(IReporter) - -int -IReporter::get_num_active_contexts() -{ - return detail::g_infoContexts.size(); -} -const IContextScope* const* -IReporter::get_active_contexts() -{ - return get_num_active_contexts() ? &detail::g_infoContexts[0] : nullptr; -} - -int -IReporter::get_num_stringified_contexts() -{ - return detail::g_cs->stringifiedContexts.size(); -} -const String* -IReporter::get_stringified_contexts() -{ - return get_num_stringified_contexts() ? &detail::g_cs->stringifiedContexts[0] - : nullptr; -} - -namespace detail { -void -registerReporterImpl(const char* name, - int priority, - reporterCreatorFunc c, - bool isReporter) -{ - if (isReporter) - getReporters().insert( - reporterMap::value_type(reporterMap::key_type(priority, name), c)); - else - getListeners().insert( - reporterMap::value_type(reporterMap::key_type(priority, name), c)); -} -} // namespace detail - -} // namespace doctest - -#endif // DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH( - 4007) // 'function' : must be 'attribute' - see issue #182 -int -main(int argc, char** argv) -{ - return doctest::Context(argc, argv).run(); -} -DOCTEST_MSVC_SUPPRESS_WARNING_POP -#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_POP - -#endif // DOCTEST_LIBRARY_IMPLEMENTATION -#endif // DOCTEST_CONFIG_IMPLEMENT diff --git a/test/include/cnpy.hpp b/test/include/cnpy.hpp deleted file mode 100644 index 80cc0096f..000000000 --- a/test/include/cnpy.hpp +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (C) 2011 Carl Rogers -// Released under MIT License -// license available in LICENSE file, or at -// http://www.opensource.org/licenses/mit-license.php - -#ifndef PROXSUITE_TEST_CNPY_HPP -#define PROXSUITE_TEST_CNPY_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define CNPY_FWD(x) static_cast(x) -#define CNPY_ASSERT(Cond) \ - ((Cond) \ - ? (void)0 \ - : ::cnpy::detail::terminate_with_message( \ - "assertion failed: " #Cond, sizeof("assertion failed: " #Cond) - 1)) - -#define CNPY_LITERAL(X) X, sizeof(X) - 1 - -namespace cnpy { -using usize = decltype(sizeof(0)); -namespace detail { - -enum struct LoadVecResult : int -{ - success = 0, - failed_file = 1, - failed_dtype = 2, - failed_ndim = 3, -}; - -enum struct LoadMatResult : int -{ - success = 0, - success_transpose = -1, - - failed_file = 1, - failed_dtype = 2, - failed_ndim = 3, -}; - -void -terminate_with_message(char const* msg, usize len); - -template -struct TypeCode; -template<> -struct TypeCode -{ - static constexpr char value = 'f'; -}; -template<> -struct TypeCode -{ - static constexpr char value = 'f'; -}; - -struct FromByteRepr -{}; -struct FromLiteral -{}; -struct FromRawParts -{}; -struct FromRange -{}; - -struct StrView -{ - char const* data; - usize size; - - StrView(FromRawParts /*tag*/, char const* data_, usize size_) noexcept - : data{ data_ } - , size{ size_ } - { - } - - template - StrView(FromRange /*tag*/, T const& str) noexcept - : data{ str.data() } - , size{ str.size() } - { - } - - template - StrView(FromByteRepr /*tag*/, T const& val) noexcept - : data{ &reinterpret_cast(val) } - , size{ sizeof(T) } - { - } - - template - constexpr StrView(FromLiteral /*tag*/, char const (&literal)[N]) noexcept - : data{ literal } - , size{ N - 1 } - { - } -}; - -} // namespace detail - -namespace detail { -inline auto -BigEndianTest() -> char -{ - int x = 1; - char buf[sizeof(x)]; - std::memcpy(&buf, &x, sizeof(x)); - return buf[0] != 0 ? '<' : '>'; -} -template -auto -create_npy_header(std::vector const& shape) -> std::vector; - -auto -create_npy_header(std::vector const& shape, - usize sizeof_T, - char type_code) -> std::vector; -void -parse_npy_header(FILE* fp, - usize& word_size, - std::vector& shape, - bool& fortran_order); -void -parse_npy_header(unsigned char* buffer, - usize& word_size, - std::vector& shape, - bool& fortran_order); - -void -npy_vsave(char const* fname, - void const* vdata, - usize sizeof_T, - char type_code, - usize const* shape, - usize ndim, - char const* mode); - -auto -npy_vload_vec(std::string const& fname, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows)) -> LoadVecResult; -auto -npy_vload_mat(std::string const& fname, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows, usize cols)) -> LoadMatResult; -} // namespace detail - -template -void -npy_save_mat(std::string const& fname, - Eigen::MatrixBase const& mat, - std::string const& mode = "w") -{ - - auto const& eval = mat.eval(); - usize rowcol[] = { usize(eval.rows()), usize(eval.cols()) }; - - using T = typename D::Scalar; - - detail::npy_vsave( // - fname.c_str(), - eval.data(), - sizeof(T), - detail::TypeCode::value, - &rowcol[0], - 2, - mode.c_str()); -} - -template -void -npy_save_vec(std::string const& fname, - Eigen::MatrixBase const& vec, - const std::string& mode = "w") -{ - - auto const& eval = vec.eval(); - using T = typename D::Scalar; - CNPY_ASSERT(vec.cols() == 1); - usize size = vec.rows(); - - detail::npy_vsave( // - fname.c_str(), - vec.data(), - sizeof(T), - detail::TypeCode::value, - &size, - 1, - mode.c_str()); -} - -template -auto -npy_load_vec(std::string const& fname) -> Eigen::Matrix -{ - using Vec = Eigen::Matrix; - Vec out; - - using Res = detail::LoadVecResult; - using detail::terminate_with_message; - - Res res = detail::npy_vload_vec( // - fname.c_str(), - sizeof(T), - std::addressof(out), - +[](void* vec) -> void* { return static_cast(vec)->data(); }, - +[](void* vec, usize rows) -> void { - static_cast(vec)->resize(Eigen::Index(rows), 1); - }); - - if (res == Res::failed_file) { - terminate_with_message(CNPY_LITERAL("libnpy: could not load file")); - } - if (res == Res::failed_dtype) { - terminate_with_message(CNPY_LITERAL("libnpy: mismatching scalar type")); - } - if (res == Res::failed_ndim) { - char buf[4096]; - usize len = usize( - std::snprintf(&buf[0], - 4096, - "libnpy: wrong number of dimensions. expected %zu, got %zu", - usize{ 2 }, - usize(res) - usize(Res::failed_ndim))); - CNPY_ASSERT(len + 1 < 4096); - terminate_with_message(&buf[0], len); - } - return out; -} - -template -auto -npy_load_mat(std::string const& fname) - -> Eigen::Matrix -{ - using Mat = Eigen::Matrix; - Mat out; - - using Res = detail::LoadMatResult; - using detail::terminate_with_message; - - Res res = detail::npy_vload_mat( // - fname.c_str(), - sizeof(T), - std::addressof(out), - +[](void* mat) -> void* { return static_cast(mat)->data(); }, - +[](void* mat, usize rows, usize cols) -> void { - static_cast(mat)->resize(Eigen::Index(rows), Eigen::Index(cols)); - }); - - if (res == Res::failed_file) { - terminate_with_message(CNPY_LITERAL("libnpy: could not load file")); - } - if (res == Res::failed_dtype) { - terminate_with_message(CNPY_LITERAL("libnpy: mismatching scalar type")); - } - if (res == Res::failed_ndim) { - char buf[4096]; - usize len = usize( - std::snprintf(&buf[0], - 4096, - "libnpy: wrong number of dimensions. expected %zu, got %zu", - usize{ 2 }, - usize(res) - usize(Res::failed_ndim))); - CNPY_ASSERT(len + 1 < 4096); - terminate_with_message(&buf[0], len); - } - if (res == Res::success_transpose) { - auto rowmajor = Eigen::Map< // - Eigen::Matrix< // - T, // - Eigen::Dynamic, // - Eigen::Dynamic, // - Eigen::RowMajor // - > // - >{ - out.data(), - out.rows(), - out.cols(), - }; - Mat tmp = rowmajor; - out = tmp; - } - return out; -} - -extern template auto -npy_load_mat(std::string const&) - -> Eigen::Matrix; -extern template auto -npy_load_mat(std::string const&) - -> Eigen::Matrix; - -extern template auto -npy_load_vec(std::string const&) - -> Eigen::Matrix; -extern template auto -npy_load_vec(std::string const&) - -> Eigen::Matrix; - -} // namespace cnpy - -#endif /* end of include guard PROXSUITE_TEST_CNPY_HPP */ diff --git a/test/include/utils.hpp b/test/include/utils.hpp deleted file mode 100644 index 490d0622a..000000000 --- a/test/include/utils.hpp +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#include "util_f32.hpp" -#include "util_f64.hpp" diff --git a/test/packaging/cmake/CMakeLists.txt b/test/packaging/cmake/CMakeLists.txt index 4699225ca..8180b1d97 100644 --- a/test/packaging/cmake/CMakeLists.txt +++ b/test/packaging/cmake/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.22...4.1) -project(ExternalLib CXX) -find_package(proxsuite REQUIRED) -set(CMAKE_CXX_STANDARD 17) +project(myproject) +find_package(proxsuite CONFIG REQUIRED COMPONENTS proxsuite vectorized) add_executable(run-proxqp ${CMAKE_CURRENT_LIST_DIR}/../src/run-proxqp.cpp) -target_link_libraries(run-proxqp PUBLIC proxsuite::proxsuite) +target_link_libraries(run-proxqp PUBLIC proxsuite::proxsuite-vectorized) diff --git a/test/python/CMakeLists.txt b/test/python/CMakeLists.txt new file mode 100644 index 000000000..bac04a0e7 --- /dev/null +++ b/test/python/CMakeLists.txt @@ -0,0 +1,28 @@ +function(proxsuite_python_add_test name) + add_test( + NAME proxsuite-python.${name} + COMMAND $ ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py + ) + set_tests_properties( + proxsuite-python.${name} + PROPERTIES + ENVIRONMENT "PYTHONPATH=$/.." + DEPENDS proxsuite_pywrap + LABELS "python" + ) +endfunction() + +proxsuite_python_add_test(test_cvxpy) +proxsuite_python_add_test(test_dense_qp_solve) +proxsuite_python_add_test(test_dense_qp_wrapper) + +if(BUILD_WITH_OPENMP_SUPPORT) + proxsuite_python_add_test(test_parallel_qp_solve) +endif() + +if(BUILD_WITH_SERIALIZATION) + proxsuite_python_add_test(test_serialization) +endif() + +proxsuite_python_add_test(test_sparse_qp_solve) +proxsuite_python_add_test(test_sparse_qp_wrapper) diff --git a/test/src/cvxpy.py b/test/python/test_cvxpy.py similarity index 100% rename from test/src/cvxpy.py rename to test/python/test_cvxpy.py diff --git a/test/src/dense_qp_solve.py b/test/python/test_dense_qp_solve.py similarity index 100% rename from test/src/dense_qp_solve.py rename to test/python/test_dense_qp_solve.py diff --git a/test/src/dense_qp_wrapper.py b/test/python/test_dense_qp_wrapper.py similarity index 100% rename from test/src/dense_qp_wrapper.py rename to test/python/test_dense_qp_wrapper.py diff --git a/test/src/parallel_qp_solve.py b/test/python/test_parallel_qp_solve.py similarity index 100% rename from test/src/parallel_qp_solve.py rename to test/python/test_parallel_qp_solve.py diff --git a/test/src/serialization.py b/test/python/test_serialization.py similarity index 100% rename from test/src/serialization.py rename to test/python/test_serialization.py diff --git a/test/src/sparse_qp_solve.py b/test/python/test_sparse_qp_solve.py similarity index 100% rename from test/src/sparse_qp_solve.py rename to test/python/test_sparse_qp_solve.py diff --git a/test/src/sparse_qp_wrapper.py b/test/python/test_sparse_qp_wrapper.py similarity index 100% rename from test/src/sparse_qp_wrapper.py rename to test/python/test_sparse_qp_wrapper.py diff --git a/test/src/backward.cpp b/test/src/backward.cpp deleted file mode 100644 index 34dcf2b72..000000000 --- a/test/src/backward.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -namespace backward { -SignalHandling const sh; -} // namespace backward diff --git a/test/src/cnpy.cpp b/test/src/cnpy.cpp deleted file mode 100644 index 0f0ac2562..000000000 --- a/test/src/cnpy.cpp +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (C) 2011 Carl Rogers -// Released under MIT License -// license available in LICENSE file, or at -// http://www.opensource.org/licenses/mit-license.php - -#include "cnpy.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace cnpy { -namespace detail { - -struct File -{ - File(File&& rhs) noexcept - : ptr(rhs.ptr) - { - rhs.ptr = nullptr; - } - File(File const&) = delete; - auto operator=(File&& rhs) noexcept -> File& - { - - // put rhs in temporary to handle aliasing - File tmp = CNPY_FWD(rhs); - - // clear current File - { - File tmp2 = static_cast(*this); - } - - ptr = tmp.ptr; - tmp.ptr = nullptr; - - return *this; - } - auto operator=(File const&) -> File& = delete; - - std::FILE* ptr; - File(char const* fname, char const* mode) - : ptr{ std::fopen(fname, mode) } - { - } - ~File() noexcept - { - if (ptr != nullptr) { - std::fclose(ptr); - } - } -}; - -void -terminate_with_message(char const* msg, usize len) -{ - std::fwrite(msg, 1, len, stderr); - std::fputc('\n', stderr); - std::terminate(); -} - -void -append_bytes(std::vector& lhs, StrView rhs) -{ - usize old_size = lhs.size(); - lhs.resize(old_size + rhs.size); - std::memcpy(lhs.data() + old_size, rhs.data, rhs.size); -} -void -npy_vsave(char const* fname, - void const* vdata, - usize sizeof_T, - char type_code, - usize const* shape, - usize ndim, - char const* mode) -{ - - std::FILE* fp{}; - std::vector - true_data_shape; // if appending, the shape of existing + new data - - if (std::strcmp(mode, "a") == 0) { - fp = std::fopen(fname, "r+b"); // NOLINT - } - - if (fp != nullptr) { - // file exists. we need to append to it. read the header, modify the array - // size - usize word_size = 0; - bool fortran_order = false; - detail::parse_npy_header(fp, word_size, true_data_shape, fortran_order); - CNPY_ASSERT(!fortran_order); - - if (word_size != sizeof_T) { - std::fprintf( // NOLINT - stderr, - "libnpy error: %s has word size %zu but npy_save is appending data " - "sized %zu\n", - fname, - word_size, - sizeof_T); - - CNPY_ASSERT(word_size == sizeof_T); - } - if (true_data_shape.size() != ndim) { - std::fprintf( // NOLINT - stderr, - "libnpy error: npy_save attempting to append misdimensioned data to " - "%s\n", - fname); - - CNPY_ASSERT(true_data_shape.size() != ndim); - } - - for (usize i = 1; i < ndim; i++) { - if (shape[i] != true_data_shape[i]) { - std::fprintf( // NOLINT - stderr, - "libnpy error: npy_save attempting to append misshaped data to " - "%s\n", - fname); - - CNPY_ASSERT(shape[i] == true_data_shape[i]); - } - } - true_data_shape[0] += shape[0]; - } else { - fp = std::fopen(fname, "wb"); // NOLINT - true_data_shape = {}; - true_data_shape.insert(true_data_shape.end(), shape, shape + ndim); - } - - std::vector header = - detail::create_npy_header(true_data_shape, sizeof_T, type_code); - usize nels = - usize(std::accumulate(shape, shape + ndim, 1, std::multiplies())); - - std::fseek(fp, 0, SEEK_SET); - std::fwrite(&header[0], sizeof(char), header.size(), fp); - std::fseek(fp, 0, SEEK_END); - std::fwrite(vdata, sizeof_T, nels, fp); - std::fclose(fp); -} -auto -create_npy_header(std::vector const& shape, - usize sizeof_T, - char type_code) -> std::vector -{ - - std::vector dict; - detail::append_bytes(dict, { FromLiteral{}, "{'descr': '" }); - detail::append_bytes(dict, { FromByteRepr{}, detail::BigEndianTest() }); - detail::append_bytes(dict, { FromByteRepr{}, type_code }); - { - auto str = std::to_string(sizeof_T); - detail::append_bytes(dict, { FromRange{}, std::to_string(sizeof_T) }); - } - detail::append_bytes( - dict, { FromLiteral{}, "', 'fortran_order': False, 'shape': (" }); - detail::append_bytes(dict, { FromRange{}, std::to_string(shape[0]) }); - for (usize i = 1; i < shape.size(); i++) { - detail::append_bytes(dict, { FromLiteral{}, ", " }); - detail::append_bytes(dict, { FromRange{}, std::to_string(shape[i]) }); - } - if (shape.size() == 1) { - detail::append_bytes(dict, { FromLiteral{}, ", " }); - } - detail::append_bytes(dict, { FromLiteral{}, "), }" }); - - // pad with spaces so that preamble+dict is modulo 16 bytes. preamble is 10 - // bytes. dict needs to end with \n - usize remainder = 16 - (10 + dict.size()) % 16; - dict.insert(dict.end(), remainder, ' '); - dict.back() = '\n'; - - std::vector header; - detail::append_bytes(header, { FromLiteral{}, "\x93NUMPY\x01\x00" }); - detail::append_bytes(header, { FromByteRepr{}, uint16_t(dict.size()) }); - detail::append_bytes(header, { FromRange{}, dict }); - - return header; -} - -void -parse_npy_header(std::FILE* fp, - usize& word_size, - std::vector& shape, - bool& fortran_order) -{ - char buffer[256]; - CNPY_ASSERT(std::fread(&buffer[0], sizeof(char), 11, fp) == 11); - std::string header = std::fgets(&buffer[0], 256, fp); - CNPY_ASSERT(header[header.size() - 1] == '\n'); - - usize loc1 = 0; - usize loc2 = 0; - - // fortran order - loc1 = header.find("fortran_order"); - CNPY_ASSERT( - !(loc1 == std::string::npos) && - "parse_npy_header: failed to find header keyword: 'fortran_order'"); - loc1 += 16; - fortran_order = (header.substr(loc1, 4) == "True"); - - // shape - loc1 = header.find('('); - loc2 = header.find(')'); - CNPY_ASSERT(!(loc1 == std::string::npos || loc2 == std::string::npos) && - "parse_npy_header: failed to find header keyword: '(' or ')'"); - - std::regex num_regex("[0-9][0-9]*"); - std::smatch sm; - shape.clear(); - - std::string str_shape = header.substr(loc1 + 1, loc2 - loc1 - 1); - while (std::regex_search(str_shape, sm, num_regex)) { - shape.push_back(std::stoul(sm[0].str())); - str_shape = sm.suffix().str(); - } - - // endian, word size, data type - // byte order code | stands for not applicable. - // not sure when this applies except for byte array - loc1 = header.find("descr"); - CNPY_ASSERT(!(loc1 == std::string::npos) && - "parse_npy_header: failed to find header keyword: 'descr'"); - loc1 += 9; - bool littleEndian = (header[loc1] == '<' || header[loc1] == '|'); - CNPY_ASSERT(littleEndian); - - char type = header[loc1 + 1]; - CNPY_ASSERT(type == 'f'); - - std::string str_ws = header.substr(loc1 + 2); - loc2 = str_ws.find('\''); - word_size = std::stoul(str_ws.substr(0, loc2)); -} - -auto -load_npy_vec(std::FILE* fp, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows)) -> LoadVecResult -{ - std::vector shape; - - usize word_size{}; - bool fortran_order{}; - - cnpy::detail::parse_npy_header(fp, word_size, shape, fortran_order); - if (word_size != sizeof_T) { - return LoadVecResult::failed_dtype; - } - if (shape.size() != 1) { - return LoadVecResult(int(LoadVecResult::failed_ndim) + shape.size()); - } - - usize nbytes = word_size * shape[0]; - resize(vec, shape[0]); - - CNPY_ASSERT(std::fread(ptr(vec), 1, nbytes, fp) == nbytes && - "load_the_npy_file: failed fread"); - return LoadVecResult::success; -} - -auto -load_npy_mat(std::FILE* fp, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows, usize cols)) -> LoadMatResult -{ - std::vector shape; - - usize word_size{}; - bool fortran_order{}; - - cnpy::detail::parse_npy_header(fp, word_size, shape, fortran_order); - if (word_size != sizeof_T) { - return LoadMatResult::failed_dtype; - } - if (shape.size() != 2) { - return LoadMatResult(int(LoadMatResult::failed_ndim) + shape.size()); - } - usize nbytes = word_size * shape[0] * shape[1]; - resize(vec, shape[0], shape[1]); - - CNPY_ASSERT(std::fread(ptr(vec), 1, nbytes, fp) == nbytes && - "load_the_npy_file: failed fread"); - - if (fortran_order) { - return LoadMatResult::success; - } else { - return LoadMatResult::success_transpose; - } -} - -auto -npy_vload_vec(std::string const& fname, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows)) -> LoadVecResult -{ - File fp{ fname.c_str(), "rb" }; // NOLINT - - CNPY_ASSERT(fp.ptr != nullptr); - return detail::load_npy_vec(fp.ptr, sizeof_T, vec, ptr, resize); -} - -auto -npy_vload_mat(std::string const& fname, - usize sizeof_T, - void* vec, - void* (*ptr)(void*), - void (*resize)(void*, usize rows, usize cols)) -> LoadMatResult -{ - File fp{ fname.c_str(), "rb" }; // NOLINT - - CNPY_ASSERT(fp.ptr != nullptr); - return detail::load_npy_mat(fp.ptr, sizeof_T, vec, ptr, resize); -} -} // namespace detail - -template auto -npy_load_mat(std::string const&) - -> Eigen::Matrix; -template auto -npy_load_mat(std::string const&) - -> Eigen::Matrix; - -template auto -npy_load_vec(std::string const&) - -> Eigen::Matrix; -template auto -npy_load_vec(std::string const&) - -> Eigen::Matrix; -} // namespace cnpy