diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C index c8e2ed4a93..ca3f4fc787 100644 --- a/applications/test/DynamicList/Test-DynamicList.C +++ b/applications/test/DynamicList/Test-DynamicList.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,10 @@ Description #include "DynamicList.H" #include "IOstreams.H" +#include "FlatOutput.H" #include "ListOps.H" +#include "labelRange.H" +#include "labelIndList.H" using namespace Foam; @@ -44,15 +47,15 @@ void printInfo { Info<< " size=\"" << lst.size() << "\""; } - Info<< ">" << lst << "" << endl; + Info<< ">" << nl << flatOutput(lst) << nl << "" << endl; } -template +template void printInfo ( const word& tag, - const DynamicList& lst, + const DynamicList& lst, const bool showSize = false ) { @@ -62,7 +65,7 @@ void printInfo Info<< " size=\"" << lst.size() << "\" capacity=\"" << lst.capacity() << "\""; } - Info<< ">" << lst << "" << endl; + Info<< ">" << nl << flatOutput(lst) << nl << "" << endl; } @@ -71,7 +74,7 @@ void printInfo int main(int argc, char *argv[]) { - List> ldl(2); + List> ldl(2); ldl[0](0) = 0; ldl[0](2) = 2; @@ -89,7 +92,7 @@ int main(int argc, char *argv[]) ldl[1] = 3; - Info<< "" << ldl << "" << nl << "sizes: "; + Info<< "" << flatOutput(ldl) << "" << nl << "sizes: "; forAll(ldl, i) { Info<< " " << ldl[i].size() << "/" << ldl[i].capacity(); @@ -100,7 +103,7 @@ int main(int argc, char *argv[]) ll[0].transfer(ldl[0]); ll[1].transfer(ldl[1].shrink()); - Info<< "" << ldl << "" << nl << "sizes: "; + Info<< "" << flatOutput(ldl) << "" << nl << "sizes: "; forAll(ldl, i) { Info<< " " << ldl[i].size() << "/" << ldl[i].capacity(); @@ -111,18 +114,18 @@ int main(int argc, char *argv[]) // test the transfer between DynamicLists - DynamicList dlA + DynamicList