From: <eg...@us...> - 2007-09-25 15:39:05
|
Revision: 8961 http://cdk.svn.sourceforge.net/cdk/?rev=8961&view=rev Author: egonw Date: 2007-09-25 08:39:02 -0700 (Tue, 25 Sep 2007) Log Message: ----------- Fixed the test for the recently added primes, and split up two situations into separate tests. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/test/math/PrimesTest.java Modified: trunk/cdk/src/org/openscience/cdk/test/math/PrimesTest.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/test/math/PrimesTest.java 2007-09-25 15:38:37 UTC (rev 8960) +++ trunk/cdk/src/org/openscience/cdk/test/math/PrimesTest.java 2007-09-25 15:39:02 UTC (rev 8961) @@ -43,17 +43,19 @@ assertEquals(2, Primes.getPrimeAt(0)); try { - Primes.getPrimeAt(1229); + Primes.getPrimeAt(2229); fail("Should fail her, because it contains only X primes."); } catch (ArrayIndexOutOfBoundsException exception) { - // ok, that should happen + // OK, that should happen } - + } + + public void testArrayIndexOutOfBounds() { try { Primes.getPrimeAt(-1); fail("Should fail her, because only positive integers are accepted"); } catch (ArrayIndexOutOfBoundsException exception) { - // ok, that should happen + // OK, that should happen } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |