mondrian.olap.fun
Class PartialSortTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by mondrian.olap.fun.PartialSortTest
All Implemented Interfaces:
junit.framework.Test

public class PartialSortTest
extends junit.framework.TestCase

PartialSortTest is a unit test for the partial-sort algorithm FunUtil.partialSort(T[], java.util.Comparator, int), which supports MDX functions like TopCount and BottomCount. No MDX here; there are tests of TopCount etc in FunctionTest.

Since:
Nov 2008
Author:
Marc Berkowitz

Nested Class Summary
(package private) static class PartialSortTest.Item
           
 
Field Summary
(package private)  Random random
           
 
Constructor Summary
PartialSortTest()
           
 
Method Summary
 void testOnAlreadyReverseSorted()
           
 void testOnAlreadySorted()
           
 void testOnManyRandomIntegers()
           
 void testOnRandomIntegers()
           
 void testPredicate1()
           
 void testPredicate2()
           
 void testPredicateIsStablySorted()
           
 void testQuick()
           
 void testSpeed()
           
 void testStableOnRandomItems()
           
 void testStableQuick()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

random

final Random random
Constructor Detail

PartialSortTest

public PartialSortTest()
Method Detail

testPredicate1

public void testPredicate1()

testPredicate2

public void testPredicate2()

testQuick

public void testQuick()

testOnAlreadySorted

public void testOnAlreadySorted()

testOnAlreadyReverseSorted

public void testOnAlreadyReverseSorted()

testOnRandomIntegers

public void testOnRandomIntegers()

testOnManyRandomIntegers

public void testOnManyRandomIntegers()

testPredicateIsStablySorted

public void testPredicateIsStablySorted()

testStableQuick

public void testStableQuick()

testStableOnRandomItems

public void testStableOnRandomItems()

testSpeed

public void testSpeed()

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads