From 2a3ede67bbb7a647f23c55648350e2992e4b7843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 17 Oct 2013 20:18:56 +0200 Subject: [PATCH] Define more tests for Path#contains(). --- test/tests/Item_Contains.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/tests/Item_Contains.js b/test/tests/Item_Contains.js index 526a6bb4..7d84146a 100644 --- a/test/tests/Item_Contains.js +++ b/test/tests/Item_Contains.js @@ -39,6 +39,19 @@ test('Path#contains() (Regular Polygon)', function() { testPoint(path, new Point(10, 20), false); }); +test('Path#contains() (Circle Contours)', function() { + var path = new Path.Circle({ + center: [100, 100], + radius: 50, + fillColor: 'blue', + }); + + testPoint(path, path.bounds.topCenter, true); + testPoint(path, path.bounds.leftCenter, true); + testPoint(path, path.bounds.rightCenter, true); + testPoint(path, path.bounds.bottomCenter, true); +}); + test('Path#contains() (Round Rectangle)', function() { var rectangle = new Rectangle({ point: new Point(0, 0),