STYLE: update applications/tests to use SpanStream/CharStream

This commit is contained in:
Mark Olesen
2023-10-04 18:29:16 +02:00
committed by Andrew Heather
parent 3693d61e6c
commit 0fb2c8eb1c
28 changed files with 99 additions and 93 deletions

View File

@ -28,18 +28,15 @@ Description
\*---------------------------------------------------------------------------*/
#include "IOstreams.H"
#include "SpanStream.H"
#include "StringStream.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
template<class OStreamType>
void doTest()
{
Info<< "Begin test OStringStream" << endl;
OStringStream os;
OStreamType os;
os << "output with some values " << 1 << " entry" << endl;
Info<< "contains:" << nl
@ -59,8 +56,20 @@ int main(int argc, char *argv[])
Info<< "after reset:" << nl
<< os.str() << endl;
}
Info<< "End\n" << endl;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
Info<< "Begin test OStringStream" << endl;
doTest<OStringStream>();
// No reset() method: doTest<OCharStream>();
Info<< "\nEnd\n" << endl;
return 0;
}