[Sie-announce] SIEコード [2311]

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2011年 1月 19日 (水) 00:01:01 JST


Revision: 2311
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2311
Author:   dhrname
Date:     2011-01-19 00:01:01 +0900 (Wed, 19 Jan 2011)

Log Message:
-----------


Modified Paths:
--------------
    trunk/Spec/SvgDomSpec.js

Modified: trunk/Spec/SvgDomSpec.js
===================================================================
--- trunk/Spec/SvgDomSpec.js	2011-01-18 14:13:50 UTC (rev 2310)
+++ trunk/Spec/SvgDomSpec.js	2011-01-18 15:01:01 UTC (rev 2311)
@@ -230,7 +230,7 @@
         n.d = ti;
         n.e = ti;
         n.f = ti;
-        var d = n.multiply(s);
+        var d = s.multiply(n);
         /*注:sが単位行列であることに注意すること (Note that the variable 's' is a identity matrix)*/
         expect(d.a).toEqual(ti);
         expect(d.b).toEqual(ti);
@@ -242,5 +242,25 @@
       }
       t = null;
     });
+    /*同値分割をして、無効同値クラスを調べておく (equivalence partitioning, the following is the invalid partion)*/
+    it("should throw an Error, when it calls a 'multiply' method", function() {
+      var t = [Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, Number.NaN, {}, [], "", "1", "-1", undefined, null];
+      for (var i=0,tli=t.length;i<tli;++i) {
+        var ti = t[i], sn = function() {
+          var n = svg.createSVGMatrix();
+          n.a = 0;
+          n.b = 0;
+          n.c = 0;
+          n.d = 0;
+          n.e = 0;
+          n.f = ti;
+          s.multiply(n);
+        };
+        expect(sn).toThrow();
+        ti = sn = null;
+      }
+      t = null;
+    });
+
   });
 });
\ No newline at end of file




Sie-announce メーリングリストの案内
Zurück zum Archiv-Index