Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lenard-mollenkopf
algodat-tests
Commits
90dfd80b
Commit
90dfd80b
authored
Jun 06, 2022
by
lenard-mollenkopf
Browse files
Aded test to force speed
parent
c198d07b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Blatt05/src/RowOfBowlsTest.java
View file @
90dfd80b
...
...
@@ -132,7 +132,18 @@ class RowOfBowlsTest {
}
@Test
void
testSpeed
()
throws
Throwable
{
void
testSpeedIsNotTooSlow
()
throws
Throwable
{
int
[]
bowlN
=
randomBowls
(
5000
);
RowOfBowls
rb
=
new
RowOfBowls
();
long
time
=
time
(()
->
{
rb
.
maxGain
(
bowlN
);
});
assertTrue
(
time
<
5000
,
"This should not take this long, it took 300ms on my system (:"
);
}
@Test
void
testSpeedIsInOnSquared
()
throws
Throwable
{
int
n
=
5000
;
int
[]
bowlN
=
randomBowls
(
n
);
...
...
Write
Preview
Supports
Markdown
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