Clean up code
This commit is contained in:
parent
eb82a25f64
commit
a8620307c9
|
@ -31,7 +31,7 @@ public class FilePositionTrackerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
trackerUnderTest = new FilePositionTracker(FILE_NAME);
|
trackerUnderTest = new FilePositionTracker(FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class ArgumentValidatorTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
validator = new ArgumentValidator("TEST");
|
validator = new ArgumentValidator("TEST");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class LispInterpreterTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
indicatorSet = new HashSet<>();
|
indicatorSet = new HashSet<>();
|
||||||
outputStream = new ByteArrayOutputStream();
|
outputStream = new ByteArrayOutputStream();
|
||||||
errorOutputStream = new ByteArrayOutputStream();
|
errorOutputStream = new ByteArrayOutputStream();
|
||||||
|
@ -61,7 +61,7 @@ public class LispInterpreterTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() {
|
||||||
builder.reset();
|
builder.reset();
|
||||||
environment.reset();
|
environment.reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import static testutil.TestUtilities.*;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
||||||
import org.junit.*;
|
import org.junit.Test;
|
||||||
|
|
||||||
import function.UserDefinedFunction;
|
import function.UserDefinedFunction;
|
||||||
import sexpression.LispNumber.InvalidNumberException;
|
import sexpression.LispNumber.InvalidNumberException;
|
||||||
|
@ -18,9 +18,6 @@ public class SExpressionTest {
|
||||||
assertEquals(expected, sExpression.toString());
|
assertEquals(expected, sExpression.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() throws Exception {}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void nil_ToString() {
|
public void nil_ToString() {
|
||||||
String input = "NIL";
|
String input = "NIL";
|
||||||
|
|
|
@ -11,14 +11,11 @@ public class SafeInputStreamTest {
|
||||||
SafeInputStream safeWithException;
|
SafeInputStream safeWithException;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
safe = new SafeInputStream(createInputStreamFromString("a"));
|
safe = new SafeInputStream(createInputStreamFromString("a"));
|
||||||
safeWithException = new SafeInputStream(createIOExceptionThrowingInputStream());
|
safeWithException = new SafeInputStream(createIOExceptionThrowingInputStream());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
|
||||||
public void tearDown() throws Exception {}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void readWorks() {
|
public void readWorks() {
|
||||||
assertEquals('a', (char) safe.read());
|
assertEquals('a', (char) safe.read());
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class SafeOutputStreamTest {
|
||||||
ByteArrayOutputStream output;
|
ByteArrayOutputStream output;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
output = new ByteArrayOutputStream();
|
output = new ByteArrayOutputStream();
|
||||||
safe = new SafeOutputStream(output);
|
safe = new SafeOutputStream(output);
|
||||||
safeWithException = new SafeOutputStream(createIOExceptionThrowingOutputStream());
|
safeWithException = new SafeOutputStream(createIOExceptionThrowingOutputStream());
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class TokenFactoryTest {
|
||||||
private FilePosition testPosition;
|
private FilePosition testPosition;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() {
|
||||||
tokenFactory = new TokenFactoryImpl();
|
tokenFactory = new TokenFactoryImpl();
|
||||||
testPosition = new FilePosition("testFile");
|
testPosition = new FilePosition("testFile");
|
||||||
testPosition.setLineNumber(0);
|
testPosition.setLineNumber(0);
|
||||||
|
|
Loading…
Reference in New Issue