From 849c981f0a6118d5912be72c792c3c78b829b066 Mon Sep 17 00:00:00 2001 From: dhrname Date: Tue, 24 Feb 2015 21:37:51 +0900 Subject: [PATCH] New object --- org/w3c/dom/smil.js | 9 ++++++++- tool/Spec/spec/SvgDomSpec.js | 24 +++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 4661631..7b4bc47 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -458,6 +458,13 @@ base("$from").of( { /*呈示値の文字部分だけを抜き出した配列を返す*/ strList: function() { return this.string.match(/[^\d\-\+\.eE]+/g); + }, + + /*$advanceオブジェクトに適用させる関数*/ + call: function() { + return this.$advance; } -} ); + +} ) + .up("$advance"); //#endif // _SMIL_IDL_ diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 21d365a..b648042 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2811,8 +2811,8 @@ describe("SMIL Animation Spec", function() { describe("A $from object", function() { var from = base("$from"); beforeEach( function() { + from = from.up(); from.string = ""; - $from = from.up(); } ); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { @@ -2889,6 +2889,10 @@ describe("SMIL Animation Spec", function() { from.string = "0b-1.0a"; expect(from.numList()[1]).toBe(-1); expect(from.strList().join("")).toBe("ba"); + + from.up().call(); + expect(from.$1.numList[1]).toBe(-1); + expect(from.$1.strList.join("")).toBe("ba"); } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ it("should be this for the value (the invalid partion)", function() { @@ -2905,4 +2909,22 @@ describe("SMIL Animation Spec", function() { expect(from.strList()).toBeNull(); } ) } ); + describe("A $advance object", function() { + var from = base("$from"); + beforeEach( function() { + from = 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); + } ); + /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ + it("should be this for the value (the valid partion)", function() { + } ); + /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ + it("should be this for the value (the invalid partion)", function() { + } ); + } ); } ); -- 2.11.0