Repository navigation
Module test hardening: tests/<lib>/ suites, conversion module, export fixes - #5
Draft
ZheFeng7110 wants to merge 9 commits into
Draft
ZheFeng7110 wants to merge 9 commits into
ZheFeng7110 wants to merge 9 commits into
Conversation
… transform_reduce include guard The prefix heuristic saw no headers for conversion (its headers sit at the top of boost/), so the library had no module and its casts were exported by range and graph. EXTRA_HEADERS gives it its three headers, ownership and include edges; pointer_cast.hpp is smart_ptr's so conversion does not claim smart_ptr's names. range, graph and statechart now import the conversion module instead of re-exporting the casts. core's header set adds boost/core/detail/string_view.hpp, the only header of the documented boost::core::string_view; no module exported the alias before (json exported only basic_string_view). patches/algorithm.patch: transform_inclusive_scan.hpp reused the include guard of transform_reduce.hpp, so transform_reduce was missing from the algorithm module and from any TU that includes both headers. mcpp.toml also gains [dev-dependencies] compat.doctest and the [test] discover globs of the test hardening.
…octest suites Each library of the hardening gets tests/<lib>/ (smoke.cpp is the former tests/<lib>.cpp); examples*.cpp port the official examples, api*.cpp the documented components, custom_types.cpp the user-type suite, and include_*.cpp the macro API as plain #include TUs. coverage.toml maps every example and documentation snippet of the 1.92.0 release to a test case or a reason (tools/ci/test_coverage.py scan/link/check). First libraries: algorithm, any, callable_traits, charconv, circular_buffer, compat, conversion, core, crc, dynamic_bitset, variant2. tests/dll/ and tests/test/utf/ are test projects of their own (plugins; the compiled Boost.Test form), excluded from the root [test] discover.
…container_hash, convert The converter headers (stream, lexical_cast, strtol, printf, charconv) are not self-contained, so the standalone-compile filter had dropped them and the convert module exported convert() without a converter. They now follow <boost/convert.hpp> in an explicit GMF ([convert] in export_policy.toml); spirit.hpp stays header-only (it would make Spirit's whole surface convert's). Four boost::parameter internals that graph and heap exported move to convert, which now reaches Boost.Parameter first. patches/convert.patch makes boost::throw_on_failure inline constexpr: as a namespace-scope const object it had internal linkage and could not be exported. New suites: uuid (every documented component), container_hash (official examples; described classes through the module and as headers), convert (examples grouped by the default converter they define, user converters).
…l examples patches/bimap.patch turns the anonymous-namespace references of boost/bimap/support/lambda.hpp into inline constexpr (as lambda's _1), so the bimap module exports them. The examples run as doctest cases whose output must equal the original program's, built from upstream/boost alone with clang++; examples that combine bimap with assign, lambda, property_map, range or serialization use those modules, and the foreach / typeof / xpressive ones are a pure-include TU. api.cpp covers the inline tutorial code, custom_types.cpp user keys, comparators, hashers, tags and info payloads.
…an output oracle bloom: the tutorial section by section, every subfilter, user hashers and allocator; genome.cpp runs the k-mer example on a FASTA fixture instead of the 140 MB download. describe: all non-fmt examples (the json and serialization ones with the BOOST_DESCRIBE_* macros included before the module imports) and the class/enum pages over user types. container_hash: every customization point (hash_value by ADL, boost::hash specialization, is_range / is_tuple_like / is_unordered_range). Ported example programs compare their output with an oracle: the same ported code compiled from upstream/boost headers alone with clang++. test_coverage.py link also maps <page>#example_<stem> sections to the example's case.
…ch kind, user types/algorithms/flavors)
…isitation, stats as headers, user types)
patches/container.patch: boost/container/pmr/devector.hpp reused the include guard of pmr/vector.hpp, so the module (whose GMF includes devector first) never exported boost::container::pmr::vector / vector_of. The 19 examples (output oracle), the documentation's inline code (hub, devector, stable_vector, pmr, const-reference parameters, null iterators), user types, options and a user memory_resource. doc_extended_allocators is recorded as a gap: the package does not build the dlmalloc TUs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
.agents/docs/2026-11-09-module-test-hardening-design.md(draft: work in progress, opened to run CI on all hosts).Wrapper changes
mcpplibs.mwrap.boost.conversion). Its headers sit at the top ofboost/, so the prefix heuristic saw no headers and the casts were exported byrange/graph.EXTRA_HEADERSintools/boost_common.pygives it its header set, ownership and include edges;pointer_cast.hppis owned bysmart_ptr.boost::core::string_viewis exported by core (its only header isboost/core/detail/string_view.hpp; no module exported the alias before).cnv::cstream,cnv::lexical_cast,cnv::strtol,cnv::printf,cnv::charconv): the converter headers are not self-contained and had been dropped by the standalone-compile filter.algorithm.patch(upstream include-guard bug hidtransform_reduce),convert.patch(throw_on_failurehad internal linkage),bimap.patch(_key/_datawere TU-local).Tests
tests/<lib>/for 34 libraries; doctest from mcpp-index (compat.doctest,[dev-dependencies]).coverage.tomlper library maps every example and documentation snippet of the 1.92.0 release to a test case or a reason;tools/ci/test_coverage.py scan|link|check.tests/dll/andtests/test/utf/are test projects of their own.Done so far: algorithm, any, bimap, bloom, callable_traits, charconv, circular_buffer, compat, container_hash, conversion, convert, core, crc, describe, dynamic_bitset, uuid, variant2. Remaining libraries and the CI steps for the sub-projects and the coverage check follow in this PR.