Skip to content

Move MRMeshBoolean gtests to MRTest project#6132

Merged
Fedr merged 2 commits into
masterfrom
move-meshboolean-tests-to-mrtest
May 21, 2026
Merged

Move MRMeshBoolean gtests to MRTest project#6132
Fedr merged 2 commits into
masterfrom
move-meshboolean-tests-to-mrtest

Conversation

@Fedr
Copy link
Copy Markdown
Contributor

@Fedr Fedr commented May 20, 2026

Summary

  • Move the two TEST(MRMesh, ...) cases out of source/MRMesh/MRMeshBoolean.cpp into a new source/MRTest/MRMeshBooleanTests.cpp:
    • MRMesh, MeshBoolean
    • MRMesh, BooleanMultipleEdgePropogationSort
  • Compare with source/MRTestC2/MRMeshBoolean.c. Of the three C tests:
    • testMeshBoolean — duplicate of the moved C++ MeshBoolean (same torus sweep, only minor differences in which operations are checked)
    • testBooleanMultipleEdgePropogationSort — duplicate of the moved C++ BooleanMultipleEdgePropogationSort
    • testBooleanMappernot duplicated in C++. Ported into the new file as TEST(MRMesh, BooleanResultMapper) covering BooleanResultMapper::map, newFaces, and the getMaps accessors with the same hardcoded expected sizes/counts.
  • Drop now-unused includes from MRMeshBoolean.cpp (MRGTest, MRTorus, MRCube, MRMatrix3).
  • Add MRMeshBooleanTests.cpp to source/MRTest/MRTest.vcxproj and .vcxproj.filters (CMake side picks it up via file(GLOB SOURCES "*.cpp") automatically).

Test plan

  • MRTest builds on every platform (Windows MSBuild + CMake, Linux GCC/Clang x64/arm64, macOS x64/arm64, Emscripten st/mt/mt-64, vcpkg) — all build-test jobs green
  • All three tests run and pass — confirmed in the emscripten-singlethreaded job log:
    • [ OK ] MRMesh.MeshBoolean (267 ms)
    • [ OK ] MRMesh.BooleanMultipleEdgePropogationSort (4 ms)
    • [ OK ] MRMesh.BooleanResultMapper (2 ms)
  • MRMesh library still builds with the trimmed include list (MRMesh.dll / libMRMesh.so link without errors)
  • MRTestC2 continues to build (no tests were removed from it by this PR)

Fedr added 2 commits May 21, 2026 00:34
Move the two gtest cases from source/MRMesh/MRMeshBoolean.cpp
(MeshBoolean, BooleanMultipleEdgePropogationSort) into a new file
source/MRTest/MRMeshBooleanTests.cpp.

Also port testBooleanMapper from source/MRTestC2/MRMeshBoolean.c
(the only non-duplicate among the C tests) as a new C++ gtest
"MRMesh, BooleanResultMapper" in the same file.

Drop now-unused includes from MRMeshBoolean.cpp (MRGTest, MRTorus,
MRCube, MRMatrix3).
@Fedr Fedr requested a review from Grantim May 21, 2026 08:56
@Fedr Fedr merged commit 22d8974 into master May 21, 2026
39 checks passed
@Fedr Fedr deleted the move-meshboolean-tests-to-mrtest branch May 21, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants