Repository navigation
Compares exported positions and drives the diff cases - #25
Merged
Merged
Conversation
The conformance runner refused the statifier suite's ten diff cases by naming their host keys, and refused the four cases that state an exported position. The reference's harness drives a diff case like any host case and compares none of to_source, expect_diff, mapping and expect_compatible_at, so the runner now accepts the four keys and compares nothing of them. A step's expect_position is now compared, once its configuration agrees, with the state's position exported and rendered as the reference renders it: the id sets and history lists sorted, each live invocation as its state and index, the running flag, and the datamodel without _event, _ioprocessors and _sessionid, and without _name unless the scxml element carries a name attribute, each value in its JSON form. A date, datetime or duration value fails the step naming the variable, and a case stating a position on a document with a state that has no id fails before it is driven. A case stating a position sends its steps' event data, as the reference's harness does. Every statifier case passes, and the ratchet records the fourteen new passes: the registry holds 309 entries, 36 of them statifier's. Refs: srb-1kv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bead: srb-1kv
What changes
The conformance runner (under
test/conformance/, none of it ships) now completes the statifier suite:to_source,expect_diff,mappingandexpect_compatible_atare accepted (UNCOMPARED_HOST_KEYSinConformance::Drive) and compared by nothing, so a diff case is driven like any host case and agrees on its configurations and its sends. This follows the reference's harness atv2.16.0, whose moduledoc inlib/mix/statifier/corpus/host_case.exsays "this runner compares none of them". Any other unknown host key is still refused by name.expect_positionis compared. Once a step's configuration agrees,Conformance::PositionExpectation.at_steprenders the state's position fromStatifier.export_positionas the reference'sPositionExpectation.render/1renders its export (lib/mix/statifier/corpus/position_expectation.exatv2.16.0) and compares it as a JSON value:configuration,entered_states,states_to_invoke: sorted id arrays;history_values: each history id to its sorted recorded ids;active_invocations:{state, index}per live invocation, sorted by state then index, the invoke id left out;running: as exported;datamodel: the position's tagged texts decoded, without_event,_ioprocessorsand_sessionid, and without_nameunless the<scxml>element carries anameattribute (the reference'sdrop_unset_name/2); the undefined value as null; a date, datetime or duration (or a list or map holding one) fails the step naming the variable.named/1, counting every state but the root).data, as the reference's harness does for every case it runs throughrun/2; before this, only a case with a host object did. No corpus case exercises the hostless form today; a test pins it.statifierclaim now holds every case of its suite, and the registry check passes over the whole run.conformance/README.mdsays what the runner does with the diff pair and withexpect_position, and drops the stale sentence that called the accepts keys unhonoured;README.md's claim table and its "not claimed yet" list follow the registry.No
lib/change and no changelog fragment (a runner-only change, perchangelog.d/README.md).Evidence
mise exec -- bundle exec rake) green on the committed tree: rubocop clean over 199 files;corpus:checkagrees atv2.16.0;registry: 309 entries pass today,statifier: 0 of 36 cases not yet claimed; 622 runs, 0 failures; line coverage 99.81%, branch 96.46%.test/conformance/position_expectation_test.rb(the rendering, the invocation shape, the_namerule, the date/datetime/duration refusal, the member-by-member reason, hostless step data, the unnamed-state refusal, the diff pair driven and uncompared).statifier_suite_test.rbnow requires every case of the suite to pass and a case with one flipped position member to fail naming it.