-
Notifications
You must be signed in to change notification settings - Fork 72
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
valid/datetime/milliseconds nanosecond precision #91
Comments
Just as a note for anyone curious, the TOML v1.0.0 spec leaves details on fractional seconds beyond milliseconds (which are required) up to the implementation:
|
|
Not necessarily, it's a fine distinction that concerns the precision of the timekeeping device. If |
Thanks @jidicula for reminding me of what the spec says. @arp242, My question is whether the toml-test suite should fail on something the spec says is implementation dependent. How can we avoid false negatives? |
I was confused about this as well. It's because "6" and "60" aren't the same when talking about seconds, minutes, or hours, so you're using two different notations. Also it's mixing base-60, base-10, and base-24 for double the fun. Stupid Babylonians and their base-60 counting system!
Yes, I thought about this yesterday too; but couldn't really come up with a good answer. My best is a At the very least this test should be split in to two tests, so it's testing one thing per test. |
Another option is to add a suffix to every test; .e.g Either way, I think it's fine to have these kind of tests in here; it's even useful since library authors can then decide if they want to support it yes/no and how. Just need a way to clearly mark them and make it easy to skip all of them without having to specify every test individually. |
I took a second look at this issue, and I think it's invalid.
We've since discovered (like with |
I ended up just truncating these tests to millisecond precision; there's no telling what an implementation supports, and mucking about with an "optional" test directory gets pretty complicated when you consider all the different permutations. Instead, I documented it in the README as "implementation-defined behaviour". There could perhaps be some other things in that section as well. |
The current test gives:
and expects:
I expected nanosecond precision to be preserved and survive a round time without the value changing.
Should this behavior be enforced by toml-test or left as a implementation detail for the user to decide?
The text was updated successfully, but these errors were encountered: