/*keySpline属性の値を設定*/\r
keySpline: null,\r
\r
- from: base("$from"),\r
+ to: base("$from").$to,\r
\r
/*与えられたアニメーションの進捗率を使った時間の圧縮率を計算するための関数を返す*/\r
call: function() {\r
if (!this.keyTime) {\r
t = 0;\r
} \r
- return t / this.keyTime;\r
+ t = t / this.keyTime;\r
+ return t;\r
}.bind(this);\r
}\r
} );\r
} );\r
describe("A $calcMode object", function() {\r
var calc = base("$calcMode"),\r
- from = calc.from;\r
+ to = calc.to;\r
beforeEach( function() {\r
calc = calc.up();\r
- calc.from = from = from.up();\r
- from.up("$to");\r
+ calc.to = to = to.up();\r
+ to.from = to.from.up();\r
} );\r
/*境界条件を調べておく (limit value analysis)*/\r
it("should be this for the value (limit value analysis)", function() {\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion)", function() {\r
calc.keyTime = 0.5;\r
- expect(calc.call()(0.2)).toEqual(0.4);\r
- expect(calc.call()(0.3)).toEqual(0.6);\r
+ expect(calc.call()(0.2)).toBe("0.4");\r
+ expect(calc.call()(0.3)).toBe("0.6");\r
/*もう一度確かめる*/\r
- expect(calc.call()(0.2)).toEqual(0.4);\r
+ expect(calc.call()(0.2)).toBe("0.4");\r
\r
calc = base("$calcMode").up();\r
calc.keyTime = 0.2;\r
- from.string = "0s";\r
- from.$to.string = "1s";\r
- from.$to.degit = 1;\r
- from.$to.call();\r
- from.call();\r
- expect(from.$to.advance(0.1)).toBe("0.5s");\r
+ to.from.string = "0s";\r
+ to.string = "1s";\r
+ to.degit = 1;\r
+ expect(calc.call()(0.1)).toBe("0.5s");\r
} );\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion)", function() {\r