/*objを適用*/\r
this.timelines.push( this.up("$line").of(obj) );\r
return true;\r
+ },\r
+ \r
+ /*removeLine メソッド\r
+ * 指定されたタイムラインのオブジェクトを、リストから削除する*/\r
+ removeLine: function( /*Object*/ timeline ) {\r
+ var list = this.timelines,\r
+ j = 0,\r
+ t;\r
+ while (t = list[j]) {\r
+ if (t === timeline) {\r
+ list.splice(j, 1); //Arrayのspliceを利用して、リストからtimelineを排除\r
+ break;\r
+ }\r
+ ++j;\r
+ }\r
}\r
} );\r
\r
frame.setFrame(0);\r
/*負の値も許される*/\r
frame.setFrame(-1);\r
+ \r
expect(frame.addLine()).toBe(false);\r
expect(frame.addLine({})).toBe(false);\r
expect(frame.addLine({\r
expect(frame.addLine({\r
activeTime: 1\r
})).toBe(false);\r
+ \r
+ expect(frame.removeLine()).toBeUndefined();\r
+ expect(frame.removeLine({})).toBeUndefined();\r
});\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion)", function() {\r
var timeline = frame.timelines[0];\r
expect(timeline.begin).toBe(0);\r
expect(timeline.activeTime).toBe(0);\r
+ \r
+ frame.removeLine({});\r
+ expect(frame.timelines[0]).toBe(timeline);\r
+ frame.removeLine(timeline);\r
+ expect(frame.timelines[0]).not.toBe(timeline);\r
});\r
/*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r
it("should be this for the value (the invalid partion)", function() {\r