Skip to content

Commit

Permalink
Laundry pass on /bugs to make them work the same in java, cpp & csharp
Browse files Browse the repository at this point in the history
Signed-off-by: mmazas <mmazas@ITEM-S104678.emea.msad.sopra>
  • Loading branch information
mmazas authored and mmazas committed Sep 4, 2024
1 parent b21b9f6 commit b8bffb1
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 59 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 34 additions & 34 deletions bugs/bug001/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
<configuration>
<mainClass>clc.ComplexLineComment</mainClass>
<arguments>
<argument>${project.basedir}/test/clc1.in2</argument>
<argument>${project.basedir}/test/clc1.out</argument>
<argument>${project.basedir}/test/clc1.err</argument>
<argument>${project.basedir}/files/clc1.in2</argument>
<argument>${project.basedir}/files/clc1.out</argument>
<argument>${project.basedir}/files/clc1.err</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -103,9 +103,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
<configuration>
<mainClass>clc.ComplexLineComment</mainClass>
<arguments>
<argument>${project.basedir}/test/clc2.in</argument>
<argument>${project.basedir}/test/clc2.out</argument>
<argument>${project.basedir}/test/clc2.err</argument>
<argument>${project.basedir}/files/clc2.in</argument>
<argument>${project.basedir}/files/clc2.out</argument>
<argument>${project.basedir}/files/clc2.err</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -127,33 +127,33 @@ THE POSSIBILITY OF SUCH DAMAGE.
<skip>false</skip>
<target unless="maven.test.skip">
<!-- out -->
<available file="${project.basedir}/test/clc1.out" property="isActualOutAvailable" />
<available file="${project.basedir}/files/clc1.out" property="isActualOutAvailable" />
<fail unless="isActualOutAvailable"
message="${project.basedir}/test/clc1.out does not exist!" />
<available file="${project.basedir}/test/clc1.exp_out"
message="${project.basedir}/files/clc1.out does not exist!" />
<available file="${project.basedir}/files/clc1.exp_out"
property="isExpectedOutAvailable" />
<fail unless="isExpectedOutAvailable"
message="${project.basedir}/test/clc1.exp_out does not exist!" />
message="${project.basedir}/files/clc1.exp_out does not exist!" />
<condition property="out.files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/clc1.out"
file2="${project.basedir}/test/clc1.exp_out" />
<filesmatch textfile="true" file1="${project.basedir}/files/clc1.out"
file2="${project.basedir}/files/clc1.exp_out" />
</condition>
<fail unless="out.files.match"
message="${project.basedir}/test/clc1.out does not match ${project.basedir}/test/clc1.exp_out!" />
message="${project.basedir}/files/clc1.out does not match ${project.basedir}/files/clc1.exp_out!" />
<!-- err -->
<available file="${project.basedir}/test/clc1.err" property="isActualErrAvailable" />
<available file="${project.basedir}/files/clc1.err" property="isActualErrAvailable" />
<fail unless="isActualErrAvailable"
message="${project.basedir}/test/clc1.err does not exist!" />
<available file="${project.basedir}/test/clc1.exp_err"
message="${project.basedir}/files/clc1.err does not exist!" />
<available file="${project.basedir}/files/clc1.exp_err"
property="isExpectedErrAvailable" />
<fail unless="isExpectedErrAvailable"
message="${project.basedir}/test/clc1.exp_err does not exist!" />
message="${project.basedir}/files/clc1.exp_err does not exist!" />
<condition property="err.files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/clc1.err"
file2="${project.basedir}/test/clc1.exp_err" />
<filesmatch textfile="true" file1="${project.basedir}/files/clc1.err"
file2="${project.basedir}/files/clc1.exp_err" />
</condition>
<fail unless="err.files.match"
message="${project.basedir}/test/clc1.err does not match ${project.basedir}/test/clc1.exp_err!" />
message="${project.basedir}/files/clc1.err does not match ${project.basedir}/files/clc1.exp_err!" />
</target>
</configuration>
</execution>
Expand All @@ -167,32 +167,32 @@ THE POSSIBILITY OF SUCH DAMAGE.
<skip>false</skip>
<target unless="maven.test.skip">
<!-- out -->
<available file="${project.basedir}/test/clc2.out" property="isActualAvailable" />
<available file="${project.basedir}/files/clc2.out" property="isActualAvailable" />
<fail unless="isActualAvailable"
message="${project.basedir}/test/clc2.out does not exist!" />
<available file="${project.basedir}/test/clc2.ref" property="isExpectedAvailable" />
message="${project.basedir}/files/clc2.out does not exist!" />
<available file="${project.basedir}/files/clc2.exp_out" property="isExpectedAvailable" />
<fail unless="isExpectedAvailable"
message="${project.basedir}/test/clc2.ref does not exist!" />
message="${project.basedir}/files/clc2.exp_out does not exist!" />
<condition property="files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/clc2.out"
file2="${project.basedir}/test/clc2.ref" />
<filesmatch textfile="true" file1="${project.basedir}/files/clc2.out"
file2="${project.basedir}/files/clc2.exp_out" />
</condition>
<fail unless="files.match"
message="${project.basedir}/test/clc2.out does not match ${project.basedir}/test/clc2.ref!" />
message="${project.basedir}/files/clc2.out does not match ${project.basedir}/files/clc2.exp_out!" />
<!-- err -->
<available file="${project.basedir}/test/clc2.err" property="isActualErrAvailable" />
<available file="${project.basedir}/files/clc2.err" property="isActualErrAvailable" />
<fail unless="isActualErrAvailable"
message="${project.basedir}/test/clc2.err does not exist!" />
<available file="${project.basedir}/test/clc2.exp_err"
message="${project.basedir}/files/clc2.err does not exist!" />
<available file="${project.basedir}/files/clc2.exp_err"
property="isExpectedErrAvailable" />
<fail unless="isExpectedErrAvailable"
message="${project.basedir}/test/clc2.exp_err does not exist!" />
message="${project.basedir}/files/clc2.exp_err does not exist!" />
<condition property="err.files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/clc2.err"
file2="${project.basedir}/test/clc2.exp_err" />
<filesmatch textfile="true" file1="${project.basedir}/files/clc2.err"
file2="${project.basedir}/files/clc2.exp_err" />
</condition>
<fail unless="err.files.match"
message="${project.basedir}/test/clc2.err does not match ${project.basedir}/test/clc2.exp_err!" />
message="${project.basedir}/files/clc2.err does not match ${project.basedir}/files/clc2.exp_err!" />
</target>
</configuration>
</execution>
Expand Down
6 changes: 0 additions & 6 deletions bugs/bug001/test/clc1.out

This file was deleted.

2 changes: 0 additions & 2 deletions bugs/bug001/test/clc2.ref

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 18 additions & 17 deletions bugs/bug002/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@ THE POSSIBILITY OF SUCH DAMAGE.
<configuration>
<mainClass>Bug</mainClass>
<arguments>
<argument>${project.basedir}/test/bug.in</argument>
<argument>${project.basedir}/test/bug.out</argument>
<argument>${project.basedir}/test/bug.err</argument>
<argument>${project.basedir}/files/bug.in</argument>
<argument>${project.basedir}/files/bug.out</argument>
<argument>${project.basedir}/files/bug.err</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>

<!-- check the tests results -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand All @@ -110,33 +111,33 @@ THE POSSIBILITY OF SUCH DAMAGE.
<configuration>
<target unless="maven.test.skip">
<!-- out -->
<available file="${project.basedir}/test/bug.out" property="isActualOutAvailable" />
<available file="${project.basedir}/files/bug.out" property="isActualOutAvailable" />
<fail unless="isActualOutAvailable"
message="${project.basedir}/test/bug.out does not exist!" />
<available file="${project.basedir}/test/bug.exp_out"
message="${project.basedir}/files/bug.out does not exist!" />
<available file="${project.basedir}/files/bug.exp_out"
property="isExpectedOutAvailable" />
<fail unless="isExpectedOutAvailable"
message="${project.basedir}/test/bug.exp_out does not exist!" />
message="${project.basedir}/files/bug.exp_out does not exist!" />
<condition property="out.files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/bug.out"
file2="${project.basedir}/test/bug.exp_out" />
<filesmatch textfile="true" file1="${project.basedir}/files/bug.out"
file2="${project.basedir}/files/bug.exp_out" />
</condition>
<fail unless="out.files.match"
message="${project.basedir}/test/bug.out does not match ${project.basedir}/test/bug.exp_out!" />
message="${project.basedir}/files/bug.out does not match ${project.basedir}/files/bug.exp_out!" />
<!-- err -->
<available file="${project.basedir}/test/bug.err" property="isActualErrAvailable" />
<available file="${project.basedir}/files/bug.err" property="isActualErrAvailable" />
<fail unless="isActualErrAvailable"
message="${project.basedir}/test/bug.err does not exist!" />
<available file="${project.basedir}/test/bug.exp_err"
message="${project.basedir}/files/bug.err does not exist!" />
<available file="${project.basedir}/files/bug.exp_err"
property="isExpectedErrAvailable" />
<fail unless="isExpectedErrAvailable"
message="${project.basedir}/test/bug.exp_err does not exist!" />
message="${project.basedir}/files/bug.exp_err does not exist!" />
<condition property="err.files.match">
<filesmatch textfile="true" file1="${project.basedir}/test/bug.err"
file2="${project.basedir}/test/bug.exp_err" />
<filesmatch textfile="true" file1="${project.basedir}/files/bug.err"
file2="${project.basedir}/files/bug.exp_err" />
</condition>
<fail unless="err.files.match"
message="${project.basedir}/test/bug.err does not match ${project.basedir}/test/bug.exp_err!" />
message="${project.basedir}/files/bug.err does not match ${project.basedir}/files/bug.exp_err!" />
</target>
</configuration>
</execution>
Expand Down

0 comments on commit b8bffb1

Please sign in to comment.