Skip to content

Commit

Permalink
Remove unnecessary loop in summation test
Browse files Browse the repository at this point in the history
  • Loading branch information
minnerbe authored and tpietzsch committed Mar 28, 2024
1 parent 3ff8dee commit aedcdeb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/test/java/net/imglib2/util/RealSumTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down

0 comments on commit aedcdeb

Please sign in to comment.