From: dhrname Date: Sat, 28 Nov 2015 13:45:26 +0000 (+0900) Subject: Support the setAdditive method X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=81f01dd8a88569936f9cffa21b5cadf08006a2d7;p=sie%2Fsie.git Support the setAdditive method --- diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 593a664..a88501a 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -3235,7 +3235,31 @@ describe("SMIL Animation Spec", function() { expect(from.$to.distance(from)).toBe(0); } ); } ); - describe("A setAdditive method", function() { + describe("A setAdditive method", function() { + var from = base("$from"); + beforeEach( function() { + from = base("$from").up(); + from.string = ""; + from.up("$to"); + } ); + /*境界条件を調べておく (limit value analysis)*/ + it("should be this for the value (limit value analysis)", function() { + expect(from.setAdditive()).toBe(0); + expect(from.setAdditive("")).toBe(0); + expect(from.additive).toEqual([0]); + expect(from.setAdditive("1")).toEqual([1]); + expect(from.additive).toEqual([1]); + } ); + /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ + it("should be this for the value (the valid partion)", function() { + expect(from.setAdditive("1 2, 3")).toEqual([1, 2, 3]); + expect(from.additive).toEqual([1, 2, 3]); + } ); + /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ + it("should be this for the value (the invalid partion)", function() { + } ); + } ); + describe("A setAccumulate method", function() { var from = base("$from"); beforeEach( function() { from = base("$from").up();