SmallCheck class
class SmallCheck extends Check { final int depth; SmallCheck({depth: 4, quiet: false}) : this.depth = depth , super(quiet); void check(Property property) { final parts = property.enumeration.parts.take(depth + 1); int total = 0; for (final part in parts) { total += part.length; } int counter = 0; int currentDepth = 0; for (final part in parts) { int card = part.length; for(int i = 0; i < card; i++) { display("${counter+1}/$total (depth $currentDepth: ${i+1}/$card)"); _Product arg = part[i]; if (!property.property(arg)) { clear(); throw Check._errorMessage(counter + 1, arg); } counter++; } currentDepth++; } clear(); } }
Extends
Check > SmallCheck
Constructors
new SmallCheck({depth: 4, quiet: false}) #
Properties
Methods
void check(Property property) #
void check(Property property) { final parts = property.enumeration.parts.take(depth + 1); int total = 0; for (final part in parts) { total += part.length; } int counter = 0; int currentDepth = 0; for (final part in parts) { int card = part.length; for(int i = 0; i < card; i++) { display("${counter+1}/$total (depth $currentDepth: ${i+1}/$card)"); _Product arg = part[i]; if (!property.property(arg)) { clear(); throw Check._errorMessage(counter + 1, arg); } counter++; } currentDepth++; } clear(); }