diff --git a/test/tests/Point.js b/test/tests/Point.js index 5cebde0b..448f4b2b 100644 --- a/test/tests/Point.js +++ b/test/tests/Point.js @@ -130,3 +130,18 @@ test('equals()', function() { return new Point(0, 0).equals(null); }, false); }); + +test('isColinear()', function() { + equals(function() { + return new Point(10, 5).isColinear(new Point(20, 10)); + }, true); + equals(function() { + return new Point(5, 10).isColinear(new Point(-5, -10)); + }, true); + equals(function() { + return new Point(10, 10).isColinear(new Point(20, 10)); + }, false); + equals(function() { + return new Point(10, 10).isColinear(new Point(10, -10)); + }, false); +});