Browse Source

- remove some unused (internal) variables

- remove unused imports

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@592846 13f79535-47bb-0310-9956-ffa450edef68
master
Jan Materne 17 years ago
parent
commit
92e4570d86
2 changed files with 4 additions and 16 deletions
  1. +0
    -10
      src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
  2. +4
    -6
      src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java

+ 0
- 10
src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java View File

@@ -19,20 +19,10 @@ package org.apache.tools.ant.taskdefs.optional.junit;


import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Date;


import junit.framework.Test;
import junit.framework.TestSuite;

import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildFileTest; import org.apache.tools.ant.BuildFileTest;
import org.apache.tools.ant.BuildListener;


public class JUnitTaskTest extends BuildFileTest { public class JUnitTaskTest extends BuildFileTest {




+ 4
- 6
src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java View File

@@ -152,7 +152,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest {


public void testIllegalCustomAlgorithm() { public void testIllegalCustomAlgorithm() {
try { try {
String algo = getAlgoName("java.lang.Object");
getAlgoName("java.lang.Object");
fail("Illegal classname used."); fail("Illegal classname used.");
} catch (Exception e) { } catch (Exception e) {
assertTrue("Wrong exception type: " + e.getClass().getName(), e instanceof BuildException); assertTrue("Wrong exception type: " + e.getClass().getName(), e instanceof BuildException);
@@ -167,7 +167,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest {
public void testNonExistentCustomAlgorithm() { public void testNonExistentCustomAlgorithm() {
boolean noExcThrown = false; boolean noExcThrown = false;
try { try {
String algo = getAlgoName("non.existent.custom.Algorithm");
getAlgoName("non.existent.custom.Algorithm");
noExcThrown = true; noExcThrown = true;
} catch (Exception e) { } catch (Exception e) {
if (noExcThrown) { if (noExcThrown) {
@@ -367,8 +367,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest {


s.setUpdate(true); s.setUpdate(true);


// does the selection
String results = selectionString(s);
selectionString(s);


// evaluate correctness // evaluate correctness
assertTrue("Cache file is not created.", cachefile.exists()); assertTrue("Cache file is not created.", cachefile.exists());
@@ -404,8 +403,7 @@ public class ModifiedSelectorTest extends BaseSelectorTest {
s.addParam(createParam("cache.cachefile", cachefile.getAbsolutePath())); s.addParam(createParam("cache.cachefile", cachefile.getAbsolutePath()));
s.addParam(createParam("cache", "propertyfile")); s.addParam(createParam("cache", "propertyfile"));


// does the selection
String results = selectionString(s);
selectionString(s);


// evaluate correctness // evaluate correctness
assertTrue("Cache file is not created.", cachefile.exists()); assertTrue("Cache file is not created.", cachefile.exists());


Loading…
Cancel
Save