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

Nodejs collation tests: Change "fail" to "unsupported" when a rule or complex comparison is used. #321

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

sven-oly
Copy link
Collaborator

@sven-oly sven-oly commented Oct 3, 2024

These tests should be flagged as unsupported because the ECMAScript implementation does not support custom rules or other forms of comparison, i.e., levels of comparison.

@sven-oly
Copy link
Collaborator Author

sven-oly commented Oct 3, 2024

Note that the same should be done in Dart Web.

And rules should be implemented in ICU4 C, J, and X, too.

run_config.json Outdated Show resolved Hide resolved
}

if (result != true) {
if (result == true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: if result == false, it should be returned as a potential test failure. Only if the options are unsupported should an unsupported status be returned.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I see that there's an ECMAScript option for sensitivity. I'll see if that fits with any of the "compare_type" options.

And should we set all tests that have explicit 'rules' to be 'unsupported'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like this test?

{"test_type": "collation_short", "label":"00003","s1":"9","s2":"\u0000","compare_type":"<1","test_description":" simple CEs & expansions","rules":"&\\x01<<<\\u0300&9<\\x00&\\uA00A\\uA00B=\\uA002&\\uA00A\\uA00B\\u00050005=\\uA003","hexhash":"d439f742bdde4b51012ee05519dfde424e25334a"}

Yeah, explicit "rules" are unsupported.

}

if (result != true) {
if (result == true) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about initializations of result and result_bool, even though they're not in this PR: shouldn't result and result_bool always be identical, by definition?

If so, can we just use one of them instead of both, when it comes to the code here in the body of this if statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll remove result_bool.

}

if (result != true) {
if (result == true) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this comment here since I can't on lines above: aren't lines 43-45 redundant? We should be able to remove them b/c the logic is already covered by line 41, right?

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.

3 participants