From dd719b48eaf846d3dbc5e5dceb734a619ecbfbc4 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Tue, 9 Nov 2010 05:29:41 +0000 Subject: [PATCH] Start on a math unit test file git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1862 eee81c28-f429-11dd-99c0-75d572ba1ddd --- test/all_tests.html | 3 +- test/math_test.html | 64 +++++++++++++++++++++++++++++++++++++++++ test/svgutils_test.html | 9 ++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 test/math_test.html diff --git a/test/all_tests.html b/test/all_tests.html index d69128e3..97fa6b53 100644 --- a/test/all_tests.html +++ b/test/all_tests.html @@ -8,13 +8,14 @@

This file frames all SVG-edit test pages. This should only include tests known to work. These tests are known to pass 100% in the following: Firefox 3.6, Chrome 7, IE9 Preview 6 (1.9.8006.6000), Opera 10.63. If a test is broken in this page, it is possible that YOU broke it. Please do not submit code that breaks any of these tests.

+ diff --git a/test/math_test.html b/test/math_test.html new file mode 100644 index 00000000..e5524dc8 --- /dev/null +++ b/test/math_test.html @@ -0,0 +1,64 @@ + + + + + + + + + + +

Unit Tests for math.js

+

+

+
    +
+ + diff --git a/test/svgutils_test.html b/test/svgutils_test.html index 1c6c79e0..e4165228 100644 --- a/test/svgutils_test.html +++ b/test/svgutils_test.html @@ -74,6 +74,15 @@ equals(decode64('YH4hQCMkJV4mKigpLV89K1t7XX1cfDs6JyIsPC4+Lz8='), '`~!@#$%^&*()-_=+[{]}\\|;:\'",<.>/?'); }); + test('Test svgedit.utilities.convertToXMLReferences() function', function() { + expect(1); + + var convert = svgedit.utilities.convertToXMLReferences; + equals(convert('ABC'), 'ABC'); +// equals(convert('ÀBC'), 'ÀBC'); +// alert(convert('ÿBC', true)); + }); + test('Test svgedit.utilities.bboxToObj() function', function() { expect(5); var bboxToObj = svgedit.utilities.bboxToObj;