public final void testSetIntIntIntInt() { Rect r = new Rect(1, 2, 3, 4); Rect r2 = r.set(3, 4, 20, 30); assertSame(r2, r); assertEquals(3, r2.x); assertEquals(4, r2.y); assertEquals(20, r2.w); assertEquals(30, r2.h); }
public final void testSetRect() { Rect r = new Rect(1, 2, 3, 4); Rect r2 = new Rect(3, 4, 20, 30); Rect r3 = r.set(r2); assertSame(r3, r); assertNotSame(r3, r2); assertEquals(3, r.x); assertEquals(4, r.y); assertEquals(20, r.w); assertEquals(30, r.h); }