});
/*normalizeメソッドの境界条件を調べておく (limit value analysis, when it calls a normalize method)*/
it("should be this for the value, when it calls a normalize method (limit value analysis)", function() {
+ var text, ttext,
+ tle = [doc.createTextNode(""), doc.createTextNode("0"), doc.createTextNode("a")];
+ s.normalize();
+ expect(s.firstChild).toBeNull();
+ expect(s.lastChild).toBeNull();
+ s.appendChild(tle[0]);
+ s.normalize();
+ expect(s.firstChild).toNotBe(null);
+ expect(s.lastChild).toNotBe(null);
+ expect(s.firstChild.nodeValue).toEqual("");
+ for (var i=0; i<tle.legnth-1; ++i) {
+ text = tle[i],
+ ttext = tle[i+1];
+ s.appendChild(text);
+ s.appendChild(ttext);
+ expect(s.firstChild).toEqual(text);
+ expect(s.lastChild).toEqual(ttext);
+ s.norbalize();
+ expect(s.firstChild.nodeValue).toEqual(text.nodeValue+ttext.nodeValue);
+ expect(s.firstChild).toNotBe(text);
+ expect(s.lastChild).toNotBe(ttext);
+ }
});
/*isSupportedメソッドの境界条件を調べておく (limit value analysis, when it calls a isSupported method)*/
it("should be this for the value, when it calls a isSupported method (limit value analysis)", function() {
});
/*hasAttributesメソッドの境界条件を調べておく (limit value analysis, when it calls a hasAttributes method)*/
it("should be this for the value, when it calls a hasAttributes method (limit value analysis)", function() {
+ expect(s.hasAttributes()).toEqual(false);
+ s.setAttributeNS(null, "a", "b");
+ expect(s.hasAttributes()).toEqual(true);
+ expect(t.hasAttributes()).toEqual(false);
+ t.setAttributeNS(null, "c", "d");
+ expect(t.hasAttributes()).toEqual(true);
});
/*insertBeforeメソッドの同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/