@@ -0,0 +1,1151 @@
+package test.beast.evolution.tree.newick;%0D%0A%0D%0Aimport beast.util.TreeParser;%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0A/**%0D%0A * @author Walter Xie%0D%0A */%0D%0Apublic class NewickTreeTest extends TestCase %7B%0D%0A    String%5B%5D trees1 = new String%5B%5D%7B%0D%0A            %22(((A:1.0,B:1.0):1.0,C:2.0);%22,%0D%0A            %22(((1:1.0,2:1.0):1.0,3:2.0);%22%0D%0A    %7D; //more trees ?%0D%0A    String%5B%5D trees2 = new String%5B%5D%7B%0D%0A            %22(((A:1.5,B:0.5):1.1,C:3.0);%22,%0D%0A            %22(((1:1.5,2:0.5):1.1,3:3.0);%22%0D%0A    %7D; //more trees ?%0D%0A%0D%0A%0D%0A    public void testNewickTrees() throws Exception %7B%0D%0A%0D%0A        for (String tree : trees1) %7B%0D%0A%0D%0A            TreeParser newickTree = new TreeParser(tree, false);%0D%0A%0D%0A//            System.out.println(tree);%0D%0A//            System.out.println(newickTree);%0D%0A%0D%0A            assertEquals(%224:(3:(0:1.0,1:1.0):1.0,2:2.0):0.0%22, newickTree.toString());%0D%0A        %7D%0D%0A%0D%0A        for (String tree : trees2) %7B%0D%0A%0D%0A            TreeParser newickTree = new TreeParser(tree, false);%0D%0A%0D%0A//            System.out.println(tree);%0D%0A//            System.out.println(newickTree);%0D%0A            assertEquals(%224:(3:(0:1.5,1:0.5):1.1,2:3.0):0.0%22, newickTree.toString());%0D%0A        %7D%0D%0A%0D%0A    %7D%0D%0A%7D%0D%0A

add new junit test of newick tree