Files
OrcaSlicer/tests
Tommaso BianchiandClaude Opus 5 1633005bba Make this fork actually compile: first green Catch2 run in its history
206/206 targets built, 139 [CadDocument] cases / 1960 assertions passing —
identical to snaporca's suite. Until now this fork had never compiled at all:
CMake died at configure, so the M1-M8 "suite green" figures were snaporca's
alone and the ports rested on patch-apply plus byte-identical sources.

Three fixes here; the deps work is in the orcacad-deps image (see below).

1. kernel-test.sh mounts deps_src. pybind11 is vendored in-tree and CMakeLists
   requires its headers; without the mount the container fell back to the
   image's baked tree, which predates it.

2. tests/libslic3r/test_3mf.cpp: repair the upstream-merge conflict resolution.
   Resolving it as a union dropped the three closing braces of our SCENARIO, so
   upstream's SCENARIO opened inside ours ("a function-definition is not allowed
   here", plus 12 cascading catch2 registry errors). Restored from the pre-merge
   file; whole-file brace balance is now 0 and the case count reconciles as
   5 (ours) + 8 (upstream) - 3 (shared) = 10, with both CAD recipe tests intact.

3. tests/libslic3r/test_caddocument.cpp: REQUIRE_CONTAINS / CHECK_CONTAINS.
   Catch2 v2 (snaporca) spells substring-match Matchers::Contains; v3 (here)
   spells it ContainsSubstring and gives Contains an incompatible meaning,
   range-contains-ELEMENT, which fails to COMPILE against std::string. Four
   sites had been hand-adapted long ago, but M2-M8 kept porting in un-adapted
   Contains calls — 16 of them — and nothing objected because nothing compiled.
   Both forks now use the same find()-based macros, so the assertion lines are
   byte-identical again and future format-patch ports carry across unchanged.
   Five orphaned `using Catch::Matchers::Contains;` lines removed with them.

The deps gap that blocked configure needed five additions on top of
snaporca-deps, built into image orcacad-deps: Eigen 5.0.1, Python 3.12.13
(exact, with Development.Embed), wxWidgets 3.3.2 (was 3.1.5), CGAL 5.6.3
(was 5.4 — mainline's own MeshBoolean.cpp calls CGAL::parameters::default_values,
added in 5.5), plus the pybind11 mount above. OCCT V7_6_0, Boost 1.84.0 and
OpenCV 4.6.0 are pinned identically in both forks and were reused as-is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 13:46:07 +02:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.