Repository navigation
test: Check the output and input positions the specs expect - #45
Open
henrikottesorensen wants to merge 2 commits into
Open
henrikottesorensen wants to merge 2 commits into
henrikottesorensen wants to merge 2 commits into
Conversation
The eight dictionary harnesses are 60MB and 1,953,878 cases between them, about two minutes against the spec suite's twenty seconds. They all pass against 3.40.0, so leaving them out of LibLouis.NET.Test cost the tables' word lists rather than hiding a failure, but nothing ran them. LibLouis.NET.DictionaryTest runs them. It reads them from the release build/stage_tables.sh already downloads rather than from a committed copy, so the repository does not grow by 60MB and they follow LiblouisVersion with nothing to re-copy. They are listed one by one: a wildcard on "dictionary" also matches nine ordinary specs LibLouis.NET.Test already runs. The build fails, naming stage_tables.sh, if they have not been staged, rather than discovering no tests. The harness moves out of BrailleSpecTests into BrailleSpecRunner so both projects compile the same one. The code moves unchanged. CI runs them in a dictionary-test job on the same three operating systems as test, beside it rather than after it, so pull requests wait no longer and a failure among them is reported apart from the main suite. publish waits for it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5,071 spec entries were dropped because they carry outputPos or inputPos: 5,067 in zh-tw-dictionary.yaml, 3 in zh-tw.yaml and the one in en-us-g2.yaml. Running them without the positions would only have checked half of what each one asserts. They are compared as lou_checkyaml compares them (brl_checks.c): the whole list, outputPos one entry per input character and inputPos one per output character. The backward leg of bothDirections swaps the two along with input and expected (lou_checkyaml.c:929-932). The specs count widechars, characters on the UCS-4 build, and the wrapper reports UTF-16 indices, so the runner maps the wrapper's arrays back to characters before comparing. That changes nothing for the current specs, which are all BMP, but it is what they mean. The separate-display-table path gets them from liblouis already in widechars. All 5,071 pass. Comparing against every expected position plus one fails exactly those 5,071, so none of them passes unchecked, and forcing every spec through _lou_translate gives the same positions. The tally loses test option: outputPos (5070) and inputPos (1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Built on #44. Until #44 merges, this PR also shows its commit (128b26e); the change here is the top commit only.
Stops skipping the 5,071 spec entries that carry
outputPosorinputPos: 5,067 inzh-tw-dictionary.yaml, 3 inzh-tw.yamland 1 inen-us-g2.yaml. All of them pass.What changed
outputPosandinputPosare parsed into the case. The backward leg ofbothDirectionsswaps them along with input and expected, aslou_checkyaml.c:929-932does.Translate/BackTranslateoverloads and compares the whole lists, asbrl_checks.cdoes._lou_translate.test option: outputPos(5070) andtest option: inputPos(1) are gone.Testing
On macOS arm64:
LibLouis.NET.Testpasses 237/237, and the solution builds with-warnaserror._lou_translatepath still passed all 154, so the positions agree on both paths.🤖 Generated with Claude Code