Skip to content

refactor: co-locate std module tests in std/<module>/ - #1634

Merged
paul-hammant merged 4 commits into
mainfrom
refactor/colocate-std-tests
Aug 17, 2026
Merged

refactor: co-locate std module tests in std/<module>/#1634
paul-hammant merged 4 commits into
mainfrom
refactor/colocate-std-tests

Conversation

@paul-hammant

Copy link
Copy Markdown
Collaborator

Picks up refactor-colocate-std-module-tests-... from the paul fork and
shapes it for merge. This is the std/ counterpart to the contrib/
co-location work.

Ten specs move out of tests/regression/ to sit beside the modules they
cover — bits, deque, floatarr, intarr, longarr, plural, pqueue, set, sort,
tar — and make test-ae learns to discover std/**/test_*.ae alongside
the existing test trees.

All ten are pure R100 renames: not a byte of test content changed.

What the branch needed before it could merge

It was cut from 861b89ab and 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 to
c72878e8 — "selective import keeps the module's own state; Windows-clean
version 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 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 under
tests/regression/. Co-locating without it means every user gets 10 spec
files 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.ae still present.

THIRD_PARTY_LICENSES.md pointed at a moved file. 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. Its companion test_bytes_be.ae
gets its full path too, since it did not move and the bare name now
reads as though it sits alongside.

Verified

  • All 10 relocated specs pass from their new homes
  • make test-ae discovers all 10 and the total rises 962 → 965 — the
    point being that they don't go quiet in the new location
  • Remaining sweep failures are the known environmental set, unchanged
  • Staged install confirms the trim works and modules still install
  • No dangling references to the old paths anywhere else in the tree

Note on [current]

The 0.549.0 release consumed main's ## [current], so this PR adds a
fresh one — which is what the new gate from #1632 requires of any PR
touching std/.

🤖 Generated with Claude Code

google-labs-jules Bot and others added 4 commits August 17, 2026 20:13
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>
@paul-hammant
paul-hammant merged commit 63a5c49 into main Aug 17, 2026
29 of 30 checks passed
@paul-hammant
paul-hammant deleted the refactor/colocate-std-tests branch August 17, 2026 21:19
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.

1 participant