From 4b9a00a65c22121d82cba333bc84f202745e8b2e Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 21 May 2011 21:01:01 +0200 Subject: [PATCH] Add test to Point. --- test/tests/Point.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/tests/Point.js b/test/tests/Point.js index 6ab41575..9f1fae1d 100644 --- a/test/tests/Point.js +++ b/test/tests/Point.js @@ -29,6 +29,11 @@ test('new Point({ width: 10, height: 20})', function() { equals(point.y, 20); }); +test('new Point({ angle: 45, length: 20})', function() { + var point = new Point({angle: 40, length: 20}); + equals(point.toString(), '{ x: 15.32089, y: 12.85575 }'); +}); + module('Point vector operations'); test('normalize(length)', function() {