Start cleaning up unit tests by introducing new class/type-based comparators lookup table.

This commit is contained in:
Jürg Lehni 2014-12-28 14:33:22 +01:00
parent 28538d8a43
commit e95e17826e
7 changed files with 122 additions and 106 deletions

View file

@ -22,7 +22,7 @@ test('PointText', function() {
compareColors(text.fillColor, new Color(0, 0, 0), 'text.fillColor should be black by default');
comparePoints(text.point, { x: 100, y: 100 }, 'text.point');
comparePoints(text.bounds.point, { x: 100, y: 87.4 }, 'text.bounds.point');
compareSize(text.bounds.size, { width: 77, height: 16.8 }, 'text.bounds.size', 1.0);
compareSize(text.bounds.size, { width: 77, height: 16.8 }, 'text.bounds.size', { tolerance: 1.0 });
equals(function() {
return text.hitTest(text.bounds.center) != null;
}, true);