refactor: co-locate std module tests in std/<module>/ - #1634
Merged
Conversation
Move a tranche of standard library module tests from tests/regression/ into their respective std/<module>/ directories with a test_ prefix (bits, deque, intarr, longarr, floatarr, plural, sort, set, pqueue, tar). Update Makefile test-ae discovery to search std/ for test_*.ae files. Co-authored-by: paul-hammant <82182+paul-hammant@users.noreply.github.com>
…path Two things the co-location move needs but did not carry. INSTALL WOULD HAVE SHIPPED THE SPECS. `make install` trims `test_*.ae` out of contrib for exactly this reason, but std had no such trim — it never needed one while the tests lived in tests/regression. Moving them under std/<module>/ means every user would get 10 spec files with their toolchain. Added at BOTH install sites (the `install` target and the `install-contrib` one), mirroring the contrib lines directly above them. Verified against a real staged install: 0 test files shipped, all 136 module.ae still present. THIRD_PARTY_LICENSES.md pointed at `tests/regression/test_bits.ae`. That is not a stale comment — it is the attribution record for test vectors ported from BouncyCastle, so it has to name the file that actually holds them. Repointed to `std/bits/test_bits.ae`, and its companion `test_bytes_be.ae` given its full path since it did NOT move and the bare name now reads as if it sits alongside. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Added under a fresh [current]: the 0.549.0 release consumed main's, and this PR touches std/ so the new "CHANGELOG entry present" gate requires one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI caught the one reference the move left dangling: emit_c_determinism
pins a fixed corpus of programs it compiles twice to prove the emitted C
is byte-identical, and two entries were
`tests/regression/test_std_{set,pqueue}.ae`.
My earlier sweep for stale paths missed them because I grepped for the
unrenamed basenames (test_set, test_pqueue). Those two files were
RENAMED as well as moved — `test_std_set.ae` -> `std/set/test_set.ae` —
so the old names matched nothing I searched for.
Re-checked exhaustively this time, per old path across the whole tracked
tree. The only remaining hits are in CHANGELOG-archive.md, which
correctly records where those files lived at the time and must not be
rewritten.
Verified: emit_c_determinism passes (7 programs byte-identical across two
compiles); `make test-ae` failures drop 9 -> 7, and the remaining seven
are the known environmental set (h2, middleware, Windows-cross,
wycheproof) with nothing related to this PR.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Picks up
refactor-colocate-std-module-tests-...from thepaulfork andshapes it for merge. This is the
std/counterpart to thecontrib/co-location work.
Ten specs move out of
tests/regression/to sit beside the modules theycover — bits, deque, floatarr, intarr, longarr, plural, pqueue, set, sort,
tar — and
make test-aelearns to discoverstd/**/test_*.aealongsidethe existing test trees.
All ten are pure
R100renames: not a byte of test content changed.What the branch needed before it could merge
It was cut from
861b89aband five commits of main had landed since,so as fetched it also reverted merged work:
tools/ae_version.c,compiler/aether_module.c,contrib/vulkan/,install.sh,get.sh,VERSION, and it deleted two integration tests(
selective_import_module_var,version_identity) belonging toc72878e8— "selective import keeps the module's own state; Windows-cleanversion probe". Rebasing dropped all of that; the diff is now 10 renames
plus the two fixes below.
Install would have shipped the specs to users.
make installtrimstest_*.aeout ofcontrib/for exactly this reason, butstd/had nosuch trim — it never needed one while the tests lived under
tests/regression/. Co-locating without it means every user gets 10 specfiles with their toolchain. Added at both install sites, mirroring the
contrib lines directly above them. Verified against a real staged
install: 0 test files shipped, all 136
module.aestill present.THIRD_PARTY_LICENSES.mdpointed at a moved file. That is not a stalecomment — it is the attribution record for test vectors ported from
BouncyCastle, so it has to name the file that actually holds them.
Repointed to
std/bits/test_bits.ae. Its companiontest_bytes_be.aegets its full path too, since it did not move and the bare name now
reads as though it sits alongside.
Verified
make test-aediscovers all 10 and the total rises 962 → 965 — thepoint being that they don't go quiet in the new location
Note on
[current]The 0.549.0 release consumed main's
## [current], so this PR adds afresh one — which is what the new gate from #1632 requires of any PR
touching
std/.🤖 Generated with Claude Code