diff --git a/tests/tests/swfs/avm2/rectangle/Test.as b/tests/tests/swfs/avm2/rectangle/Test.as new file mode 100644 index 000000000..6e0bacf26 --- /dev/null +++ b/tests/tests/swfs/avm2/rectangle/Test.as @@ -0,0 +1,179 @@ +package { + + public class Test { + } +} + +import flash.geom.Rectangle; +import flash.geom.Point; + +function dump(rect, desc) +{ + var _loc1_ = "("; + _loc1_ += "top=" + rect.top + ", "; + _loc1_ += "right=" + rect.right + ", "; + _loc1_ += "bottom=" + rect.bottom + ", "; + _loc1_ += "left=" + rect.left + ", "; + _loc1_ += "topLeft=" + rect.topLeft + ", "; + _loc1_ += "bottomRight=" + rect.bottomRight + ", "; + _loc1_ += "width=" + rect.width + ", "; + _loc1_ += "height=" + rect.height + ", "; + _loc1_ += "size=" + rect.size + ", "; + _loc1_ += "x=" + rect.x + ", "; + _loc1_ += "y=" + rect.y + ")"; + trace(" // " + desc); + trace(_loc1_); + trace(""); +} +function setAndDump(rect, key, value) +{ + rect[key] = value; + dump(rect,"rect." + key + " = " + value); +} +function tryValues(key, values) +{ + trace(""); + trace("/// " + key); + trace(""); + var _loc2_ = new Rectangle(1,3,5,7); + dump(_loc2_,"before modifications"); + var _loc1_ = 0; + while(_loc1_ < values.length) + { + _loc2_ = new Rectangle(1,3,5,7); + setAndDump(_loc2_,key,values[_loc1_]); + _loc1_ = _loc1_ + 1; + } +} +function tryMethod(name, argsList, isRect, dumpOrig) +{ + trace(""); + trace("/// " + name); + trace(""); + var _loc5_ = new Rectangle(1,3,5,7); + dump(_loc5_,"rect"); + var _loc4_ = 0; + while(_loc4_ < argsList.length) + { + _loc5_ = new Rectangle(1,3,5,7); + var _loc3_ = argsList[_loc4_]; + var _loc1_ = ""; + var _loc2_ = 0; + while(_loc2_ < _loc3_.length) + { + if(_loc1_.length > 0) + { + _loc1_ += ", "; + } + _loc1_ += _loc3_[_loc2_]; + _loc2_ = _loc2_ + 1; + } + var _loc6_ = _loc5_[name].apply(_loc5_,_loc3_); + if(isRect) + { + dump(_loc6_,"rect." + name + "(" + _loc1_ + ")"); + } + else + { + trace("// rect." + name + "(" + _loc1_ + ")"); + trace(_loc6_); + trace(""); + } + if(dumpOrig) + { + dump(_loc5_,"rect"); + } + _loc4_ = _loc4_ + 1; + } +} +trace("/// Constructor"); +trace(""); +dump(new Rectangle(),"new Rectangle()"); +dump(new Rectangle(1),"new Rectangle(1)"); +dump(new Rectangle(1,2),"new Rectangle(1, 2)"); +dump(new Rectangle(1,2,3),"new Rectangle(1, 2, 3)"); +dump(new Rectangle(1,2,3,4),"new Rectangle(1, 2, 3, 4)"); +var numberValues = [0,100,-200,NaN,Infinity]; +tryValues("top",numberValues); +tryValues("right",numberValues); +tryValues("left",numberValues); +tryValues("bottom",numberValues); +tryValues("width",numberValues); +tryValues("height",numberValues); +tryValues("x",numberValues); +tryValues("y",numberValues); +var pointValues = [new Point(0,0),new Point(-100,-200),new Point(100,200),new Point(Infinity,Infinity),new Point(NaN,NaN)]; +tryValues("topLeft",pointValues); +tryValues("bottomRight",pointValues); +tryValues("size",pointValues); +trace(""); +trace("/// clone"); +trace(""); +var orig = new Rectangle(1,3,5,7); +var cloned = orig.clone(); +dump(orig,"orig"); +dump(cloned,"cloned"); +trace("// orig == cloned"); +trace(orig == cloned); +trace(""); +trace("// orig.equals(cloned)"); +trace(orig.equals(cloned)); +trace(""); +trace(""); +trace("/// equals"); +trace(""); +var orig = new Rectangle(1,3,5,7); +dump(orig,"orig"); +trace("// orig.equals(new Rectangle(1, 3, 5, 7))"); +trace(orig.equals(new Rectangle(1,3,5,7))); +trace(""); +// trace(""); +// trace("/// isEmpty"); +// trace(""); +// trace("// new Rectangle().isEmpty()"); +// trace(new Rectangle().isEmpty()); +// trace(""); +// trace("// new Rectangle(0, 0, 0, 0).isEmpty()"); +// trace(new Rectangle(0,0,0,0).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, 3, 0).isEmpty()"); +// trace(new Rectangle(1,2,3,0).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, 0, 4).isEmpty()"); +// trace(new Rectangle(1,2,0,4).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, 3, 4).isEmpty()"); +// trace(new Rectangle(1,2,3,4).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, Infinity, Infinity).isEmpty()"); +// trace(new Rectangle(1,2,Infinity,Infinity).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, NaN, NaN).isEmpty()"); +// trace(new Rectangle(1,2,NaN,NaN).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, undefined, undefined).isEmpty()"); +// trace(new Rectangle(1,2,undefined,undefined).isEmpty()); +// trace(""); +// trace("// new Rectangle(1, 2, -1, -2).isEmpty()"); +// trace(new Rectangle(1,2,-1,-2).isEmpty()); +// trace(""); +// trace(""); +// trace("/// setEmpty"); +// trace(""); +// var orig = new Rectangle(1,3,5,7); +// dump(orig,"orig"); +// trace("// orig.setEmpty()"); +// trace(orig.setEmpty()); +// trace(""); +// dump(orig,"orig"); +// tryMethod("contains",[[1,2],[1,3],[1.1,3.1],[6,10],[5.9,9.9],[4,NaN],[undefined,5],[5,"5"],[5,Infinity]],false,false); +// tryMethod("containsPoint",[[new Point()],[new Point(1)],[new Point(1,2)],[new Point(1,3)],[new Point(1.1,3.1)],[new Point(6,10)],[new Point(5.9,9.9)],[new Point(undefined,5)]],false,false); +// tryMethod("containsRect",[[new Rectangle(0.9,2.9,5,7)],[new Rectangle(1,3,5.1,7.1)],[new Rectangle(2,undefined,1,1)],[new Rectangle(5,5,NaN,1)]],false,false); +// tryMethod("inflate",[[1,2],[-3,-4],[Infinity,5],[5,NaN],[3,{}]],false,true); +// tryMethod("inflatePoint",[[new Point(1,2)]],false,true); +// tryMethod("intersection",[[new Rectangle(3,5,7,9)],[new Rectangle(-1,-3,5,7)],[new Rectangle(30,50,1,1)]],true, false); +// tryMethod("intersects",[[new Rectangle(3,5,7,9)],[new Rectangle(-1,-3,5,7)]], false, false); +// tryMethod("offset",[[1,2],[-3,-4],[Infinity,5]],false,true); +// tryMethod("offsetPoint",[[new Point(1,2)]],false,true); +// tryMethod("union",[[new Rectangle(3,5,7,9)],[new Rectangle(-1,-3,5,7)]],true, false); +tryMethod("setTo",[[3,5,7,9],[-1,-3,5,7]],false, true); diff --git a/tests/tests/swfs/avm2/rectangle/Test.swf b/tests/tests/swfs/avm2/rectangle/Test.swf new file mode 100644 index 000000000..8519e395a Binary files /dev/null and b/tests/tests/swfs/avm2/rectangle/Test.swf differ diff --git a/tests/tests/swfs/avm2/rectangle/output.txt b/tests/tests/swfs/avm2/rectangle/output.txt new file mode 100644 index 000000000..6cbb2dca0 --- /dev/null +++ b/tests/tests/swfs/avm2/rectangle/output.txt @@ -0,0 +1,289 @@ +/// Constructor + + // new Rectangle() +(top=0, right=0, bottom=0, left=0, topLeft=(x=0, y=0), bottomRight=(x=0, y=0), width=0, height=0, size=(x=0, y=0), x=0, y=0) + + // new Rectangle(1) +(top=0, right=1, bottom=0, left=1, topLeft=(x=1, y=0), bottomRight=(x=1, y=0), width=0, height=0, size=(x=0, y=0), x=1, y=0) + + // new Rectangle(1, 2) +(top=2, right=1, bottom=2, left=1, topLeft=(x=1, y=2), bottomRight=(x=1, y=2), width=0, height=0, size=(x=0, y=0), x=1, y=2) + + // new Rectangle(1, 2, 3) +(top=2, right=4, bottom=2, left=1, topLeft=(x=1, y=2), bottomRight=(x=4, y=2), width=3, height=0, size=(x=3, y=0), x=1, y=2) + + // new Rectangle(1, 2, 3, 4) +(top=2, right=4, bottom=6, left=1, topLeft=(x=1, y=2), bottomRight=(x=4, y=6), width=3, height=4, size=(x=3, y=4), x=1, y=2) + + +/// top + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.top = 0 +(top=0, right=6, bottom=10, left=1, topLeft=(x=1, y=0), bottomRight=(x=6, y=10), width=5, height=10, size=(x=5, y=10), x=1, y=0) + + // rect.top = 100 +(top=100, right=6, bottom=10, left=1, topLeft=(x=1, y=100), bottomRight=(x=6, y=10), width=5, height=-90, size=(x=5, y=-90), x=1, y=100) + + // rect.top = -200 +(top=-200, right=6, bottom=10, left=1, topLeft=(x=1, y=-200), bottomRight=(x=6, y=10), width=5, height=210, size=(x=5, y=210), x=1, y=-200) + + // rect.top = NaN +(top=NaN, right=6, bottom=NaN, left=1, topLeft=(x=1, y=NaN), bottomRight=(x=6, y=NaN), width=5, height=NaN, size=(x=5, y=NaN), x=1, y=NaN) + + // rect.top = Infinity +(top=Infinity, right=6, bottom=NaN, left=1, topLeft=(x=1, y=Infinity), bottomRight=(x=6, y=NaN), width=5, height=-Infinity, size=(x=5, y=-Infinity), x=1, y=Infinity) + + +/// right + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.right = 0 +(top=3, right=0, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=0, y=10), width=-1, height=7, size=(x=-1, y=7), x=1, y=3) + + // rect.right = 100 +(top=3, right=100, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=100, y=10), width=99, height=7, size=(x=99, y=7), x=1, y=3) + + // rect.right = -200 +(top=3, right=-200, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=-200, y=10), width=-201, height=7, size=(x=-201, y=7), x=1, y=3) + + // rect.right = NaN +(top=3, right=NaN, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=NaN, y=10), width=NaN, height=7, size=(x=NaN, y=7), x=1, y=3) + + // rect.right = Infinity +(top=3, right=Infinity, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=Infinity, y=10), width=Infinity, height=7, size=(x=Infinity, y=7), x=1, y=3) + + +/// left + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.left = 0 +(top=3, right=6, bottom=10, left=0, topLeft=(x=0, y=3), bottomRight=(x=6, y=10), width=6, height=7, size=(x=6, y=7), x=0, y=3) + + // rect.left = 100 +(top=3, right=6, bottom=10, left=100, topLeft=(x=100, y=3), bottomRight=(x=6, y=10), width=-94, height=7, size=(x=-94, y=7), x=100, y=3) + + // rect.left = -200 +(top=3, right=6, bottom=10, left=-200, topLeft=(x=-200, y=3), bottomRight=(x=6, y=10), width=206, height=7, size=(x=206, y=7), x=-200, y=3) + + // rect.left = NaN +(top=3, right=NaN, bottom=10, left=NaN, topLeft=(x=NaN, y=3), bottomRight=(x=NaN, y=10), width=NaN, height=7, size=(x=NaN, y=7), x=NaN, y=3) + + // rect.left = Infinity +(top=3, right=NaN, bottom=10, left=Infinity, topLeft=(x=Infinity, y=3), bottomRight=(x=NaN, y=10), width=-Infinity, height=7, size=(x=-Infinity, y=7), x=Infinity, y=3) + + +/// bottom + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.bottom = 0 +(top=3, right=6, bottom=0, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=0), width=5, height=-3, size=(x=5, y=-3), x=1, y=3) + + // rect.bottom = 100 +(top=3, right=6, bottom=100, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=100), width=5, height=97, size=(x=5, y=97), x=1, y=3) + + // rect.bottom = -200 +(top=3, right=6, bottom=-200, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=-200), width=5, height=-203, size=(x=5, y=-203), x=1, y=3) + + // rect.bottom = NaN +(top=3, right=6, bottom=NaN, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=NaN), width=5, height=NaN, size=(x=5, y=NaN), x=1, y=3) + + // rect.bottom = Infinity +(top=3, right=6, bottom=Infinity, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=Infinity), width=5, height=Infinity, size=(x=5, y=Infinity), x=1, y=3) + + +/// width + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.width = 0 +(top=3, right=1, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=1, y=10), width=0, height=7, size=(x=0, y=7), x=1, y=3) + + // rect.width = 100 +(top=3, right=101, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=101, y=10), width=100, height=7, size=(x=100, y=7), x=1, y=3) + + // rect.width = -200 +(top=3, right=-199, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=-199, y=10), width=-200, height=7, size=(x=-200, y=7), x=1, y=3) + + // rect.width = NaN +(top=3, right=NaN, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=NaN, y=10), width=NaN, height=7, size=(x=NaN, y=7), x=1, y=3) + + // rect.width = Infinity +(top=3, right=Infinity, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=Infinity, y=10), width=Infinity, height=7, size=(x=Infinity, y=7), x=1, y=3) + + +/// height + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.height = 0 +(top=3, right=6, bottom=3, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=3), width=5, height=0, size=(x=5, y=0), x=1, y=3) + + // rect.height = 100 +(top=3, right=6, bottom=103, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=103), width=5, height=100, size=(x=5, y=100), x=1, y=3) + + // rect.height = -200 +(top=3, right=6, bottom=-197, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=-197), width=5, height=-200, size=(x=5, y=-200), x=1, y=3) + + // rect.height = NaN +(top=3, right=6, bottom=NaN, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=NaN), width=5, height=NaN, size=(x=5, y=NaN), x=1, y=3) + + // rect.height = Infinity +(top=3, right=6, bottom=Infinity, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=Infinity), width=5, height=Infinity, size=(x=5, y=Infinity), x=1, y=3) + + +/// x + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.x = 0 +(top=3, right=5, bottom=10, left=0, topLeft=(x=0, y=3), bottomRight=(x=5, y=10), width=5, height=7, size=(x=5, y=7), x=0, y=3) + + // rect.x = 100 +(top=3, right=105, bottom=10, left=100, topLeft=(x=100, y=3), bottomRight=(x=105, y=10), width=5, height=7, size=(x=5, y=7), x=100, y=3) + + // rect.x = -200 +(top=3, right=-195, bottom=10, left=-200, topLeft=(x=-200, y=3), bottomRight=(x=-195, y=10), width=5, height=7, size=(x=5, y=7), x=-200, y=3) + + // rect.x = NaN +(top=3, right=NaN, bottom=10, left=NaN, topLeft=(x=NaN, y=3), bottomRight=(x=NaN, y=10), width=5, height=7, size=(x=5, y=7), x=NaN, y=3) + + // rect.x = Infinity +(top=3, right=Infinity, bottom=10, left=Infinity, topLeft=(x=Infinity, y=3), bottomRight=(x=Infinity, y=10), width=5, height=7, size=(x=5, y=7), x=Infinity, y=3) + + +/// y + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.y = 0 +(top=0, right=6, bottom=7, left=1, topLeft=(x=1, y=0), bottomRight=(x=6, y=7), width=5, height=7, size=(x=5, y=7), x=1, y=0) + + // rect.y = 100 +(top=100, right=6, bottom=107, left=1, topLeft=(x=1, y=100), bottomRight=(x=6, y=107), width=5, height=7, size=(x=5, y=7), x=1, y=100) + + // rect.y = -200 +(top=-200, right=6, bottom=-193, left=1, topLeft=(x=1, y=-200), bottomRight=(x=6, y=-193), width=5, height=7, size=(x=5, y=7), x=1, y=-200) + + // rect.y = NaN +(top=NaN, right=6, bottom=NaN, left=1, topLeft=(x=1, y=NaN), bottomRight=(x=6, y=NaN), width=5, height=7, size=(x=5, y=7), x=1, y=NaN) + + // rect.y = Infinity +(top=Infinity, right=6, bottom=Infinity, left=1, topLeft=(x=1, y=Infinity), bottomRight=(x=6, y=Infinity), width=5, height=7, size=(x=5, y=7), x=1, y=Infinity) + + +/// topLeft + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.topLeft = (x=0, y=0) +(top=0, right=6, bottom=10, left=0, topLeft=(x=0, y=0), bottomRight=(x=6, y=10), width=6, height=10, size=(x=6, y=10), x=0, y=0) + + // rect.topLeft = (x=-100, y=-200) +(top=-200, right=6, bottom=10, left=-100, topLeft=(x=-100, y=-200), bottomRight=(x=6, y=10), width=106, height=210, size=(x=106, y=210), x=-100, y=-200) + + // rect.topLeft = (x=100, y=200) +(top=200, right=6, bottom=10, left=100, topLeft=(x=100, y=200), bottomRight=(x=6, y=10), width=-94, height=-190, size=(x=-94, y=-190), x=100, y=200) + + // rect.topLeft = (x=Infinity, y=Infinity) +(top=Infinity, right=NaN, bottom=NaN, left=Infinity, topLeft=(x=Infinity, y=Infinity), bottomRight=(x=NaN, y=NaN), width=-Infinity, height=-Infinity, size=(x=-Infinity, y=-Infinity), x=Infinity, y=Infinity) + + // rect.topLeft = (x=NaN, y=NaN) +(top=NaN, right=NaN, bottom=NaN, left=NaN, topLeft=(x=NaN, y=NaN), bottomRight=(x=NaN, y=NaN), width=NaN, height=NaN, size=(x=NaN, y=NaN), x=NaN, y=NaN) + + +/// bottomRight + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.bottomRight = (x=0, y=0) +(top=3, right=0, bottom=0, left=1, topLeft=(x=1, y=3), bottomRight=(x=0, y=0), width=-1, height=-3, size=(x=-1, y=-3), x=1, y=3) + + // rect.bottomRight = (x=-100, y=-200) +(top=3, right=-100, bottom=-200, left=1, topLeft=(x=1, y=3), bottomRight=(x=-100, y=-200), width=-101, height=-203, size=(x=-101, y=-203), x=1, y=3) + + // rect.bottomRight = (x=100, y=200) +(top=3, right=100, bottom=200, left=1, topLeft=(x=1, y=3), bottomRight=(x=100, y=200), width=99, height=197, size=(x=99, y=197), x=1, y=3) + + // rect.bottomRight = (x=Infinity, y=Infinity) +(top=3, right=Infinity, bottom=Infinity, left=1, topLeft=(x=1, y=3), bottomRight=(x=Infinity, y=Infinity), width=Infinity, height=Infinity, size=(x=Infinity, y=Infinity), x=1, y=3) + + // rect.bottomRight = (x=NaN, y=NaN) +(top=3, right=NaN, bottom=NaN, left=1, topLeft=(x=1, y=3), bottomRight=(x=NaN, y=NaN), width=NaN, height=NaN, size=(x=NaN, y=NaN), x=1, y=3) + + +/// size + + // before modifications +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // rect.size = (x=0, y=0) +(top=3, right=1, bottom=3, left=1, topLeft=(x=1, y=3), bottomRight=(x=1, y=3), width=0, height=0, size=(x=0, y=0), x=1, y=3) + + // rect.size = (x=-100, y=-200) +(top=3, right=-99, bottom=-197, left=1, topLeft=(x=1, y=3), bottomRight=(x=-99, y=-197), width=-100, height=-200, size=(x=-100, y=-200), x=1, y=3) + + // rect.size = (x=100, y=200) +(top=3, right=101, bottom=203, left=1, topLeft=(x=1, y=3), bottomRight=(x=101, y=203), width=100, height=200, size=(x=100, y=200), x=1, y=3) + + // rect.size = (x=Infinity, y=Infinity) +(top=3, right=Infinity, bottom=Infinity, left=1, topLeft=(x=1, y=3), bottomRight=(x=Infinity, y=Infinity), width=Infinity, height=Infinity, size=(x=Infinity, y=Infinity), x=1, y=3) + + // rect.size = (x=NaN, y=NaN) +(top=3, right=NaN, bottom=NaN, left=1, topLeft=(x=1, y=3), bottomRight=(x=NaN, y=NaN), width=NaN, height=NaN, size=(x=NaN, y=NaN), x=1, y=3) + + +/// clone + + // orig +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + + // cloned +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + +// orig == cloned +false + +// orig.equals(cloned) +true + + +/// equals + + // orig +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + +// orig.equals(new Rectangle(1, 3, 5, 7)) +true + + +/// setTo + + // rect +(top=3, right=6, bottom=10, left=1, topLeft=(x=1, y=3), bottomRight=(x=6, y=10), width=5, height=7, size=(x=5, y=7), x=1, y=3) + +// rect.setTo(3, 5, 7, 9) +undefined + + // rect +(top=5, right=10, bottom=14, left=3, topLeft=(x=3, y=5), bottomRight=(x=10, y=14), width=7, height=9, size=(x=7, y=9), x=3, y=5) + +// rect.setTo(-1, -3, 5, 7) +undefined + + // rect +(top=-3, right=4, bottom=4, left=-1, topLeft=(x=-1, y=-3), bottomRight=(x=4, y=4), width=5, height=7, size=(x=5, y=7), x=-1, y=-3)