From 115d12f6ce97ab2bc56235c92dfce1b1434de98e Mon Sep 17 00:00:00 2001
From: Jonathan Puckey <me@jonathanpuckey.com>
Date: Tue, 21 Jun 2011 18:42:53 +0200
Subject: [PATCH] Add failing test where cloning a linked size throws an error.

---
 test/tests/Item.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/tests/Item.js b/test/tests/Item.js
index 33d9885f..e52db1ed 100644
--- a/test/tests/Item.js
+++ b/test/tests/Item.js
@@ -440,4 +440,18 @@ test('Changing item#position.x', function() {
 	var path = new Path.Circle(new Point(50, 50), 50);
 	path.position.x += 5;
 	equals(path.position.toString(), '{ x: 55, y: 50 }', 'path.position.x += 5');
+});
+
+test('Cloning a linked size', function() {
+	var path = new Path([40, 75], [140, 75]);
+	var error = null;
+	try {
+		var cloneSize = path.bounds.size.clone();
+	} catch (e) {
+		error = e;
+	}
+	var description = 'Cloning a linked size should not throw an error';
+	if (error)
+		description += ': ' + error;
+	equals(error == null, true, description);
 });
\ No newline at end of file