Search⌘ K
AI Features

Re-centering with ?SHRINK

Explore how the ?SHRINK macro helps customize shrinking in property-based testing using PropEr. Understand its use in centering shrinking efforts on relevant data points, improving error localization. Learn to apply it for generators like timestamps, refining tests for realistic and simpler failure cases.

We'll cover the following...

?SHRINK

?SHRINK is conceptually the simplest of the two macros that can be used to impact shrinking. It is best used to pick a custom zero-point toward which PropEr will try to shrink data. We can do ...