Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more exhaustive syntax tests (#843) #844

Merged
merged 5 commits into from
Aug 5, 2024

Conversation

catamorphism
Copy link
Collaborator

Beginning to address #843 and the corresponding item under https://github.com/unicode-org/message-format-wg/wiki/Things-That-Need-Doing .

I tried to test each variation of each rule (up to but not including identifier.) I didn't try to test combinations of variations. For example, for this rule:

complex-message   = *(declaration [s]) complex-body [s]

the idea would be to add tests that exercise the following four (partial) derivations:

complex-message -> complex-body
complex-message -> complex-body s
complex-message -> declaration complex-body
complex-message -> declaration s complex-body

This isn't exhaustive by any means, but it was broad enough that I found one bug in the ICU4J parser (the ".input{$x}{{}} test case) and two bugs in the ICU4C parser (the \\\\ test case and the { #a} test case).

@catamorphism
Copy link
Collaborator Author

catamorphism commented Jul 30, 2024

The validation CI check is failing because I used the comment field, which I added to the version of the schema in the conformance repo -- I guess I'll go ahead and update that in the same PR. Actually, I'm not sure which repo should be the source of truth. Any opinions?

@eemeli
Copy link
Collaborator

eemeli commented Jul 30, 2024

Tests may already include a "description", why not use that?

"test": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string",
"description": "Information about the test."
},

The spec tests in this repo need to match the schema that's also in this repo.

@aphillips aphillips added test-suite LDML46 LDML46 Release (Tech Preview - October 2024) labels Jul 30, 2024
@catamorphism
Copy link
Collaborator Author

Tests may already include a "description", why not use that?

Ah, didn't notice that. Fixed.

@eemeli eemeli added the fast-track Non-spec editorial changes, etc. label Jul 30, 2024
@catamorphism catamorphism merged commit 8370709 into unicode-org:main Aug 5, 2024
2 checks passed
@echeran echeran linked an issue Aug 5, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track Non-spec editorial changes, etc. LDML46 LDML46 Release (Tech Preview - October 2024) test-suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create complete tests for syntax
5 participants