From aedcdeb8eb4b1413493f697a9cfc9590ab5fb8e6 Mon Sep 17 00:00:00 2001 From: Michael Innerberger Date: Tue, 12 Mar 2024 17:12:58 -0400 Subject: [PATCH] Remove unnecessary loop in summation test --- src/test/java/net/imglib2/util/RealSumTest.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test/java/net/imglib2/util/RealSumTest.java b/src/test/java/net/imglib2/util/RealSumTest.java index 4d8f2ca0f..4f8002eec 100644 --- a/src/test/java/net/imglib2/util/RealSumTest.java +++ b/src/test/java/net/imglib2/util/RealSumTest.java @@ -92,13 +92,10 @@ public void testGetSum() @Test public void testAdd() { - for ( int t = 0; t < 20; ++t ) - { - final RealSum sum = new RealSum(); - for ( int i = 0; i < stream.length; ++i ) - sum.add( 1 ); - Assert.assertEquals( sum.getSum(), stream.length, 0.0001 ); - } + final RealSum sum = new RealSum(); + for ( int i = 0; i < stream.length; ++i ) + sum.add( 1 ); + Assert.assertEquals( sum.getSum(), stream.length, 0.0001 ); } /**