Skip to content

Commit

Permalink
Tests consider whitespace when checking expected output files.
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamkirby committed Dec 15, 2024
1 parent 8e21402 commit 4f134f4
Show file tree
Hide file tree
Showing 656 changed files with 123,556 additions and 71,199 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# _race-timing_ is a Java application for calculating race results

[![Build and test](https://github.com/grahamkirby/race-timing/actions/workflows/maven-linux.yml/badge.svg)](https://github.com/grahamkirby/race-timing/actions/workflows/maven.yml)
[![Build and test](https://github.com/grahamkirby/race-timing/actions/workflows/maven-linux.yml/badge.svg)](https://github.com/grahamkirby/race-timing/actions/workflows/maven-linux.yml)
[![Build and test](https://github.com/grahamkirby/race-timing/actions/workflows/maven-windows.yml/badge.svg)](https://github.com/grahamkirby/race-timing/actions/workflows/maven-windows.yml)

This software was originally written to process results for amateur athletics races organised by [Fife Athletic Club](//fifeac.org),
although it would probably work for other races. Reports of success or otherwise would be welcome, by email to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.RaceInput;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.RaceResult;
import org.grahamkirby.race_timing.common.output.RaceOutputPDF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.grahamkirby.race_timing.series_race.fife_ac_grand_prix;
package org.grahamkirby.race_timing.series_race.grand_prix;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.RaceInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.RaceResult;
import org.grahamkirby.race_timing.common.output.RaceOutputPDF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_midweek;
package org.grahamkirby.race_timing.series_race.midweek;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.RaceInput;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.Normalisation;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.CompletionStatus;
import org.grahamkirby.race_timing.common.Race;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.RaceResult;
import org.grahamkirby.race_timing.common.output.RaceOutputPDF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.common.RaceResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License along with race-timing. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.grahamkirby.race_timing.series_race.fife_ac_tour;
package org.grahamkirby.race_timing.series_race.tour;

import org.grahamkirby.race_timing.common.RaceResult;
import org.grahamkirby.race_timing.common.Runner;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/grahamkirby/race_timing/MidweekTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.grahamkirby.race_timing.common.Race;
import org.junit.jupiter.api.Test;
import org.grahamkirby.race_timing.series_race.fife_ac_midweek.MidweekRace;
import org.grahamkirby.race_timing.series_race.midweek.MidweekRace;

import java.io.IOException;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.grahamkirby.race_timing;

import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.series_race.fife_ac_tour.TourRace;
import org.grahamkirby.race_timing.series_race.tour.TourRace;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/org/grahamkirby/race_timing/RaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ private static List<String> getDirectoryEntries(final Path directory) throws IOE

private static void assertThatFilesHaveSameContentIgnoringWhitespace(final Path path1, final Path path2) throws IOException {

final String file_content1 = removeWhiteSpace(getFileContent(path1));
final String file_content2 = removeWhiteSpace(getFileContent(path2));
// final String file_content1 = removeWhiteSpace(getFileContent(path1));
// final String file_content2 = removeWhiteSpace(getFileContent(path2));
final String file_content1 = (getFileContent(path1));
final String file_content2 = (getFileContent(path2));

if (!file_content1.equals(file_content2))
fail(STR."Files differ: \{path1}, \{path2}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.grahamkirby.race_timing.RaceTest;
import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.series_race.fife_ac_grand_prix.GrandPrixRace;
import org.grahamkirby.race_timing.series_race.grand_prix.GrandPrixRace;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.grahamkirby.race_timing.RaceTest;
import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.series_race.fife_ac_midweek.MidweekRace;
import org.grahamkirby.race_timing.series_race.midweek.MidweekRace;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.grahamkirby.race_timing.RaceTest;
import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.series_race.fife_ac_tour.TourRace;
import org.grahamkirby.race_timing.series_race.tour.TourRace;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.grahamkirby.race_timing.RaceTest;
import org.grahamkirby.race_timing.common.Race;
import org.grahamkirby.race_timing.series_race.fife_ac_tour.TourRace;
import org.grahamkirby.race_timing.series_race.tour.TourRace;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand Down
Loading

0 comments on commit 4f134f4

Please sign in to comment.