DEV Community

Discussion on: Property Testing: Why You Should Generate Test Data

Collapse
bootcode profile image
Robin Palotai

For the quadrant example, you can make up property tests without reimplementing the code:

  • for any x,y, if the quadrant is a left one, x-1,y should still fall in the same quadrant.

  • etc

The trick is, not to test a single call, but the relation of results on related input.