Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure the tests are also run with JUnit4
Change-Id: Ie304f2f8ea4cba60e4f02f899b9ec70c236912aa
  • Loading branch information
egonw committed Dec 12, 2012
1 parent 704280a commit 6e8533a
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -33,6 +33,7 @@
import org._3pq.jgrapht.graph.SimpleGraph;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openscience.cdk.CDKTestCase;

/**
Expand Down Expand Up @@ -78,10 +79,12 @@ public class SimpleCycleBasisTest extends CDKTestCase {

}

@Test
public void testSimpleCycleBasis() {
Assert.assertTrue(basis.cycles().size() == g.edgeSet().size() - g.vertexSet().size() + 1);
}

@Test
public void testSimpleCycleBasisCompleteGraph() {
g = new SimpleGraph();
g.addVertex( "a" );
Expand Down Expand Up @@ -109,22 +112,27 @@ public void testSimpleCycleBasisCompleteGraph() {
Assert.assertEquals(1, basis.equivalenceClasses().size());
}

@Test
public void testWeightVector() {
Assert.assertArrayEquals(basis.weightVector(), new int[] {3,3,3,3,3,3,3,3});
}

@Test
public void testRelevantCycles() {
Assert.assertEquals(10, basis.relevantCycles().size());
}

@Test
public void testEssentialCycles() {
Assert.assertEquals(2, basis.essentialCycles().size());
}

@Test
public void testEquivalenceClasses() {
Assert.assertEquals(4, basis.equivalenceClasses().size());
}

@Test
public void testEquivalenceClassesEmptyIntersection() {
SimpleGraph h = new SimpleGraph( );

Expand Down

0 comments on commit 6e8533a

Please sign in to comment.