From bdf24a3259f995e8b89349359b9ca150f7b0a7f2 Mon Sep 17 00:00:00 2001 From: walterxie Date: Wed, 17 Jan 2024 17:57:50 +1300 Subject: [PATCH] fix unit tests #109 #112 --- .github/workflows/lphybeast.yml | 2 +- .../src/test/java/lphybeast/H5N1TutorialTest.java | 14 ++++++++------ .../src/test/java/lphybeast/RSV2TutorialTest.java | 10 +++++----- .../java/lphybeast/SkylinePlotsTutorialTest.java | 10 ++++++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lphybeast.yml b/.github/workflows/lphybeast.yml index 587ae5c..548e90a 100644 --- a/.github/workflows/lphybeast.yml +++ b/.github/workflows/lphybeast.yml @@ -75,7 +75,7 @@ jobs: working-directory: ./LPhyBeast # only available in lphy at the moment # temp disable test because of github issue - run: ./gradlew build -x test + run: ./gradlew build - name: Publish unit test results uses: EnricoMi/publish-unit-test-result-action@v2 diff --git a/lphybeast/src/test/java/lphybeast/H5N1TutorialTest.java b/lphybeast/src/test/java/lphybeast/H5N1TutorialTest.java index 7b930f1..0052b6e 100644 --- a/lphybeast/src/test/java/lphybeast/H5N1TutorialTest.java +++ b/lphybeast/src/test/java/lphybeast/H5N1TutorialTest.java @@ -124,15 +124,17 @@ public void testDPG() { assertTrue(xml.contains("BitFlipOperator") && xml.contains("parameter=\"@I\""), "I.bitFlip Operator" ); // 6 ScaleOperator, incl. tree - assertEquals(6, xml.split("ScaleOperator", -1).length - 1, "ScaleOperator" ); + assertEquals(6, xml.split("BactrianScaleOperator", -1).length - 1, + "BactrianScaleOperator" ); - assertTrue(xml.contains("Exchange") && xml.contains("SubtreeSlide") && xml.contains("Uniform") && - xml.contains("WilsonBalding"), "Tree Operator" ); + assertTrue(xml.contains("Exchange") && xml.contains("BactrianSubtreeSlide") && + xml.contains("BactrianNodeOperator") && xml.contains("WilsonBalding"), "Tree Operator" ); - assertTrue(xml.contains("UpDownOperator") && - xml.contains("