summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-07-25 13:09:30 +0100
committerwout <wout@impinc.co.uk>2013-07-25 13:09:30 +0100
commit58f10a25dbee327f496eacbf7944a561708de5ea (patch)
tree89647de589f46d40aaf01258240f8d6ad9390322 /spec
parent494535622842ac8636a85c485b3057e8aa0dc5a7 (diff)
downloadsvg.js-58f10a25dbee327f496eacbf7944a561708de5ea.tar.gz
svg.js-58f10a25dbee327f496eacbf7944a561708de5ea.zip
Added SVG.Array and bumped to v0.29
Diffstat (limited to 'spec')
-rw-r--r--spec/index.html1
-rw-r--r--spec/spec/array.js18
2 files changed, 19 insertions, 0 deletions
diff --git a/spec/index.html b/spec/index.html
index c1e4c25..7ea6f56 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -52,6 +52,7 @@
<script type="text/javascript" src="spec/clip.js"></script>
<script type="text/javascript" src="spec/color.js"></script>
<script type="text/javascript" src="spec/number.js"></script>
+<script type="text/javascript" src="spec/array.js"></script>
<script type="text/javascript">
(function() {
diff --git a/spec/spec/array.js b/spec/spec/array.js
new file mode 100644
index 0000000..2a6922d
--- /dev/null
+++ b/spec/spec/array.js
@@ -0,0 +1,18 @@
+describe('Array', function () {
+
+ it('parses a matrix array correctly to string', function() {
+ var array = new SVG.Array([ .343, .669, .119, 0, 0
+ , .249, -.626, .130, 0, 0
+ , .172, .334, .111, 0, 0
+ , .000, .000, .000, 1, -0 ])
+
+ expect(array + '').toBe('0.343 0.669 0.119 0 0 0.249 -0.626 0.13 0 0 0.172 0.334 0.111 0 0 0 0 0 1 0')
+ })
+
+ it('parses a points array correctly to string', function() {
+ var array = new SVG.Array([[0,.15], [-100,-3.141592654], [50,100]])
+
+ expect(array + '').toBe('0,0.15 -100,-3.141592654 50,100')
+ })
+
+}) \ No newline at end of file