TabletopAssistant / DiceKit

Swift framework for expressing and evaluating dice notation (e.g., d20, 4d6+4, 3d8×10+2), which is commonly used in tabletop role-playing games.
Apache License 2.0
14 stars 1 forks source link

Scale back on SwiftCheck for some tests #68

Open brentleyjones opened 9 years ago

brentleyjones commented 9 years ago

For certain tests SwiftCheck is too heavy/unneeded. Equatable tests for example don't need to check different permutations since they don't have code paths in them.

Resolving this issue with speed up our tests by a good amount (especially the soon-to-come FrequencyDistribution and ProbabilityMass tests).

brentleyjones commented 9 years ago

Starting to get worse in #71:

Executed 181 tests, with 0 failures (0 unexpected) in 6.868 (7.005) seconds

If we could combine some of the SwiftCheck tests together, while still knowing which part failed, we would get a big speed up (e.g. Equatable tests). So far when trying to do so I've failed to have the failure output point to which part fail. It still says which input failed, so maybe that is enough (you could debug with that input).

brentleyjones commented 9 years ago

I opened an issue about being able to have meaningful sub-property failures: https://github.com/typelift/SwiftCheck/issues/74