Skip to content

Commit

Permalink
Improved unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Vaughan committed Oct 5, 2021
1 parent 49fa34f commit 1240e48
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions test/bacter/util/BacterACGLogReaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,18 @@
import bacter.ConversionGraph;
import beast.util.Randomizer;
import beast.util.XMLParser;
import beast.util.XMLParserException;
import org.junit.Test;
import org.xml.sax.SAXException;
import test.beast.beast2vs1.trace.Expectation;
import test.beast.beast2vs1.trace.LogAnalyser;

import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;

public class BacterACGLogReaderTest {

@Test
public void test() throws Exception {

Randomizer.setSeed(1);

XMLParser parser = new XMLParser();
Expand All @@ -33,8 +24,9 @@ public void test() throws Exception {

BacterACGLogReader logReader = new BacterACGLogReader(new File("simulateACGs2taxon.trees"), 0.0);

System.out.println("ACG count: " + logReader.getACGCount());
assertEquals(100, logReader.getACGCount());

// The following simply tests whether the ACGs can be loaded without error:
System.out.println("Root ages:");
for (ConversionGraph acg : logReader)
System.out.println(acg.getRoot().getHeight());
Expand Down

0 comments on commit 1240e48

Please sign in to comment.