Bug 172604 Total.Rank result incorrect.
The Total.rank() aggregation function should follow Excel convention, that is, the identical values should only hold one place in rank. The following table give details: Value | Rank 20 | 3 10 | 4 30 | 2 30 | 2 40 | 1
data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/aggregation/TotalTest.java
ac.onRow( new Object[]{dates[i]} );
		}
        ac.finish();
        assertEquals( ac.getValue(), new Date(2500000L) );
        
        ac.start();
	    for ( int i = 0; i < dates2.length; i++ )
		{
			ac.onRow( new Object[]{dates2[i]} );
		}
        ac.finish();
        assertEquals( ac.getValue(),  new Date(2000000L) );
    }
    
    public void testTotalMode() throws Exception
    {
        IAggregation ag = BuiltInAggregationFactory.getInstance().getAggregation("mode");
        Accumulator ac = ag.newAccumulator();
        assertEquals(BuiltInAggregationFactory.TOTAL_MODE_FUNC, ag.getName());
        assertEquals(IAggregation.SUMMARY_AGGR, ag.getType());
        assertEquals(1, ag.getParameterDefn().length);
        assertTrue(ag.getParameterDefn()[0]);
        
        ac.start();
        for(int i=0; i<doubleArray1.length; i++)
        {
            ac.onRow(new Double[]{new Double(doubleArray1[i])});
        }
        ac.finish();
        assertEquals(new Double(4.0), ac.getValue());