/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
Group g;
public void setUp() {
- p1 = new Point(10, 100);
- p2 = new Point(20, 200);
- l1 = new Line(p1, p2);
+ p1 = new Point(10, 100);
+ p2 = new Point(20, 200);
+ l1 = new Line(p1, p2);
bb = new Box(5, 5, 10, 10);
sloth1 = new SlothfulPoint(0, 0);
- g = new Group(p1);
+ g = new Group(p1);
}
public final void testCreate() {
}
public final void testSetPoint() {
- p1.setX(20);
+ p1.setX(20);
assertEquals(p1.getX(), 20);
assertEquals(p1.getY(), 100);
- p1.setY(10);
+ p1.setY(10);
assertEquals(p1.getX(), 20);
assertEquals(p1.getY(), 10);
}
public final void testMoveLine1() {
- l1.move(40, 40);
+ l1.move(40, 40);
assertEquals(l1.getP1(), p1);
assertEquals(l1.getP2(), p2);
}
public final void testMoveLine2() {
- l1.move(-10, -10);
+ l1.move(-10, -10);
assertEquals(p1.getX(), 0);
assertEquals(p1.getY(), 90);
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testSetXPointLog() {
- p1.setX(20);
+ p1.setX(20);
assertEquals("set;", Log.getString());
}
public void testSetYPointLog() {
- p1.setY(10);
+ p1.setY(10);
assertEquals("", Log.getString());
}
public void testGetYPointLog() {
- p1.getY();
+ p1.getY();
assertEquals("", Log.getString());
}
public void testMoveLineLog() {
- l1.move(40, 40);
+ l1.move(40, 40);
assertEquals("", Log.getString());
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
public void testNull() {
try {
- g.add(null);
+ g.add(null);
fail("should have thrown IllegalArgumentException");
} catch (IllegalArgumentException ea) {
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
public void testNull() {
try {
- g.add(null);
+ g.add(null);
fail("should have thrown IllegalArgumentException");
} catch (IllegalArgumentException ea) {
}
public void testSelf() {
try {
- g.add(g);
+ g.add(g);
fail("should have thrown IllegalArgumentException");
} catch (IllegalArgumentException ea) {
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
public void testSetting() {
try {
- sloth1.setX(10);
+ sloth1.setX(10);
fail("should have thrown RuntimeException");
} catch (RuntimeException ea) {
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
try {
sq.getP0().setX(100);
- sq.move(37, 1);
+ sq.move(37, 1);
fail("should have thrown IllegalStateException");
} catch (IllegalStateException e) { }
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testMovePointLog() {
- p1.move(20, 30);
+ p1.move(20, 30);
assertEquals("moving;", Log.getString());
}
}
public void testGetYPointLog() {
- p1.getY();
+ p1.getY();
assertEquals("", Log.getString());
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testCreateWithPointLog() {
- g = new Group(p1);
+ g = new Group(p1);
assertEquals("adding Point;", Log.getString());
}
public void testCreateWithoutPointLog() {
- g = new Group(l1);
+ g = new Group(l1);
assertEquals("", Log.getString());
}
public void testAddPointLog() {
- g.add(p1);
+ g.add(p1);
assertEquals("adding Point;", Log.getString());
}
public void testAddNonPointLog() {
- g.add(l1);
+ g.add(l1);
assertEquals("", Log.getString());
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testMoveLonePoint() {
- p1 = new Point(0, 0);
- p1.move(37, 88);
+ p1 = new Point(0, 0);
+ p1.move(37, 88);
assertEquals("moving as a part of null;", Log.getString());
}
public void testMoveGroupedPoint() {
- g = new Group(p1);
- p1.move(0, 0);
+ g = new Group(p1);
+ p1.move(0, 0);
assertEquals("moving as a part of " + g + ";", Log.getString());
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
public class Test4a extends Test {
Rectangle wholeCanvas =
- new Rectangle(FigureElement.MIN_VALUE, FigureElement.MIN_VALUE,
- FigureElement.MAX_VALUE, FigureElement.MAX_VALUE);
+ new Rectangle(FigureElement.MIN_VALUE, FigureElement.MIN_VALUE,
+ FigureElement.MAX_VALUE, FigureElement.MAX_VALUE);
public Test4a(String name) { super(name); }
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testBasicEquality() {
- assertTrue(g.getBounds() == g.getBounds());
+ assertTrue(g.getBounds() == g.getBounds());
}
public void testEqualityAfterAddition() {
- Point p0 = new Point(1, 2);
- Point p1 = new Point(2, 3);
-
- Group g0 = new Group(p0);
- Group g1 = new Group(p1);
-
- Rectangle r0 = g0.getBounds();
- Rectangle r1 = g1.getBounds();
- assertTrue(r0 != r1);
- g0.add(new Point(37, 90));
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
-
- g1.add(new Point(4, 8));
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
+ Point p0 = new Point(1, 2);
+ Point p1 = new Point(2, 3);
+
+ Group g0 = new Group(p0);
+ Group g1 = new Group(p1);
+
+ Rectangle r0 = g0.getBounds();
+ Rectangle r1 = g1.getBounds();
+ assertTrue(r0 != r1);
+ g0.add(new Point(37, 90));
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
+
+ g1.add(new Point(4, 8));
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
}
public void testNotWholeCanvas() {
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testBasicEquality() {
- assertTrue(g.getBounds() == g.getBounds());
+ assertTrue(g.getBounds() == g.getBounds());
}
public void testEqualityAfterAddition() {
- Point p0 = new Point(1, 2);
- Point p1 = new Point(2, 3);
-
- Group g0 = new Group(p0);
- Group g1 = new Group(p1);
-
- Rectangle r0 = g0.getBounds();
- Rectangle r1 = g1.getBounds();
- assertTrue(r0 != r1);
- g0.add(new Point(37, 90));
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
-
- g1.add(new Point(4, 8));
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
+ Point p0 = new Point(1, 2);
+ Point p1 = new Point(2, 3);
+
+ Group g0 = new Group(p0);
+ Group g1 = new Group(p1);
+
+ Rectangle r0 = g0.getBounds();
+ Rectangle r1 = g1.getBounds();
+ assertTrue(r0 != r1);
+ g0.add(new Point(37, 90));
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
+
+ g1.add(new Point(4, 8));
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
}
public void testEqualityAfterMove() {
- Point p0 = new Point(1, 2);
- Point p1 = new Point(2, 3);
-
- Group g0 = new Group(p0);
- Group g1 = new Group(p1);
-
- Rectangle r0 = g0.getBounds();
- Rectangle r1 = g1.getBounds();
- assertTrue(r0 != r1);
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
-
- g0.move(3, 1);
- Rectangle r00 = g0.getBounds();
- Rectangle r10 = g1.getBounds();
-
- assertTrue(r10 != r00);
- assertTrue(r0 != r00);
- assertTrue(g0.getBounds() == r00);
+ Point p0 = new Point(1, 2);
+ Point p1 = new Point(2, 3);
+
+ Group g0 = new Group(p0);
+ Group g1 = new Group(p1);
+
+ Rectangle r0 = g0.getBounds();
+ Rectangle r1 = g1.getBounds();
+ assertTrue(r0 != r1);
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
+
+ g0.move(3, 1);
+ Rectangle r00 = g0.getBounds();
+ Rectangle r10 = g1.getBounds();
+
+ assertTrue(r10 != r00);
+ assertTrue(r0 != r00);
+ assertTrue(g0.getBounds() == r00);
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testBasicEquality() {
- assertTrue(g.getBounds() == g.getBounds());
+ assertTrue(g.getBounds() == g.getBounds());
}
public void testNonGroupMove() {
- p1.move(3, 27);
+ p1.move(3, 27);
}
public void testEqualityAfterAddition() {
- Rectangle r = g.getBounds();
- g.add(new Point(37, 90));
- assertTrue(g.getBounds() == r);
+ Rectangle r = g.getBounds();
+ g.add(new Point(37, 90));
+ assertTrue(g.getBounds() == r);
}
public void testEqualityAfterMove() {
- Point p0 = new Point(1, 2);
- Point p1 = new Point(2, 3);
-
- Group g0 = new Group(p0);
- Group g1 = new Group(p1);
-
- Rectangle r0 = g0.getBounds();
- Rectangle r1 = g1.getBounds();
- assertTrue(r0 != r1);
- assertTrue(g0.getBounds() == r0);
- assertTrue(g1.getBounds() != r0);
- assertTrue(g0.getBounds() != r1);
- assertTrue(g1.getBounds() == r1);
-
- p0.move(3, 1);
- Rectangle r00 = g0.getBounds();
- Rectangle r10 = g1.getBounds();
-
- assertTrue(r10 != r00);
- assertTrue(r0 != r00);
- assertTrue(g0.getBounds() == r00);
+ Point p0 = new Point(1, 2);
+ Point p1 = new Point(2, 3);
+
+ Group g0 = new Group(p0);
+ Group g1 = new Group(p1);
+
+ Rectangle r0 = g0.getBounds();
+ Rectangle r1 = g1.getBounds();
+ assertTrue(r0 != r1);
+ assertTrue(g0.getBounds() == r0);
+ assertTrue(g1.getBounds() != r0);
+ assertTrue(g0.getBounds() != r1);
+ assertTrue(g1.getBounds() == r1);
+
+ p0.move(3, 1);
+ Rectangle r00 = g0.getBounds();
+ Rectangle r10 = g1.getBounds();
+
+ assertTrue(r10 != r00);
+ assertTrue(r0 != r00);
+ assertTrue(g0.getBounds() == r00);
}
public void testEqualityAfterMove0() {
- g = new Group(p1);
- Rectangle r0 = g.getBounds();
- assertTrue(g.getBounds() == r0);
- p1.move(3, 1);
- Rectangle r1 = g.getBounds();
- assertTrue(r0 != r1);
- assertTrue(r1 == g.getBounds());
+ g = new Group(p1);
+ Rectangle r0 = g.getBounds();
+ assertTrue(g.getBounds() == r0);
+ p1.move(3, 1);
+ Rectangle r1 = g.getBounds();
+ assertTrue(r0 != r1);
+ assertTrue(r1 == g.getBounds());
}
}
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Common Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * PARC initial implementation
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * PARC initial implementation
* ******************************************************************/
package tests;
}
public void testBasicEquality() {
- assertTrue(g.getBounds() == g.getBounds());
+ assertTrue(g.getBounds() == g.getBounds());
}
public void testNonGroupMove() {
- p1.move(3, 27);
+ p1.move(3, 27);
}
public void testEqualityAfterAddition() {
- Rectangle r = g.getBounds();
- g.add(new Point(37, 90));
- assertTrue(g.getBounds() == r);
+ Rectangle r = g.getBounds();
+ g.add(new Point(37, 90));
+ assertTrue(g.getBounds() == r);
}
public void testEqualityAfterMove() {
- g = new Group(p1);
- Rectangle r0 = g.getBounds();
- assertTrue(g.getBounds() == r0);
- p1.move(3, 1);
- Rectangle r1 = g.getBounds();
- assertTrue(r0 != r1);
- assertTrue(r1 == g.getBounds());
+ g = new Group(p1);
+ Rectangle r0 = g.getBounds();
+ assertTrue(g.getBounds() == r0);
+ p1.move(3, 1);
+ Rectangle r1 = g.getBounds();
+ assertTrue(r0 != r1);
+ assertTrue(r1 == g.getBounds());
}
public void testSecondEnclosingGroup() {
- g = new Group(p1);
- Group h = new Group(g);
- Rectangle r0 = h.getBounds();
- assertTrue(h.getBounds() == r0);
- p1.move(3, 1);
- Rectangle r1 = h.getBounds();
- assertTrue(r0 != r1);
- assertTrue(r1 == h.getBounds());
+ g = new Group(p1);
+ Group h = new Group(g);
+ Rectangle r0 = h.getBounds();
+ assertTrue(h.getBounds() == r0);
+ p1.move(3, 1);
+ Rectangle r1 = h.getBounds();
+ assertTrue(r0 != r1);
+ assertTrue(r1 == h.getBounds());
}
}