Browse Source

removed unnecessary constructors and untabified

tags/V1_1_1
ehilsdal 21 years ago
parent
commit
bfad02fdb1

+ 0
- 2
docs/teaching/exercises/tests/Test.java View File

@@ -17,8 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test extends TestCase {
public Test(String name) { super(name); }
public Test() {}

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);

+ 0
- 55
docs/teaching/exercises/tests/Test1a.java View File

@@ -1,55 +0,0 @@
/* *******************************************************************
* 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
* ******************************************************************/

package tests;

import figures.*;
import support.Log;

import junit.framework.*;

public class Test1a extends Test {
public Test1a(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test1a.class);
}

public void setUp() {
Log.clear();
super.setUp();
}

public void testCreateLog() {
assertEquals("", Log.getString());
}

public void testSetXPointLog() {
p1.setX(20);
assertEquals("set;", Log.getString());
}

public void testSetYPointLog() {
p1.setY(10);
assertEquals("", Log.getString());
}

public void testGetYPointLog() {
p1.getY();
assertEquals("", Log.getString());
}

public void testMoveLineLog() {
l1.move(40, 40);
assertEquals("", Log.getString());
}
}

+ 3
- 4
docs/teaching/exercises/tests/Test2a.java View File

@@ -17,7 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test2a extends TestCase {
public Test2a(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);
@@ -25,7 +24,7 @@ public class Test2a extends TestCase {
}

public void testTooSmall() {
Point p1 = new Point(10, 100);
Point p1 = new Point(10, 100);
try {
p1.setX(-10);
fail("should have thrown IllegalArgumentException");
@@ -34,8 +33,8 @@ public class Test2a extends TestCase {
}

public void testNotTooSmall() {
Point p1 = new Point(10, 100);
p1.setX(0);
Point p1 = new Point(10, 100);
p1.setX(0);
}

public void testMove() {

+ 1
- 3
docs/teaching/exercises/tests/Test2b.java View File

@@ -17,8 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test2b extends TestCase {
public Test2b(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);
junit.textui.TestRunner.run(Test2b.class);
@@ -40,7 +38,7 @@ public class Test2b extends TestCase {
Group g = new Group(p1);
Point p2 = new Point(20, 200);

g.add(p2);
g.add(p2);
}

}

+ 0
- 1
docs/teaching/exercises/tests/Test2c.java View File

@@ -17,7 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test2c extends TestCase {
public Test2c(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);

+ 0
- 1
docs/teaching/exercises/tests/Test2d.java View File

@@ -17,7 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test2d extends TestCase {
public Test2d(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);

+ 4
- 5
docs/teaching/exercises/tests/Test2e.java View File

@@ -17,23 +17,22 @@ import figures.*;
import junit.framework.*;

public class Test2e extends TestCase {
public Test2e(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);
junit.textui.TestRunner.run(Test2e.class);
}

public void testSloth() {
Point sp = new SlothfulPoint(10, 10);
public void testNonMoving() {
Point sp = new Point(10, 10) { public void move(int x, int y) {} };
try {
sp.move(10, 10);
fail("should have thrown IllegalStateException");
} catch (IllegalStateException e) { }
}

public void testNonSloth() {
Point p1 = new Point(10, 100);
public void testMoving() {
Point p1 = new Point(10, 100);
p1.move(3, 30);
}
}

+ 0
- 1
docs/teaching/exercises/tests/Test2f.java View File

@@ -17,7 +17,6 @@ import figures.*;
import junit.framework.*;

public class Test2f extends Test {
public Test2f(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test.class);

+ 0
- 1
docs/teaching/exercises/tests/Test3a.java View File

@@ -18,7 +18,6 @@ import support.Log;
import junit.framework.*;

public class Test3a extends Test {
public Test3a(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test3a.class);

+ 0
- 1
docs/teaching/exercises/tests/Test3b.java View File

@@ -18,7 +18,6 @@ import support.Log;
import junit.framework.*;

public class Test3b extends Test {
public Test3b(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test3b.class);

+ 0
- 1
docs/teaching/exercises/tests/Test3c.java View File

@@ -18,7 +18,6 @@ import support.Log;
import junit.framework.*;

public class Test3c extends Test {
public Test3c(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test3c.class);

+ 0
- 2
docs/teaching/exercises/tests/Test4d.java View File

@@ -19,8 +19,6 @@ import junit.framework.*;

public class Test4d extends Test {

public Test4d(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test4d.class);
}

+ 0
- 2
docs/teaching/exercises/tests/Test4e.java View File

@@ -19,8 +19,6 @@ import junit.framework.*;

public class Test4e extends Test {

public Test4e(String name) { super(name); }

public static void main(String[] args) {
junit.textui.TestRunner.run(Test4e.class);
}

Loading…
Cancel
Save