Skip to content

Commit

Permalink
Better assertion message eclipse-platform#882
Browse files Browse the repository at this point in the history
  • Loading branch information
basilevs committed Nov 11, 2023
1 parent 3fec26b commit a362620
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ public void test_getItemNoGrowth() {
double elapsed_100000 = measureGetItemNanos(100000);
double ratio = elapsed_100000 / elapsed_100;
System.out.printf("Time for 100 elements: %f ns\nTime for 100000 elements: %f ns\nRatio: %f\n",elapsed_100, elapsed_100000, ratio);
assertTrue("", (elapsed_100000 <= 100 && elapsed_100 <= 100) || ratio < 10);
assertTrue("Execution time should not grow with index", (elapsed_100000 <= 100 && elapsed_100 <= 100) || ratio < 10);
});
}

Expand Down Expand Up @@ -1258,7 +1258,7 @@ public void test_getItemCountNoGrowth() {
double elapsed_100000 = measureGetItemCountNanos(100000);
double ratio = elapsed_100000 / elapsed_100;
System.out.printf("Time for 100 elements: %f ns\nTime for 100000 elements: %f ns\nRatio: %f\n",elapsed_100, elapsed_100000, ratio);
assertTrue("", (elapsed_100000 <= 100 && elapsed_100 <= 100) || ratio < 10);
assertTrue("Execution time should not grow with child count", (elapsed_100000 <= 100 && elapsed_100 <= 100) || ratio < 10);
});
}

Expand Down

0 comments on commit a362620

Please sign in to comment.