Skip to content

Expanded STC-S testing and fixes - #123

Open
timj wants to merge 7 commits into
masterfrom
u/timj/stcs-corpus
Open

timj wants to merge 7 commits into
masterfrom
u/timj/stcs-corpus

Conversation

@timj

@timj timj commented Dec 4, 2026

Copy link
Copy Markdown
Member

No description provided.

timj added 7 commits December 3, 2026 12:48
In ReadProps the assignment "timeid = TIME_ID;" sat inside the comment
of the line before it, so a time sub-phrase starting with the identifier
"Time" left timeid unset and the read crashed. The assignment is now
code. The STC-S corpus document time-identifier reaches it.

Generated with AI

Co-Authored-By: SLAC AI
Both demonstrations decided whether to display the warnings with
"!status", testing the int pointer they are given rather than the value
it points to, so the condition was always false and the warnings they
describe were never shown. They now test "!*status".

Generated with AI

Co-Authored-By: SLAC AI
fixtures/stcs holds STC-S documents with the error, Native dumps,
warnings and written STC-S that each gives, captured on Linux x86_64
and shared byte for byte with the Rust port of AST. check_stcs_corpus
checks one document against them, and CMake registers a
stcs_corpus_<name> ctest for each row of corpus.txt. The texts are
compared byte for byte on Linux x86_64 and by compare_dumps.c's rule,
which the program includes, elsewhere. The two documents that behave
differently, timeinterval-allsky (writes nothing) and position (its
written text does not read back), are listed with the reason and
checked for still doing so.

teststcschan compared the PROPS KeyMap of its third document with
stcschan-test1-doc3-props.ast through astEqual, which compares only the
class of two KeyMaps, so the fixture had drifted from what astRead
returns. It now compares the dump text, and the fixture is regenerated
from the library's output.

fixtures/programs/stcschan-demos holds the inputs the Rust port's
versions of the stcschan demonstrations are run on.

Generated with AI

Co-Authored-By: SLAC AI
…ry variant

The checker now compares the warnings an StcsChan gives when writing a
document with <name>.write-warnings, failing when a write warns and the
file is absent, and reads back the .out-20 and .out-indent texts as well
as .out.  The includes it relies on are named explicitly.

teststcschan checks the fseek and ftell calls that size its fixture, and
the corpus loop in CMakeLists.txt says why the status of its fixture
check is unused.

Generated with AI

Co-Authored-By: SLAC AI
The corpus gains documents for the velocity and redshift sub-phrases
(VelocityInterval, RedshiftInterval of RADIO type, a unit of Hz, a
relativistic definition, a two-value Error), times given as JD, the TEB
time scale and a two-value time Error, a GEO_C frame, the MOON spectral
reference position, per-axis units in a Cartesian frame, Cartesian
shapes of one and three axes, nested compound regions, a four-value
position Error and a Position with an Error, and documents for the
messages of each malformed shape and compound region.

The README is rewritten to describe both consumers of the shared tree,
the .write-warnings file and the rules of each comparison.

Generated with AI

Co-Authored-By: SLAC AI
…ucers

The report the Rust port wrote while porting StcsChan lists eighteen
defects in the C library and one in the CDS moc crate, each with the
programme that shows it and its output, and says which three this
branch fixes.  It is copied verbatim from the port's
docs/reports/2026-12-02-stcschan-c-defects.md so that the two
repositories carry the same text; PLAN.md points to it from the
STC-S corpus section.

Generated with AI

Co-Authored-By: SLAC AI
…tex's format

GetRegionProps asks GetFmt once, for word 0 of the VERTICES property,
and formats every vertex with that one format, so
"Polygon ICRS 10 22.125 11.5 21.25 10.75 20" is written as
"Polygon ICRS TOPOCENTER 10 22 12 21 11 20", and a Box in ICRS, written
as a Polygon with the default format, is written as different text when
read back.  The report gains the defect, its table row and the
Appendix F runs that show it; the copy stays identical to the port's.

Generated with AI

Co-Authored-By: SLAC AI
@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

❌ 9 Tests Failed:

Tests completed Failed Passed Skipped
2873 9 2864 0
View the top 3 failed test(s) by shortest run time
stcs_corpus_circle-arcsec::stcs_corpus_circle-arcsec
Stack Traces | 0.00357s run time
Failed
stcs_corpus_not::stcs_corpus_not
Stack Traces | 0.00363s run time
Failed
stcs_corpus_ellipse-cart2::stcs_corpus_ellipse-cart2
Stack Traces | 0.00371s run time
Failed
stcs_corpus_adass2010-figure1-nobox::stcs_corpus_adass2010-figure1-nobox
Stack Traces | 0.0237s run time
Failed
stcs_corpus_circle-error-range::stcs_corpus_circle-error-range
Stack Traces | 0.08s run time
Failed
stcs_corpus_circle-position-error::stcs_corpus_circle-position-error
Stack Traces | 0.0865s run time
Failed
stcs_corpus_ellipse::stcs_corpus_ellipse
Stack Traces | 0.089s run time
Failed
stcs_corpus_nested-intersection-difference::stcs_corpus_nested-intersection-difference
Stack Traces | 0.13s run time
Failed
stcs_corpus_compound-union::stcs_corpus_compound-union
Stack Traces | 0.251s run time
Failed
stcs_corpus_adass2010-figure1::stcs_corpus_adass2010-figure1
Stack Traces | 0.279s run time
Failed
stcs_corpus_stcs-ex1::stcs_corpus_stcs-ex1
Stack Traces | 0.332s run time
Failed
stcs_corpus_compound-with-time::stcs_corpus_compound-with-time
Stack Traces | 0.491s run time
Failed
wcsdiff::wcsdiff
Stack Traces | 1.06s run time
Failed

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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