Make some unit tests use mock file output
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 28 Jun 2015 19:21:52 +0000 (22:21 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 4 Jul 2015 10:22:39 +0000 (12:22 +0200)
Introduce TextOutputStream interface that can be used instead of direct
file output.  Make unit tests for help output use an in-memory stream
instead of a real file using this mechanism.

TextWriter wraps the raw stream and provides more convenient
line-oriented writing capabilities (and provides a natural place to
implement more of the same, making them immediately available
independent of the stream used).

Most of the touched files only contain mechanical
  File -> TextWriter/TextOutputStream
and related documentation replacements.  The main non-trivial changes
are introduction of the streams and TextWriter in utility/, and
reorganization of the way the tests use TestOutputRedirector.

Further work follows to allow full removal of the old File class and to
extend the use of the streams.

Change-Id: I7700d0d8af5f44b304b940797a4834993e4738fb


No differences found