OSDN Git Service

Support the setAdditive method
authordhrname <dhrname@users.sourceforge.jp>
Sat, 28 Nov 2015 13:45:26 +0000 (22:45 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 28 Nov 2015 13:45:26 +0000 (22:45 +0900)
tool/Spec/spec/SvgDomSpec.js

index 593a664..a88501a 100644 (file)
@@ -3235,7 +3235,31 @@ describe("SMIL Animation Spec", function() {
         expect(from.$to.distance(from)).toBe(0);\r
       } );\r
   } );\r
-    describe("A setAdditive method", function() {\r
+  describe("A setAdditive method", function() {\r
+      var from = base("$from");\r
+       beforeEach( function() {\r
+         from = base("$from").up();\r
+         from.string = "";\r
+         from.up("$to");\r
+       } );\r
+      /*境界条件を調べておく (limit value analysis)*/\r
+      it("should be this for the value  (limit value analysis)", function() {\r
+        expect(from.setAdditive()).toBe(0);\r
+        expect(from.setAdditive("")).toBe(0);\r
+        expect(from.additive).toEqual([0]);\r
+        expect(from.setAdditive("1")).toEqual([1]);\r
+        expect(from.additive).toEqual([1]);\r
+      } );\r
+      /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
+      it("should be this for the value (the valid partion)", function() {\r
+        expect(from.setAdditive("1 2, 3")).toEqual([1, 2, 3]);\r
+        expect(from.additive).toEqual([1, 2, 3]);\r
+      } );\r
+      /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
+      it("should be this for the value (the invalid partion)", function() {\r
+      } );\r
+  } );\r
+  describe("A setAccumulate method", function() {\r
       var from = base("$from");\r
        beforeEach( function() {\r
          from = base("$from").up();\r