Commit 90dfd80b authored by lenard-mollenkopf's avatar lenard-mollenkopf
Browse files

Aded test to force speed

parent c198d07b
......@@ -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);
......
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