Merge branch 'master' of https://gitlab.cecs.anu.edu.au/comp1110/comp1110-ass2
This commit is contained in:
commit
53fe954a57
@ -9,8 +9,10 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- export PATH_TO_FX=/usr/share/openjfx/lib
|
- export PATH_TO_FX=/usr/share/openjfx/lib
|
||||||
- export JAVAFX_OPTIONS="--module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.media"
|
- export JAVAFX_OPTIONS="--module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.media"
|
||||||
- export CP=src:/ass2/*:/shared/junit-platform-console-standalone-1.7.0.jar:$PATH_TO_FX/*
|
- export CP=src:src-dev:/ass2/*:/shared/junit-platform-console-standalone-1.7.0.jar:$PATH_TO_FX/*
|
||||||
- export JUNIT="java $JAVAFX_OPTIONS -jar /shared/junit-platform-console-standalone-1.7.0.jar --class-path src:/ass2/comp1110-ass2.jar --disable-banner"
|
- export JUNIT="java $JAVAFX_OPTIONS -jar /shared/junit-platform-console-standalone-1.7.0.jar --class-path src:src-dev:/ass2/comp1110-ass2.jar --disable-banner --reports-dir=junit-reports"
|
||||||
|
- export SRC_FILES=$(find src/ -type f -name '*.java')
|
||||||
|
- export SRC_DEV_FILES=$(if [ -d "src-dev/" ]; then find src-dev/ -type f -name '*.java'; fi)
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
tags:
|
tags:
|
||||||
@ -38,11 +40,11 @@ build:
|
|||||||
- comp1110
|
- comp1110
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- javac -encoding utf-8 $JAVAFX_OPTIONS -cp $CP src/comp1110/ass2/*.java src/comp1110/ass2/*/*.java
|
- javac -encoding utf-8 $JAVAFX_OPTIONS -cp $CP $SRC_FILES $SRC_DEV_FILES
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- src/comp1110/ass2/*.class
|
- src/
|
||||||
- src/comp1110/ass2/*/*.class
|
- src-dev/
|
||||||
|
|
||||||
task3:
|
task3:
|
||||||
tags:
|
tags:
|
||||||
@ -51,6 +53,9 @@ task3:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.IsStateStringWellFormedTest
|
- $JUNIT -c=comp1110.ass2.IsStateStringWellFormedTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task4:
|
task4:
|
||||||
tags:
|
tags:
|
||||||
@ -59,6 +64,9 @@ task4:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.IsMoveStringWellFormedTest
|
- $JUNIT -c=comp1110.ass2.IsMoveStringWellFormedTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task6:
|
task6:
|
||||||
tags:
|
tags:
|
||||||
@ -67,6 +75,9 @@ task6:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.DistributeResourcesTest
|
- $JUNIT -c=comp1110.ass2.DistributeResourcesTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task7:
|
task7:
|
||||||
tags:
|
tags:
|
||||||
@ -75,6 +86,9 @@ task7:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.IsMoveValidTest
|
- $JUNIT -c=comp1110.ass2.IsMoveValidTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task8:
|
task8:
|
||||||
tags:
|
tags:
|
||||||
@ -83,6 +97,9 @@ task8:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.GenerateAllValidMovesTest
|
- $JUNIT -c=comp1110.ass2.GenerateAllValidMovesTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task9:
|
task9:
|
||||||
tags:
|
tags:
|
||||||
@ -91,6 +108,9 @@ task9:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.IsPhaseOverTest
|
- $JUNIT -c=comp1110.ass2.IsPhaseOverTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task10:
|
task10:
|
||||||
tags:
|
tags:
|
||||||
@ -99,6 +119,9 @@ task10:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.PlacePieceTest
|
- $JUNIT -c=comp1110.ass2.PlacePieceTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task11:
|
task11:
|
||||||
tags:
|
tags:
|
||||||
@ -107,6 +130,9 @@ task11:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.CalculateIslandLinksScoreTest -c=comp1110.ass2.CalculateIslandMajoritiesScoreTest -c=comp1110.ass2.CalculateResourcesAndStatuettesScoreTest -c=comp1110.ass2.CalculateTotalIslandsScoreTest -c=comp1110.ass2.CalculateScoresTest
|
- $JUNIT -c=comp1110.ass2.CalculateIslandLinksScoreTest -c=comp1110.ass2.CalculateIslandMajoritiesScoreTest -c=comp1110.ass2.CalculateResourcesAndStatuettesScoreTest -c=comp1110.ass2.CalculateTotalIslandsScoreTest -c=comp1110.ass2.CalculateScoresTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task12:
|
task12:
|
||||||
tags:
|
tags:
|
||||||
@ -115,6 +141,9 @@ task12:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.EndPhaseTest
|
- $JUNIT -c=comp1110.ass2.EndPhaseTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task13:
|
task13:
|
||||||
tags:
|
tags:
|
||||||
@ -123,6 +152,9 @@ task13:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.ApplyMoveTest
|
- $JUNIT -c=comp1110.ass2.ApplyMoveTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task16:
|
task16:
|
||||||
tags:
|
tags:
|
||||||
@ -131,6 +163,9 @@ task16:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.GenerateAIMoveTest
|
- $JUNIT -c=comp1110.ass2.GenerateAIMoveTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
task17:
|
task17:
|
||||||
tags:
|
tags:
|
||||||
@ -139,6 +174,9 @@ task17:
|
|||||||
script:
|
script:
|
||||||
- $JUNIT -c=comp1110.ass2.VariableBoardSizeTest -c=comp1110.ass2.ThreeFourPlayerTest -c=comp1110.ass2.VariableSizeThreeFourPlayerTest
|
- $JUNIT -c=comp1110.ass2.VariableBoardSizeTest -c=comp1110.ass2.ThreeFourPlayerTest -c=comp1110.ass2.VariableSizeThreeFourPlayerTest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-reports/TEST-junit-jupiter.xml
|
||||||
|
|
||||||
## Local Variables:
|
## Local Variables:
|
||||||
## mode: yaml
|
## mode: yaml
|
||||||
|
@ -7,7 +7,15 @@
|
|||||||
<NATIVE>
|
<NATIVE>
|
||||||
<root url="file://$PATH_TO_FX$" />
|
<root url="file://$PATH_TO_FX$" />
|
||||||
</NATIVE>
|
</NATIVE>
|
||||||
<SOURCES />
|
<SOURCES>
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.base" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.controls" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.fxml" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.graphics" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.media" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.swing" />
|
||||||
|
<root url="jar://$PATH_TO_FX$/../src.zip!/javafx.web" />
|
||||||
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PATH_TO_FX$" recursive="false" />
|
<jarDirectory url="file://$PATH_TO_FX$" recursive="false" />
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
@ -133,14 +133,14 @@ public class StringComparator {
|
|||||||
|
|
||||||
private void checkGeneralString(List<String> statementsA, List<String> statementsB, List<String> errors) {
|
private void checkGeneralString(List<String> statementsA, List<String> statementsB, List<String> errors) {
|
||||||
// Check for the number of statements
|
// Check for the number of statements
|
||||||
if (checks.get(ResultType.General).contains("num_statements") &&
|
if (checks.get(ResultType.General).contains("numStatements") &&
|
||||||
statementsA.size() != statementsB.size())
|
statementsA.size() != statementsB.size())
|
||||||
{
|
{
|
||||||
errors.add("Strings contain different numbers of statements");
|
errors.add("Strings contain different numbers of statements");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there are any unrecognised statement IDs
|
// Check if there are any unrecognised statement IDs
|
||||||
if (checks.get(ResultType.General).contains("unrecognised_statements"))
|
if (checks.get(ResultType.General).contains("unrecognisedStatements"))
|
||||||
{
|
{
|
||||||
List<String> unrecognised = statementsB
|
List<String> unrecognised = statementsB
|
||||||
.stream()
|
.stream()
|
||||||
|
Loading…
Reference in New Issue
Block a user