diff --git a/applications/test/ITstream/Test-ITstream.cxx b/applications/test/ITstream/Test-ITstream.cxx index 3e239ede7e..6aa034b04a 100644 --- a/applications/test/ITstream/Test-ITstream.cxx +++ b/applications/test/ITstream/Test-ITstream.cxx @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2023 OpenCFD Ltd. + Copyright (C) 2017-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,15 +74,11 @@ Ostream& toString(Ostream& os, const List& list) void printTokens(Istream& is) { label count = 0; - token t; - while (is.good()) + + Info<< "stream tokens:" << endl; + for (token tok; tok.read(is); ++count) { - is >> t; - if (t.good()) - { - ++count; - Info<< "token: " << t << endl; - } + Info<< " : " << tok << endl; } Info<< count << " tokens" << endl; @@ -455,6 +451,12 @@ int main(int argc, char *argv[]) "( const char input \"string\" to tokenize )\n" "List