diff --git a/applications/test/sort/sortListTest.C b/applications/test/sort/sortListTest.C index 34a756dae7..06d5b01186 100644 --- a/applications/test/sort/sortListTest.C +++ b/applications/test/sort/sortListTest.C @@ -27,6 +27,7 @@ Description \*---------------------------------------------------------------------------*/ #include "SortableList.H" +#include "ListOps.H" using namespace Foam; @@ -35,49 +36,101 @@ using namespace Foam; int main(int argc, char *argv[]) { - labelList orig(5); + labelList orig(8); orig[0] = 7; - orig[1] = 4; + orig[1] = 9; orig[2] = 1; orig[3] = 2; - orig[4] = 9; + orig[4] = 4; + orig[5] = 7; + orig[6] = 4; + orig[7] = 0; + + labelList order; labelList a(orig); - Info << "before: " << a << endl; + sortedOrder(a, order); + + Info<< "unsorted: " << a << endl; sort(a); - Info << "after: " << a << endl; + Info<< "sorted: " << a << endl; + Info<< "indices: " << order << endl; SortableList