from.up().call();\r
expect(from.$1.numList[1]).toBe(-1);\r
expect(from.$1.strList.join("")).toBe("ba");\r
+\r
+ from.string = "あ 0b-1.0a12";\r
+ expect(from.numList()[1]).toBe(-1);\r
+ expect(from.strList().join("")).toBe("あ ba12");\r
+\r
+ from.string = "0b-1.0a0";\r
+ expect(from.numList().join(",")).toBe("0,-1,0");\r
+ expect(from.strList().join("")).toBe("ba");\r
+\r
+ from.string = "0b .1a";\r
+ expect(from.numList()[1]).toBe(0.1);\r
+ expect(from.strList().join("")).toBe("b a");\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion)", function() {\r
expect(from.strList()).toBeNull();\r
} )\r
} );\r
- describe("A $advance object", function() {\r
+ describe("A $to object", function() {\r
var from = base("$from");\r
beforeEach( function() {\r
- from = from.up();\r
+ from = base("$from").up();\r
from.string = "";\r
} );\r
/*境界条件を調べておく (limit value analysis)*/\r
it("should be this for the value (limit value analysis)", function() {\r
- expect(from.$advance instanceof from.constructor).toBeTruthy();\r
- expect(from.call()).toBe(from.$advance);\r
- expect(from.$advance.call()).toBe(from.$advance);\r
+ expect(from.$to instanceof from.constructor).toBeTruthy();\r
+ expect(from.call()).toBe(from.$to);\r
+ expect(from.$to.call()).toBe(from.$to);\r
} );\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion)", function() {\r
- from.up("$advance");\r
+ from.up("$to");\r
+ from.$to.string = "12cm-7";\r
+ expect(from.$to.numList().join(",")).toBe("12,-7");\r
+ expect(from.$to.strList().toString()).toBe("cm");\r
+\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion)", function() {\r