Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hedtke, Moritz
AuD 2021 H05 Tests
Commits
7ff6c1e3
Verified
Commit
7ff6c1e3
authored
Jun 12, 2021
by
Daniel Mangold
Browse files
Minor changes
parent
4a67aed8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/h05/Config.java
View file @
7ff6c1e3
...
...
@@ -77,4 +77,6 @@ public class Config {
public
static
Set
<
String
>
getConfigs
()
{
return
Arrays
.
stream
(
Config
.
class
.
getDeclaredFields
()).
map
(
Field:
:
getName
).
collect
(
Collectors
.
toUnmodifiableSet
());
}
}
src/test/java/h05/Utils.java
View file @
7ff6c1e3
...
...
@@ -41,9 +41,10 @@ public class Utils {
"They will be automatically downloaded when using the installer or when CHECK_FOR_UPDATES and AUTO_UPDATE are true. "
+
"Please re-run the tests afterwards."
);
if
(!
CHECK_FOR_UPDATES
||
!
Updater
.
checkForUpdates
())
if
(!
CHECK_FOR_UPDATES
||
!
Updater
.
checkForUpdates
())
{
System
.
out
.
println
(
"Seed: "
+
SEED
);
else
System
.
out
.
println
(
"Local tests are up to date"
);
}
else
System
.
out
.
println
(
"Updated tests, please re-run"
);
}
...
...
@@ -224,8 +225,7 @@ public class Utils {
System
.
out
.
println
(
"Update available! Local version: "
+
localVersion
+
" -- Remote version: "
+
remoteVersion
);
System
.
out
.
println
(
"Changelog: "
+
REPOSITORY_URL
+
"blob/master/changelog.md"
);
System
.
out
.
println
(
remoteData
.
getString
(
"updateMessage"
));
}
else
System
.
out
.
println
(
"Local tests are up to date"
);
}
if
(!(
CHECK_HASHES
||
(
AUTO_UPDATE
&&
remoteVersion
.
compareTo
(
localVersion
)
>
0
)))
return
false
;
...
...
@@ -304,8 +304,6 @@ public class Utils {
for
(
Map
.
Entry
<
String
,
Object
>
methodEntry
:
configData
.
getJSONObject
(
"methods"
).
toMap
().
entrySet
())
configFileContents
.
append
((
String
)
methodEntry
.
getValue
()).
append
(
"\n\n"
);
persistentChanges
=
true
;
try
(
BufferedWriter
writer
=
new
BufferedWriter
(
new
FileWriter
(
configData
.
getString
(
"file"
))))
{
writer
.
write
(
configStub
.
replaceFirst
(
">>>##<<<"
,
configFileContents
.
toString
()));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment