|
nxpp
Header-only graph utilities on top of Boost Graph Library
|
This document explains the verification layers used in nxpp, how to run them, and what each one is meant to prove.
Use the repository README.md for the project overview and quick navigation. Use this file when you want the repository's testing story in one place.
Generated-reference companion:
Use the generated reference for declaration-level API lookup. Use this guide for the verification-layer story, commands, and scope of each test path.
The repository intentionally uses several different verification paths instead of one giant test command.
The clearest mental model is:
snippet/ is the curated example-plus-parity layertests/ is the formal assertion-based regression suitescripts/unix/run_external_consumer_tests.sh is the end-to-end external-consumer integration layertest_large_graph_compare.cpp is the separate scale-oriented raw-Boost comparison pathwasm/ is the experimental Emscripten portability layer| Layer | Main artifacts | Primary purpose | What it is not |
|---|---|---|---|
| Showcase programs | main_boost.cpp, main_nxpp.cpp, main.py | Demonstrate usage and the wrapper-vs-reference story | Not the formal suite |
| Snippet parity / regression | snippet/, scripts/unix/test_single_snippet.sh, snippet-review.yml | Keep curated examples aligned across implementations | Not exhaustive assertion-based testing |
| Formal assertion-based tests | tests/test_*.cpp, scripts/unix/run_tests.sh, compatibility.yml | Catch regressions and enforce behavior | Not the single-header or large-graph path |
| External-consumer integration tests | tests/external_consumers/, scripts/unix/run_external_consumer_tests.sh, external-consumers.yml | Validate real external-consumer integration modes end-to-end | Not a replacement for formal assertion tests |
| Single-header verification | scripts/unix/build_single_header.sh, scripts/unix/run_single_header_tests.sh, single-header.yml, release.yml | Validate the generated standalone header through a mix of smoke checks and deeper standalone-header suite runs | Not a replacement for the modular formal suite |
| Large-graph raw-Boost comparison | tests/test_large_graph_compare.cpp, scripts/unix/run_large_graph_compare.sh, compatibility.yml | Cross-check nxpp against raw Boost on larger deterministic graphs in a dedicated heavy CI lane | Not a benchmark or a proof of full equivalence |
| Experimental wasm path | wasm/, wasm/scripts/build_wasm_node_module.sh, wasm/scripts/run_wasm_tests.sh, wasm-experimental.yml | Verify Emscripten + Node.js portability for Node-facing API compilation and formal assertions | Not full JS bindings or official full-support guarantee |
Files:
Purpose:
What they are not:
Relevant files:
snippet/scripts/unix/test_single_snippet.shscripts/unix/log_snippet_folder.sh.github/workflows/snippet-review.ymlPurpose:
nxpp snippets against their companion reference snippetsHow to read this layer:
snippet/ sits between showcase code and the formal test suiteWhat it is not:
Entry point:
Main test files:
tests/test_core.cpptests/test_attributes.cpptests/test_edge_cases.cpptests/test_flow.cpptests/test_remove_node.cpptests/test_multigraph.cpp.github/workflows/compatibility.ymlPurpose:
remove_node() invariantsWhat it is not:
Build command:
Test command:
Relevant files:
scripts/unix/build_single_header.shscripts/unix/run_single_header_tests.sh.github/workflows/single-header.ymlPurpose:
dist/nxpp.hpp from the modular public headersWhat the dedicated CI workflow now does:
single-header.yml rebuilds dist/nxpp.hppbash scripts/unix/run_single_header_tests.shWhere the deeper standalone-header suite does run:
bash scripts/unix/run_single_header_tests.shrelease.yml before the release asset is publishedrelease.yml the release path now also checks repository-hosted package metadata for version drift through python3 scripts/check_release_metadata_versions.pyWhat it is not:
Command:
Relevant files:
scripts/unix/run_external_consumer_tests.shtests/external_consumers/.github/workflows/external-consumers.ymlPurpose:
Current required coverage:
add_subdirectory(nxpp)find_package(nxpp CONFIG REQUIRED)Optional local coverage:
NXPP_EXTERNAL_CONAN=1What it is not:
Command:
Relevant files:
tests/test_large_graph_compare.cppscripts/unix/run_large_graph_compare.sh.github/workflows/compatibility.ymlPurpose:
nxpp results directly against raw Boost on the same graphsCurrent coverage includes:
remove_node() stateboost::listS / boost::listS and boost::listS / boost::vecSWhat it is not:
nxpp can never diverge from Boostscripts/unix/run_tests.shCommands:
Include large-graph comparison coverage too:
Relevant files:
wasm/node/nxpp_bindings.cppwasm/test/node_api_contract_test.mjswasm/scripts/build_wasm_node_module.shwasm/scripts/run_wasm_node_contract_tests.shwasm/scripts/run_wasm_tests.sh.github/workflows/wasm-experimental.ymlPurpose:
What it is not:
| Situation | Command | Why use it |
|---|---|---|
| Normal development change | bash scripts/unix/run_tests.sh | Fast default regression path for day-to-day work |
| Verify documented external integration modes | bash scripts/unix/run_external_consumer_tests.sh | Confirms real external-consumer workflows still work |
| Single-header or release-path change | bash scripts/unix/build_single_header.sh then bash scripts/unix/run_single_header_tests.sh | Matches the deeper standalone-header suite now also used by single-header.yml and release.yml |
| Extra confidence against raw Boost on larger graphs | bash scripts/unix/run_large_graph_compare.sh | Runs the opt-in large deterministic wrapper-vs-Boost comparison path |
| Snippet/example parity check | bash scripts/unix/test_single_snippet.sh snippet/bfs | Checks one curated snippet folder against its companion references |
For normal development:
When you changed packaging or consumer-facing integration paths:
When you changed the single-header build or release path:
When you want extra wrapper-vs-Boost confidence on larger deterministic graphs:
When you want to inspect snippet parity behavior:
The safest way to read the testing story is:
scripts/unix/run_tests.sh is the default fast regression pathscripts/unix/run_external_consumer_tests.sh is the dedicated end-to-end integration path for documented external consumer modessingle-header.yml now provides a dedicated standalone-header workflow that runs both the standalone-header suite and a smoke testscripts/unix/run_single_header_tests.sh is the deeper local standalone-header verification pathrelease.yml is the path that currently rebuilds the standalone header and runs the standalone-header suite before publishing the release assetscripts/unix/run_large_graph_compare.sh adds scale-oriented cross-checks against raw BoostTogether these paths provide much stronger evidence than any one of them alone, but they still should be described as a practical regression strategy rather than a mathematical proof of full equivalence to Boost.