bobfang1992 / pytomlpp

A python wrapper for tomlplusplus
https://bobfang1992.github.io/pytomlpp/pytomlpp.html
MIT License
86 stars 10 forks source link

Test with 1.0-rc1 TOML spec tests #23

Closed EpicWink closed 4 years ago

EpicWink commented 4 years ago

https://github.com/iarna/toml-spec-tests, see https://github.com/bobfang1992/pytomlpp/issues/20#issuecomment-647534319

marzer commented 4 years ago

OK, here's an update about conformance. I've spent the last few days bringing the tests from both test sets into the toml++ test suite, and fixed a number of small conformance bugs I identified in the process. You should be able to update your test code to remove the exceptions for the following invalid inputs:

The fact that they were previously failing was an error on my part; I was too relaxed with allowing omission of some digits in float values.

Additionally, you should add an exception to exclude BurntSushi/datetime from the set of valid inputs because the test data itself is incorrect (see here).

Finally, since I've also added in tests for the TOML 1.0.0 spec from iarna's suite, you might want to re-evaluate if you even need to bother since it might be a bit of work (and is all about to be replaced with the official toml-lang/conformance anyway). If you do want to, there's a few exceptions you'll need to add to the invalid cases because they ignore the TOML spec's provision for sub-millisecond precision in fractional time values, thus making them incorrect:

(more info here)

The latest toml++ in master contains all the conformance fixes, so update at your leisure ^_^

bobfang1992 commented 4 years ago

Hi, thanks for the input. I will keep what we have for now and later change it to the merged conformance tests. I am now updating toml++ and said tests.

bobfang1992 commented 4 years ago

closed via 54add69dfd9f56ac86669ec0badd042ad698bb79