On 7 July 2013 17:13, Phil Steitz <phil.ste...@gmail.com> wrote: > Looks like a little extreme "test first" below ;) > > Freq class change has not been committed. Probably an errant > commit, should be rolled back until the changes are made to the > implementation class. Caught by Continuum.
Yes, sorry about that. Commited wrong file; the constants were in a different test class. I've disabled the future test; will re-enable when the method is added. > Phil > > On 7/4/13 11:54 AM, s...@apache.org wrote: >> Author: sebb >> Date: Thu Jul 4 18:54:42 2013 >> New Revision: 1499841 >> >> URL: http://svn.apache.org/r1499841 >> Log: >> The values are constants, so make them so >> >> Modified: >> >> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/FrequencyTest.java >> >> Modified: >> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/FrequencyTest.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/FrequencyTest.java?rev=1499841&r1=1499840&r2=1499841&view=diff >> ============================================================================== >> --- >> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/FrequencyTest.java >> (original) >> +++ >> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/FrequencyTest.java >> Thu Jul 4 18:54:42 2013 >> @@ -332,5 +332,19 @@ public final class FrequencyTest { >> Assert.assertEquals(1, f.getCount(twoI)); >> Assert.assertEquals(1, f.getCount(threeI)); >> } >> + >> + @Test >> + public void testMode() { >> + Assert.assertEquals(0, f.getMode().size()); >> + f.addValue("1"); >> + Assert.assertEquals(1, f.getMode().size()); >> + f.addValue("2"); >> + Assert.assertEquals(2, f.getMode().size()); >> + Assert.assertTrue(f.getMode().contains("1")); >> + Assert.assertTrue(f.getMode().contains("2")); >> + f.addValue("2"); >> + Assert.assertEquals(1, f.getMode().size()); >> + Assert.assertFalse(f.getMode().contains("1")); >> + Assert.assertTrue(f.getMode().contains("2")); >> + } >> } >> - >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org