From 8f20dabf4d725ae2b60136241c78995722215ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 7 Dec 2013 16:16:26 +0100 Subject: [PATCH] Implement test for strokeBounds of closed path with only one segment. --- test/tests/Path_Bounds.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/tests/Path_Bounds.js b/test/tests/Path_Bounds.js index 51377fc8..659e0acd 100644 --- a/test/tests/Path_Bounds.js +++ b/test/tests/Path_Bounds.js @@ -78,10 +78,19 @@ test('path.strokeBounds on path with single segment and stroke color', function( var path = new Path([ new Segment(new Point(121, 334), new Point(-19, 38), new Point(30.7666015625, -61.53369140625)) ]); - path.style.strokeColor = 'black'; + path.strokeColor = 'black'; compareRectangles(path.strokeBounds, { x: 121, y: 334, width: 0, height: 0 }); }); +test('path.strokeBounds on closed path with single segment and stroke color', function() { + var path = new Path([ + new Segment(new Point(121, 334), new Point(19, 38), new Point(30.7666015625, -61.53369140625)) + ]); + path.strokeColor = 'black'; + path.closed = true; + compareRectangles(path.strokeBounds, { x: 120.5, y: 312.88324 , width: 19.91643, height: 30.53977 }); +}); + test('path.bounds & path.strokeBounds with stroke styles', function() { function makePath() { var path = new Path();