svnno****@sourc*****
svnno****@sourc*****
2011年 3月 9日 (水) 23:38:06 JST
Revision: 2467 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2467 Author: dhrname Date: 2011-03-09 23:38:06 +0900 (Wed, 09 Mar 2011) Log Message: ----------- convertToSpecifiedUnitsメソッドの同値分割テストに、新たなテストを追加 Modified Paths: -------------- trunk/Spec/spec/SvgDomSpec.js Modified: trunk/Spec/spec/SvgDomSpec.js =================================================================== --- trunk/Spec/spec/SvgDomSpec.js 2011-03-09 14:07:33 UTC (rev 2466) +++ trunk/Spec/spec/SvgDomSpec.js 2011-03-09 14:38:06 UTC (rev 2467) @@ -152,7 +152,17 @@ expect(s.valueAsString).toEqual("0" + unit[i-1]); expect(s.unitType).toEqual(i); } - unit = null; + /*2cmにまず設定しておいて、その後、convertToSpecifiedUnitsメソッドで"mm"単位に変換する。 + * (The 's' value set to "2cm", and convert from "cm" to "mm" unit in convertToSpecifiedUnits method. + */ + s.newValueSpecifiedUnits(6, 2); + var sv = s.value; + s.convertToSpecifiedUnits(7); + expect(s.valueInSpecifiedUnits).toEqual(20); + expect(s.value).toEqual(sv); + expect(s.valueAsString).toEqual("20mm"); + expect(s.unitType).toEqual(7); + unit = sv = null; }); /*同値分割をして、無効同値クラスを調べておく (equivalence partitioning, the following is the invalid partion)*/ it("should throw a DOMException 'Not Supported Error', when it calls a convertToSpecifiedUnits method", function() {