Repository navigation
Overhaul test setup - #743
Conversation
2df7119 to
255e5cc
Compare
Missing commas concatenated the string literals, so only two inputs were
tested. Separate them, capture the failing input, and drop "T{}", which is
a valid (empty) tensor and does not throw.
AI-assisted
REQUIRE_NOTHROW(a == b) never evaluated the comparison. Use REQUIRE. The flattened_rangenest distance for the one-level case is 4 (two sequences of two operators), not the 2 that was written down but never checked. AI-assisted
Delete the dead blocks in test_eval_expr, test_eval_node, test_export (including the placeholder "tbd2" section), test_mbpt and test_wick. AI-assisted
The {0} and {1} lookups on "A + B" are already the first two rows of the table.
AI-assisted
The fourth row repeats the second one verbatim. AI-assisted
The 4-tensor chain g{a1;i1} g{a1;a2} g{a2;a3} g{a3;i2} is the second entry of
"DensePeakSize matches oracle over a battery of small networks", which runs
the identical comparison.
AI-assisted
The removed section extracted the same pure non-t product f*g with the same predicate as "non-t pred: pure-non-t root collapses, mixed root is pruned"; only its !leaf() check on the extracted node was not already covered, so add that check there. AI-assisted
With strict fill-once set on the manager, the section "non-persistent: a re-store with NO intervening reset() throws under strict fill-once" already checks the same store/store sequence unconditionally; the dropped section only repeated it, and returned early unless asserts throw. AI-assisted
Both sections built the same kinds of EvalExpr (tensor, constant, variable, power); one now constructs the union of their inputs and checks op_type() is unset. This also drops the unused c2/c3 locals. AI-assisted
"ordered executor asserts the cell table before evaluating" rebuilt the fixture of "evaluate_ordered_schedule matches forest descent..." verbatim and only added the cell-table size check, which now lives there. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
Replace prose-style test and section names with terse kebab-case ones. AI-assisted
AI-assisted
Capture the wide-string input through toUtf8 so failures print readably. AI-assisted
Capture wide-string inputs through toUtf8. AI-assisted
Catch2 cannot render std::wstring (or vectors of them) readably. AI-assisted
AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
Hidden test cases that pass now run by default; ones that failed or were skipped (blocked on removed or unfinished functionality) are removed along with the helpers and comments that only they used. AI-assisted
The OSV early-contraction reproducers now check that every t is contracted directly with its C transform. The C60 member-2 and the two resident-scan peak probes only printed cells (the latter documents a known-missing peak term) and are removed. AI-assisted
The test passes; its comments still described the failing state. AI-assisted
The whole-residual water-20/C60 sweeps and the 40000-node deep-spine test take seconds and (for the latter) ~2.8 GB in a RelWithDebInfo build, which is too much for the Debug, sanitizer and valgrind configurations that set SEQUANT_SKIP_LONG_TESTS. Mark the helpers only they use [[maybe_unused]]. AI-assisted
46d168d to
f0893d8
Compare
|
Maybe worth looking at: The BTAS, TAPP and TA eval tests repeat the same core test suite (summation, product, symmetrization, and so on), with only the backend calls swapped. Could we write that suite once as a template over the backend, with each backend supplying its tensor type and a few small wrappers? Each backend file would then run the shared suite and keep only its own extra tests. TA would keep its larger set of extras (tensors of tensors, batching and so on). I got the idea from Boost.Test fixtures (used in TA). Catch2’s counterparts are type-parametrised test cases and templated test fixtures. |
|
Yes, that's definitely something that would improve the testing harness quite a bit. I intentionally kept it out of this PR though as to not overblow it. That will be a larger change that might also require thinking a bit more about how to handle cases in which only some of the backends are available. 👀 |
Master's test overhaul (#743) gave test cases terse kebab-case names; give the test cases this branch added the same style. Tags are unchanged.
Master's test overhaul (#743) gave test cases terse kebab-case names; give the test cases this branch added the same style. Tags are unchanged.
This streamlines the unit test setup. It attempts to remove copy-paste tests and instead use parametrization, consolidate test naming (some of the test names are currently way too long) and remove redundancies in test coverage. Dead or broken tests are removed