gener-test-0
NAME
gener-test-0.1.0.raku -- Generation of test data
SYNOPSIS
raku gener-test-0.1.0.raku > /tmp/test-data
copy-paste from /tmp/test-data to the tests scripts.
DESCRIPTION
This program uses the various Date::Calendar::xxx classes,
version 0.0.x and API 0, to generate test data for version 0.1.0 and
API 1. After the test data are generated, check them with another
source (the calendar functions in Emacs, some websites, some Android
apps). Please remember that the other sources do not care about sunset
(and sunrise for the civil Maya and Aztec calendars) and that you will
have to mentally shift the results before the comparison.
And after the data are checked, copy-paste the lines into the test
scripts xt/10-conv-old.rakutest, xt/11-conv-new.rakutest,
12-conv-aztec-old.rakutest and 13-conv-aztec-new.rakutest.
In the rakutest files for old conversions, copy-and-paste the
proper lines into the @data-other variable. Then cut-and-past the
lines for the Gregorian dates from this variable to the @data-greg
variable and add the Gregorian date with the 'YYYY-MM-AA' format at
the end of each array line. There is no @data-maya variable for the
Maya and Aztec dates, because you cannot test simultaneously <
D::C::Maya:ver<0.0.3>> and < D::C::Maya:ver<0.1.0>>, or even test
< D::C::Maya:ver<0.0.3>> with < D::C::Aztec:ver<0.1.0>>.
In the rakutest files for new conversions fill the @data array
with the proper generated lines.
Remember that you need to erase the first comma in each chunk of copied-pasted code.
Test data are generated only for the GMT and Caso conversions, not for the Spinden, astronomical and Cortes variants.
All computed dates are daylight dates. So it does not matter which version and API are such and such classes. Daylight dates gives exactly the same results with version 0.1.0 / API 1 as with version 0.0.x / API 0.
AUTHOR
Jean Forget <J2N-FORGET at orange dot fr>
COPYRIGHT AND LICENSE
Copyright (c) 2024 Jean Forget, all rights reserved
This program is free software; you can redistribute it and/or modify it under the Artistic License 2.0.