diff --git a/applications/test/DynamicList/DynamicListTest.C b/applications/test/DynamicList/DynamicListTest.C index 822ee3cacb..a4e3ae25ff 100644 --- a/applications/test/DynamicList/DynamicListTest.C +++ b/applications/test/DynamicList/DynamicListTest.C @@ -31,6 +31,41 @@ Description using namespace Foam; +template +void printInfo +( + const word& tag, + const UList& lst, + const bool showSize = false +) +{ + Info<< "<" << tag; + if (showSize) + { + Info<< " size=\"" << lst.size() << "\""; + } + Info<< ">" << lst << "" << endl; +} + + +template +void printInfo +( + const word& tag, + const DynamicList& lst, + const bool showSize = false +) +{ + Info<< "<" << tag; + if (showSize) + { + Info<< " size=\"" << lst.size() + << "\" capacity=\"" << lst.capacity() << "\""; + } + Info<< ">" << lst << "" << endl; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: @@ -104,10 +139,8 @@ int main(int argc, char *argv[]) List