Verified Commit a75144a7 authored by Daniel Mangold's avatar Daniel Mangold
Browse files

Minor changes

parent c2c3c237
...@@ -6,7 +6,9 @@ import java.util.stream.Collectors; ...@@ -6,7 +6,9 @@ import java.util.stream.Collectors;
/** /**
* This class contains constants that are used as settings for the tests. * This class contains constants that are used as settings for the tests.
* They will not be overwritten when an update is downloaded (assuming this file is in {@link Config#EXCLUDED_FILES}) * They will not be overwritten when an update is downloaded (assuming this file is in {@link Config#EXCLUDED_FILES}),
* but will be updated is such a way that everything between the lines containing ">>>##" and "##<<<" will be kept.
* This includes any changes or appended code.
*/ */
@SuppressWarnings({"JavadocReference", "unused"}) @SuppressWarnings({"JavadocReference", "unused"})
public class Config { public class Config {
...@@ -14,13 +16,12 @@ public class Config { ...@@ -14,13 +16,12 @@ public class Config {
// >>>## UPDATE MARKER, DO NOT REMOVE, ONLY MODIFY THE LINES BELOW // >>>## UPDATE MARKER, DO NOT REMOVE, ONLY MODIFY THE LINES BELOW
/** /**
* Whether this file exists. Used by Utils.java to determine whether or not the config file is missing * Whether this file exists. Used by {@link Utils} to determine whether or not the config file is missing
*/ */
public static final boolean EXISTS = true; public static final boolean EXISTS = true;
/** /**
* Seed that is used for initialization of Random object, set to fixed value for (hopefully) reproducible tests / results * Seed that is used for initialization of {@link Utils#RANDOM}, set to fixed value for (hopefully) reproducible results
* @see Utils#RANDOM
*/ */
public static final long SEED = new Random().nextLong(); public static final long SEED = new Random().nextLong();
...@@ -28,7 +29,7 @@ public class Config { ...@@ -28,7 +29,7 @@ public class Config {
* Settings for the updater / installer <br> * Settings for the updater / installer <br>
* Set the values of these constants to {@code true} or {@code false} respectively, if you want or don't want to... * Set the values of these constants to {@code true} or {@code false} respectively, if you want or don't want to...
* <ul> * <ul>
* <li>{@code CHECK_FOR_UPDATES} - use the updater / installer</li> * <li>{@code CHECK_FOR_UPDATES} - use the functionality at all</li>
* <li>{@code CHECK_HASHES} - compare the hashes of local files with the ones in the repository</li> * <li>{@code CHECK_HASHES} - compare the hashes of local files with the ones in the repository</li>
* <li>{@code AUTO_UPDATE} - let the updater / installer download files from the repository and overwrite the local files automatically</li> * <li>{@code AUTO_UPDATE} - let the updater / installer download files from the repository and overwrite the local files automatically</li>
* </ul> * </ul>
...@@ -38,8 +39,9 @@ public class Config { ...@@ -38,8 +39,9 @@ public class Config {
/** /**
* A list of files (with path relative to project root) to be excluded from updates. * A list of files (with path relative to project root) to be excluded from updates.
* It may be necessary to temporarily remove the configuration file from this list, e.g. when a update * This does not prevent updates to this configuration file ({@link Config#AUTO_UPDATE} does that),
* is downloaded that needs additional constants that are not yet included in this file. * it just prevents complete overwrites
* @see Config
*/ */
public static final List<String> EXCLUDED_FILES = List.of( public static final List<String> EXCLUDED_FILES = List.of(
"src/test/java/h05/Config.java" "src/test/java/h05/Config.java"
...@@ -53,7 +55,7 @@ public class Config { ...@@ -53,7 +55,7 @@ public class Config {
public static final Boolean BUILD_VARIANT = null; public static final Boolean BUILD_VARIANT = null;
/** /**
* Allows customization of the number of test runs for a parameterized test method <br> * Allows customization of the number of test runs for a parameterized test method.
* To override the number of runs add an entry consisting of the fully qualified class name + * To override the number of runs add an entry consisting of the fully qualified class name +
* '#' + the method signature mapped to an integer value (example below). * '#' + the method signature mapped to an integer value (example below).
* If the method is not in this map, a default value of 5 is used * If the method is not in this map, a default value of 5 is used
......
...@@ -42,8 +42,8 @@ public class Utils { ...@@ -42,8 +42,8 @@ public class Utils {
"Please re-run the tests afterwards."); "Please re-run the tests afterwards.");
if (!CHECK_FOR_UPDATES || !Updater.checkForUpdates()) { if (!CHECK_FOR_UPDATES || !Updater.checkForUpdates()) {
System.out.println("Tests are up to date");
System.out.println("Seed: " + SEED); System.out.println("Seed: " + SEED);
System.out.println("Local tests are up to date");
} else } else
System.out.println("Updated tests, please re-run"); System.out.println("Updated tests, please re-run");
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment