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

relative date time format: add numeric options and use in format testing #280

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

sven-oly
Copy link
Collaborator

@sven-oly sven-oly commented Aug 17, 2024

Fixes #263
Fixes #274
Fixes #276

This fixes lots of the test failures with RDTF. It adds tests for numeric with "auto" and "always" options.

@sven-oly sven-oly requested review from echeran and sffc August 17, 2024 00:33
Copy link
Collaborator

@echeran echeran left a comment

Choose a reason for hiding this comment

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

one comment, otherwise looks good

@@ -46,6 +47,64 @@ const numeric = ['auto', 'always'];

const counts = [-100, -4, -2, -1, 0, 1, 1.3, 2, 3, 4, 10];

function sample_tests(all_tests, run_limit) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI: #283

Comment on lines 159 to 163
let all_options_numeric_always = {...all_options};
all_options_numeric_always['numeric'] = 'always';

let all_options_numeric_auto = {...all_options};
all_options_numeric_auto['numeric'] = 'auto';
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can combine these JS object/dictionary initializations even further via the spread operator. They can each be just one line:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#description

Copy link
Collaborator

@echeran echeran left a comment

Choose a reason for hiding this comment

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

LGTM

@sven-oly sven-oly merged commit 369f1e3 into unicode-org:main Aug 19, 2024
6 checks passed
@sven-oly sven-oly deleted the RDTF_primary_and_auto branch August 19, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants