Skip to content

Commit

Permalink
JUnit tests. Refs opencog#98, opencog#103.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceefour committed Jul 10, 2014
1 parent e32cbdb commit dbfd102
Show file tree
Hide file tree
Showing 8 changed files with 567 additions and 608 deletions.
2 changes: 1 addition & 1 deletion build-win32.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

<!-- Run tests -->
<target name="test" depends="build-tests">
<java classname="relex.test.TestStanford" failonerror="true" fork="yes">
<java classname="relex.test.StanfordTest" failonerror="true" fork="yes">
<jvmarg line="-Xmx1024m"/>
<jvmarg line="-Djava.library.path=/usr/lib:/usr/local/lib"/>
<classpath refid="relex.classpath"/>
Expand Down
10 changes: 5 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@

<!-- Run tests -->
<target name="test-stanford" depends="build-tests">
<java classname="relex.test.TestStanford" failonerror="true" fork="yes">
<jvmarg line="-Xmx1024m"/>
<jvmarg line="-Djava.library.path=/usr/lib/jni:/usr/lib:/usr/local/lib/jni:/usr/local/lib"/>
<junit fork="yes" printsummary="yes" showoutput="true" maxmemory="1024m">
<jvmarg value="-Djava.library.path=/usr/lib/jni:/usr/lib:/usr/local/lib/jni:/usr/local/lib"/>
<classpath refid="cp.test"/>
<classpath refid="relex.classpath"/>
<arg line=""/>
</java>
<formatter type="plain" usefile="false"/>
<test name="relex.test.StanfordTest"/>
</junit>
</target>
<target name="test-relex" depends="build-tests">
<junit fork="yes" printsummary="yes" showoutput="true" maxmemory="1024m">
Expand Down
5 changes: 4 additions & 1 deletion src/java_test/relex/test/RelExTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import relex.ParsedSentence;
import relex.RelationExtractor;
Expand All @@ -38,11 +40,12 @@
@RunWith(JUnitParamsRunner.class)
public class RelExTest {

private static final Logger log = LoggerFactory.getLogger(RelExTest.class);
private static RelationExtractor re;

@BeforeClass
public static void setUpClass() {
System.err.println("Initializing RelEx...");
log.info("Initializing RelEx...");
re = new RelationExtractor();
}

Expand Down
Loading

0 comments on commit dbfd102

Please sign in to comment.