Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ substantial implementation so its maintenance value and scope can be agreed upon
just ci
```

`just check` is the fast, non-mutating source and tooling gate. `just ci` adds the supported build and 11-test smoke
`just check` is the fast, non-mutating source and tooling gate. `just ci` adds the supported build and 22-test smoke
suite. When changing C++ behavior, also run `just clang-tidy` with the pinned LLVM 22 toolchain and review its
advisory diagnostics.

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,10 @@ If you do not have GraphViz installed, set this option to **NO**

## Testing

Run `just build`; it delegates to `./scripts/build.sh`, builds the test target, and executes the eleven supported smoke
tests. These include focused doctest runs for the Boost.Compat `function_ref` migration and the causal-foliation
construction code used as a regression oracle. Run `just ci` for the complete local validation gate.
Run `just build`; it delegates to `./scripts/build.sh`, builds the test target, and executes the 22 supported smoke tests.
These include two focused doctest runs for the Boost.Compat `function_ref` migration and causal-foliation construction,
plus 20 executable integration tests covering normal CLI use and invalid-boundary rejection. Run `just ci` for the
complete local validation gate.

The doctest executable can also be run directly:

Expand Down
32 changes: 32 additions & 0 deletions cmake/ExpectCommandFailure.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
if(NOT DEFINED TEST_EXECUTABLE OR NOT EXISTS "${TEST_EXECUTABLE}")
message(FATAL_ERROR "TEST_EXECUTABLE must name a built executable")
endif()

if(NOT DEFINED EXPECTED_REGEX OR EXPECTED_REGEX STREQUAL "")
message(FATAL_ERROR "EXPECTED_REGEX must describe the expected diagnostic")
endif()

execute_process(
COMMAND "${TEST_EXECUTABLE}" ${TEST_ARGUMENTS}
RESULT_VARIABLE test_result
OUTPUT_VARIABLE test_output
ERROR_VARIABLE test_error)

if(NOT test_result MATCHES "^[0-9]+$")
message(
FATAL_ERROR
"Command did not exit normally (${test_result}):\n${test_output}\n${test_error}")
endif()

if(test_result EQUAL 0)
message(
FATAL_ERROR
"Command unexpectedly succeeded:\n${test_output}\n${test_error}")
endif()

set(combined_output "${test_output}\n${test_error}")
if(NOT combined_output MATCHES "${EXPECTED_REGEX}")
message(
FATAL_ERROR
"Command failed without the expected diagnostic '${EXPECTED_REGEX}':\n${combined_output}")
endif()
10 changes: 3 additions & 7 deletions include/Apply_move.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
* \param t_move The Pachner move
* \return The expected or unexpected result in a std::expected<T,E>
*/
template <typename ManifoldType,
typename ExpectedType = std::expected<ManifoldType, std::string>,
typename FunctionType =
boost::compat::function_ref<ExpectedType(ManifoldType&)>>
auto constexpr apply_move(ManifoldType&& t_manifold, FunctionType t_move)
template <typename ManifoldType, typename FunctionType>
auto constexpr apply_move(ManifoldType const& t_manifold, FunctionType t_move)
-> decltype(auto)
{
if (auto result = std::invoke(t_move, std::forward<ManifoldType>(t_manifold));
result.has_value())
if (auto result = std::invoke(t_move, t_manifold); result.has_value())
{
return result;
}
Expand Down
Loading
Loading