January 2019
Intermediate to advanced
376 pages
8h 49m
English
proper_gen:pick(proper_type:Type())
What the property is doing is validating the lists:seq(Start, Stop) function, which would be expected to return a list of integers in the range [Start, ..., Stop]. For example, running lists:seq(2,5) should return [2,3,4,5]. The property does the validation of this by looking at two aspects of such a list:
The list should contain as many entries as the range covered by both terms (2..5 has 4 entries, or just (5-2)+1).
To avoid having the test succeed on outputs such as [1,1,1,1], the increments/1 function is used to ensure that each number is greater than the next one.
Read now
Unlock full access