Implement failing tests for Point#equals().

As needed to fix #235
This commit is contained in:
Jürg Lehni 2013-06-11 19:52:42 -07:00
parent ce7d584c05
commit 3db6e103c2

View file

@ -87,4 +87,18 @@ test('getDirectedAngle(point)', function() {
var angle = new Point(10, -10).getDirectedAngle(new Point(1, 0));
equals(angle, 45);
});
});
test('equals()', function() {
equals(function() {
return new Point(10, 10).equals([10, 10]);
}, true);
equals(function() {
return new Point(0, 0).equals({});
}, false);
equals(function() {
return new Point(0, 0).equals(null);
}, false);
});