shnewto / bnf

Parse BNF grammar definitions
MIT License
256 stars 22 forks source link

Test to_string and from_str reflexive property #32

Closed CrockAgile closed 6 years ago

CrockAgile commented 6 years ago

Theoretically any Grammar/Production/Expression/Term which is converted to string, and then back should maintain the same value. In order to test this property, quickcheck::arbitrary was implemented for each type, but only if building for tests. Hopefully these arbitrary values will be useful for future property tests. The tests using arbitrary Grammar/Production ran a little slow so the # of tests and size limit were restricted. According to travis, these tests added ~1 minute of build/test time.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.3%) to 92.698% when pulling 6e4ecd947386fc6764601833fdefc0d42e6a2863 on nodes-impl-arbitrary-for-tests into 58606b86002005a6e2ebb8382c3ad9e4021b8ffb on master.