Skip to content

Commit

Permalink
moved Test-Classes to their own test_src, removed Test-classes
Browse files Browse the repository at this point in the history
from jar.
  • Loading branch information
Bernhard Wagner committed Jan 31, 2012
1 parent f9256ee commit 9d4ec89
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test_src"/>
<classpathentry kind="lib" path="lib/junit-3.8.1.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.9.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Expand Down
12 changes: 9 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<property name="src" value="src" />

<property name="test.src" value="test_src" />



<!-- Load other global properties from local home directory -->
<!-- For example, it's possible to use jikes globally by setting the
Expand Down Expand Up @@ -32,14 +35,17 @@


<target name="compile" depends="init">
<my.javac srcdir="${src}" destdir="${build}" debug="yes">
<my.javac srcdir="${src}:${test.src}" destdir="${build}" debug="yes">
<classpath refid="project.classpath"/>
</my.javac>
</target>


<target name="jar" depends="compile">
<jar destfile="${dist}/org.arabidopsis.interval.jar" basedir="${build}"/>
<jar destfile="${dist}/org.arabidopsis.interval.jar" basedir="${build}">
<exclude name="**/*Test.class"/>
<exclude name="**/*Tests.class"/>
</jar>
</target>


Expand All @@ -58,7 +64,7 @@
<java fork="yes" classname="junit.textui.TestRunner"
taskname="junit" failonerror="true">

<arg value="org.arabidopsis.interval.TestAll"/>
<arg value="org.arabidopsis.interval.AllTests"/>
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import junit.runner.TestCollector;


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

Expand Down Expand Up @@ -77,15 +77,15 @@ private static List<Class<? extends TestCase>> getAllTestClasses() throws ClassN

// Returns true if the given class is ourself.
private static boolean isSelfClass(Class<?> c) {
return c.equals(TestAll.class);
return c.equals(AllTests.class);
}


// Returns true if the class c is not within the same package
// hierarchy as ourselves.
private static boolean isClassNotInMyPackage(Class<?> c) {
return (! c.getPackage().getName().startsWith
(TestAll.class.getPackage().getName()));
(AllTests.class.getPackage().getName()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import junit.framework.TestCase;


public class TestFlankingFinder extends TestCase {
public class FlankingFinderTest extends TestCase {
private FlankingFinder<String> finder;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import junit.framework.TestCase;


public class TestIntervalTree extends TestCase {
public class IntervalTreeTest extends TestCase {
private IntervalTree tree;

public void setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import junit.framework.TestCase;

public class TestOrderStatisticTree extends TestCase {
public class OrderStatisticTreeTest extends TestCase {

public void testNilSize() {
OrderStatisticTree tree = new OrderStatisticTree();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import junit.framework.*;


public class TestRbTree extends TestCase {
public class RbTreeTest extends TestCase {
private RbTree tree;

public void setUp() {
Expand Down

0 comments on commit 9d4ec89

Please sign in to comment.