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