Skip to content

Fix checkequal and lastfailure - #14

Merged
ChrisJefferson merged 8 commits into
masterfrom
fix-checkequal-and-lastfailure
Oct 1, 2026
Merged

ChrisJefferson merged 8 commits into
masterfrom
fix-checkequal-and-lastfailure

Conversation

@ChrisJefferson

Copy link
Copy Markdown
Member

No description provided.

ChrisJefferson and others added 8 commits October 1, 2026 14:08
The skip check tested the left-hand result twice, so a QC_Skip from the
right-hand function was compared as an ordinary value and reported as a
failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QC_ListOf and QC_SetOf chose their length with the global random
source, and the IsDigraph generator used RandomDigraph, which cannot be
given a random source. Changing the global random state therefore
changed the values QC_Check generated for a fixed seed. The IsDigraph
generator now builds its edges from the given random source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QC_LastFailure returned the arguments of the last test run, even when
that test passed, and returned the arguments after the tested function
had a chance to modify them. It returned fail rather than the
documented false when nothing had failed, and after QC_CheckEqual it
returned an internal wrapper rather than the documented funcs.

Each call to QC_Check or QC_CheckEqual now clears it, and sets it only
if the check fails on a particular input, recording the unmodified
arguments. QC_RerunLastFailure reruns on a copy of those arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QC_Skip, QC_RegisterFilterGen and the QC_ListOf family were plain
global assignments, so user code could overwrite them by accident.
QC_Skip is now also immutable, as a test compares results against it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QC_Skip was the string "SKIP TEST" and was compared with =, so a tested
function which genuinely returned that string was treated as skipped.
It is now the only object of its own family, and is compared with
IsIdenticalObj.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These were only mentioned in the tutorial. QC_Skip is now declared with
DeclareGlobalName so AutoDoc documents it as a variable, which needs
AutoDoc 2026.03.17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QC_LastFailure, QC_RerunLastFailure and QC_GetConfig were shown as
taking an argument, QC_SetConfig did not list the ramp and catchErrors
options, and the tutorial referred to a nonexistent QC_Equal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.44%. Comparing base (a576b33) to head (9b30f10).

Files with missing lines Patch % Lines
gap/quickcheck.gi 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   84.87%   94.44%   +9.56%     
==========================================
  Files           4        4              
  Lines         205      216      +11     
==========================================
+ Hits          174      204      +30     
+ Misses         31       12      -19     
Files with missing lines Coverage Δ
gap/digraphs.g 100.00% <100.00%> (ø)
gap/generators.g 100.00% <100.00%> (+8.92%) ⬆️
gap/quickcheck.gd 100.00% <100.00%> (ø)
gap/quickcheck.gi 91.66% <95.45%> (+10.23%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJefferson
ChrisJefferson merged commit e25ac53 into master Oct 1, 2026
5 checks passed
@ChrisJefferson
ChrisJefferson deleted the fix-checkequal-and-lastfailure branch October 1, 2026 13:42
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