0
 javac -cp .:/dcsdata/home/hdokani2/.m2/repository/junit/junit/4.11/junit-4.11.jar:/dcsdata/home/hdokani2/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/dcsdata/home/hdokani2/Desktop/cs527/commons-math3-3.3.jar LUDecompositionTest.java

This works for me, but I need to make some changes to main src/main/java/org/commons/math3/linear/LUDecomposition.java and accordingly I want to make tests fail. Therefore I need all the main files to be compiled also, so I removed common-math3-3.3.jar and added all the files from src/main/java but that doesn't work.

ABC
  • 4,263
  • 10
  • 45
  • 72
Biparite
  • 203
  • 1
  • 2
  • 13

1 Answers1

0

The simplest way is to use

mvn -Dtest=LUDecompositionTest

from the top level of the source distribution (or a checkout of the development sources or a release tag). If you don't want to use maven, but you are willing to use Ant, there is a build.xml included with the source and you can edit the compile.tests target to include only the test you want to execute. Just eliminate the wildcards and specify

<include name="**/*LUDecompositionTest.java"/> 

then do

ant clean test

If you really want to do this on the command line without either Ant or Maven, you need to create a new jar including your changes and put jar on the classpath above in place of the distribution jar.

Phil Steitz
  • 644
  • 3
  • 10