testRelation method
Tests if the target matches the relation rules given by the assertion.
Implementation
void testRelation(
TargetId targetId,
Rect targetBounds,
RelationAssert assertion,
) {
final success = assertion.evaluate(targetBounds);
if (!success) {
throw AssertionFailedException.forRelation(
targetId: targetId,
relation: assertion.relation,
targetBounds: targetBounds,
compareValue: assertion.value,
);
}
}