-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
There was a problem hiding this 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: #283
testgen/generators/rdt_fmt_gen.js
Outdated
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'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.