Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WS-17-18
assignment-tests
Commits
3f6ff061
Commit
3f6ff061
authored
Mar 02, 2018
by
Alexander
Browse files
Improve CaseCreator
parent
c1d1f8c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/final_assignment/task_2/CaseCreator.java
View file @
3f6ff061
...
...
@@ -16,7 +16,7 @@ public class CaseCreator {
private
final
int
nCountries
=
20
;
private
final
int
nSports
=
20
;
private
final
int
nAthletes
=
2
000
;
private
final
int
nAthletes
=
2
1
;
private
final
int
nErrors
=
100
;
...
...
@@ -32,7 +32,7 @@ public class CaseCreator {
private
void
createTest
()
{
final
RandomPicker
randomPicker
=
new
RandomPicker
(
random
);
System
.
out
.
print
ln
(
"Creating input
..."
);
System
.
out
.
print
f
(
"Creating input
for seed %d...%n"
,
rgenseed
);
testPairFile
=
new
StringBuilder
();
Terminal
.
IN_TEST
.
clear
();
Terminal
.
OUT_TEST
.
clear
();
...
...
@@ -153,7 +153,10 @@ public class CaseCreator {
}
Terminal
.
IN_TEST
.
add
(
"quit"
);
long
startTime
=
System
.
nanoTime
();
testedMethod
.
run
();
long
endTime
=
System
.
nanoTime
();
System
.
out
.
println
(
String
.
format
(
"Program run in %f ms."
,
(
endTime
-
startTime
)
/
1000000.0
));
for
(
TestPair
testPair
:
testPairs
)
{
testPairFile
.
append
(
"> "
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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