Skip to content

Replace MD5-based file creation tests with structural output validation#12

Closed
ifilot wants to merge 1 commit intodevelopfrom
codex/add-robust-file-result-verification
Closed

Replace MD5-based file creation tests with structural output validation#12
ifilot wants to merge 1 commit intodevelopfrom
codex/add-robust-file-result-verification

Conversation

@ifilot
Copy link
Owner

@ifilot ifilot commented Mar 7, 2026

Motivation

  • MD5 checksums are fragile when switching architectures and introduce an external OpenSSL/test dependency, so file-validation should be resilient and architecture-independent.
  • The goal is to validate generated OBJ/PLY/STL outputs by their structure and content counts rather than platform-specific hashes.

Description

  • Rewrote TestFileCreation to remove MD5 hashing and instead generate a mesh reference and perform structural checks for each output format (src/test/test_file_creation.h, src/test/test_file_creation.cpp).
  • Added a MeshReference type and per-format assertion helpers that validate: OBJ v/vn/f record counts, PLY header fields and binary payload size, and STL triangle count and expected binary size.
  • Removed the OpenSSL/libcrypto test dependency and references by dropping pkg_check_modules(CRYPTO ...) and PkgConfig::CRYPTO from src/test/CMakeLists.txt, and removed OpenSSL from the installation prerequisites in docs/installation.rst.
  • Replaced MD5-specific headers and code (<openssl/...>, MD5 helper) with standard includes (<cstdint>, <filesystem>, <string>) and clearer file-shape assertions.

Testing

  • Verified no remaining MD5/OpenSSL/Crypto references with a repository search using rg which returned no matches in the updated test/docs files (success).
  • Attempted a CMake configuration with cmake -S src -B build as an automated build check, which could not complete in this environment because Boost development components (iostreams, filesystem) were not available (configuration failed).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant