From 1403b458215b2c3aa1a6d7d92c1d8a8224e8b8cb Mon Sep 17 00:00:00 2001 From: dhrname Date: Wed, 25 Feb 2015 21:34:13 +0900 Subject: [PATCH] Change a name object to the object --- org/w3c/dom/smil.js | 4 ++-- tool/Spec/spec/SvgDomSpec.js | 28 ++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 7b4bc47..25409c3 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -462,9 +462,9 @@ base("$from").of( { /*$advanceオブジェクトに適用させる関数*/ call: function() { - return this.$advance; + return this.$to; } } ) - .up("$advance"); + .up("$to"); //#endif // _SMIL_IDL_ diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index c309420..86c430c 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2893,6 +2893,18 @@ describe("SMIL Animation Spec", function() { from.up().call(); expect(from.$1.numList[1]).toBe(-1); expect(from.$1.strList.join("")).toBe("ba"); + + from.string = "あ 0b-1.0a12"; + expect(from.numList()[1]).toBe(-1); + expect(from.strList().join("")).toBe("あ ba12"); + + from.string = "0b-1.0a0"; + expect(from.numList().join(",")).toBe("0,-1,0"); + expect(from.strList().join("")).toBe("ba"); + + from.string = "0b .1a"; + expect(from.numList()[1]).toBe(0.1); + expect(from.strList().join("")).toBe("b a"); } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ it("should be this for the value (the invalid partion)", function() { @@ -2909,21 +2921,25 @@ describe("SMIL Animation Spec", function() { expect(from.strList()).toBeNull(); } ) } ); - describe("A $advance object", function() { + describe("A $to object", function() { var from = base("$from"); beforeEach( function() { - from = from.up(); + from = base("$from").up(); from.string = ""; } ); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { - expect(from.$advance instanceof from.constructor).toBeTruthy(); - expect(from.call()).toBe(from.$advance); - expect(from.$advance.call()).toBe(from.$advance); + expect(from.$to instanceof from.constructor).toBeTruthy(); + expect(from.call()).toBe(from.$to); + expect(from.$to.call()).toBe(from.$to); } ); /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ it("should be this for the value (the valid partion)", function() { - from.up("$advance"); + from.up("$to"); + from.$to.string = "12cm-7"; + expect(from.$to.numList().join(",")).toBe("12,-7"); + expect(from.$to.strList().toString()).toBe("cm"); + } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ it("should be this for the value (the invalid partion)", function() { -- 2.11.0