Closed GoogleCodeExporter closed 9 years ago
Hi Peter,
You can use the event listener API to override the default text output:
http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Extending_Googl
e_Test
_by_Handling_Test_Events
Please email googletestframework@googlegroups.com if you have further questions.
Original comment by zhanyong...@gmail.com
on 5 Oct 2009 at 9:01
Zhanyong.wan
I saw the Adv.Guide section you mentioned, and it does claim that, and I'm sure
it
can but the examples given don't directly have to do with suppressing and
replacing
default outputs. So I'll have to study that section more carefully to learn
how to
use event listeners to do it.
Thanks, Peter Schwenn
Original comment by pschw...@gmail.com
on 5 Oct 2009 at 9:13
Zhanyong.wan
What I'm trying to suppress or replace is not particular outputs, or "most" of
the
default text output, but the Console App nature of Google Test -- i.e. its ever
having a default output stream of "console out" or ever taking any action that
would
result in the opening of a command window.
Perhaps you could help me by verifying where the defaults for stdout and stderr
are
setup in the Google Test source code. I suppose they may be in the <iostream>
header, but I do not find them.
Thank you, Peter Schwenn
Original comment by pschw...@gmail.com
on 6 Oct 2009 at 4:39
Dear Zhanyong Wan and anyone else interested in getting Gtest to run as a
Visual
Studio post-build-event even under Team Build,
I have been able to inhibit my Gtest app executable from popping up a Command
Window
or a Windows window by re-defining it as a Windows app rather than a Console
app (in
Visual Studio terms), and then gutting the InitInstance routine which
instantiates a
startup window.
(I have not been able to verify yet that my Gtest app is happy to run in a
windowless environment but it should be.)
This means that Gtest can be used in the automating context of MS Team Build,
for
example, to unit test "unmanaged" C++ code or mixed managed&unmanaged C++
projects,
which Microsoft Build tool's unit testing frameworks cannot do.
Peter Schwenn
Original comment by pschw...@gmail.com
on 7 Oct 2009 at 11:46
Original issue reported on code.google.com by
pschw...@gmail.com
on 5 Oct 2009 at 6:08