<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_output_redirect.cpp, branch v2.x</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Make experimental capture work on Windows with read-write temp file behavior</title>
<updated>2020-09-10T18:14:18+00:00</updated>
<author>
<name>Travis Wilson</name>
</author>
<published>2020-09-01T00:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a2e5ce241839c55a85e52ea12d7b444f2cbe20e0'/>
<id>a2e5ce241839c55a85e52ea12d7b444f2cbe20e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos identified by codespell.</title>
<updated>2019-04-10T07:42:11+00:00</updated>
<author>
<name>Ryan Pavlik</name>
</author>
<published>2019-04-08T21:30:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=edde6f473604c6364476d2963939272ac7c795d4'/>
<id>edde6f473604c6364476d2963939272ac7c795d4</id>
<content type='text'>
Self test baselines also modified accordingly, due to
one typo found in a string in test code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Self test baselines also modified accordingly, due to
one typo found in a string in test code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix output redirection in failing tests (#1525)</title>
<updated>2019-03-02T20:18:48+00:00</updated>
<author>
<name>SimonChh</name>
</author>
<published>2019-03-02T20:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7d2451f119457db33eb777f97b7b88849743352e'/>
<id>7d2451f119457db33eb777f97b7b88849743352e</id>
<content type='text'>
Fixes #1514 
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #1514 
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace most naked throws with macros from catch_enforce.h</title>
<updated>2018-09-03T16:07:34+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-09-03T08:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=86da2846af20666d85effcecd4c90077477c1ce6'/>
<id>86da2846af20666d85effcecd4c90077477c1ce6</id>
<content type='text'>
This is a first step towards support a no-exceptions mode
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a first step towards support a no-exceptions mode
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow disabling the implementation of the new output capture</title>
<updated>2018-07-13T18:27:00+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-07-13T18:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9ee4c1db5294a7245920bbbf93e85aa47e646595'/>
<id>9ee4c1db5294a7245920bbbf93e85aa47e646595</id>
<content type='text'>
As it turns out, some platforms do not provide things like `dup`,
or `std::tmpfile`, but they do provide streams...

Closes #1335
Related to #1311
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it turns out, some platforms do not provide things like `dup`,
or `std::tmpfile`, but they do provide streams...

Closes #1335
Related to #1311
</pre>
</div>
</content>
</entry>
<entry>
<title>Finish fixing invalid compilation using MinGW</title>
<updated>2018-06-04T21:49:40+00:00</updated>
<author>
<name>Lyashenko Arsenii Maksimovich</name>
</author>
<published>2018-05-01T11:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=021fcee63667e346c619e04bbae932bcea562334'/>
<id>021fcee63667e346c619e04bbae932bcea562334</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Only use tmpfile workaround for MSVC and not MinGW and friends</title>
<updated>2018-04-30T21:19:39+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-04-30T21:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ae590fe2163270685ebec4ed1541d3e8e9401692'/>
<id>ae590fe2163270685ebec4ed1541d3e8e9401692</id>
<content type='text'>
Fixes #1270
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #1270
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix missing include and wrong comment format</title>
<updated>2018-04-30T13:15:59+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-04-30T13:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=0510d4755f715d21695ea4a5b15069d69789d7a2'/>
<id>0510d4755f715d21695ea4a5b15069d69789d7a2</id>
<content type='text'>
While the comment format was valid C++, it breaks our tooling badly.
I opened up a github issue for our tooling, because unexpected
formatting of a block comment should not silently generate invalid
single header file, see #1269.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While the comment format was valid C++, it breaks our tooling badly.
I opened up a github issue for our tooling, because unexpected
formatting of a block comment should not silently generate invalid
single header file, see #1269.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an experimental new way of capturing stdout/stderr</title>
<updated>2018-04-29T20:25:49+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-04-29T20:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=e92b9c07c3a7b8b3c40590a191bd2f7fb59cd268'/>
<id>e92b9c07c3a7b8b3c40590a191bd2f7fb59cd268</id>
<content type='text'>
Unlike the relatively non-invasive old way of capturing stdout/stderr,
this new way is also able to capture output from C's stdlib functions
such as `printf`. This is done by redirecting stdout and stderr file
descriptors to a file, and then reading this file back.

This approach has two sizeable drawbacks:
1) Performance, obviously. Previously an installed capture made the
program run faster (as long as it was then discarded), because a call
to `std::cout` did not result in text output to the console. This new
capture method in fact forces disk IO. While it is likely that any
modern OS will keep this file in memory-cache and might never actually
issue the IO to the backing storage, it is still a possibility and
calls to the file system are not free.

2) Nonportability. While POSIX is usually assumed portable, and this
implementation relies only on a very common parts of it, it is no
longer standard C++ (or just plain C) and thus might not be available
on some obscure platforms. Different C libs might also implement the
relevant functions in a less-than-useful ways (e.g. MS's `tmpfile`
generates a temp file inside system folder, so it will not work
without elevated privileges and thus is useless).

These two drawbacks mean that, at least for now, the new capture is
opt-in. To opt-in, `CATCH_CONFIG_EXPERIMENTAL_REDIRECT` needs to be
defined in the implementation file.

Closes #1243
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unlike the relatively non-invasive old way of capturing stdout/stderr,
this new way is also able to capture output from C's stdlib functions
such as `printf`. This is done by redirecting stdout and stderr file
descriptors to a file, and then reading this file back.

This approach has two sizeable drawbacks:
1) Performance, obviously. Previously an installed capture made the
program run faster (as long as it was then discarded), because a call
to `std::cout` did not result in text output to the console. This new
capture method in fact forces disk IO. While it is likely that any
modern OS will keep this file in memory-cache and might never actually
issue the IO to the backing storage, it is still a possibility and
calls to the file system are not free.

2) Nonportability. While POSIX is usually assumed portable, and this
implementation relies only on a very common parts of it, it is no
longer standard C++ (or just plain C) and thus might not be available
on some obscure platforms. Different C libs might also implement the
relevant functions in a less-than-useful ways (e.g. MS's `tmpfile`
generates a temp file inside system folder, so it will not work
without elevated privileges and thus is useless).

These two drawbacks mean that, at least for now, the new capture is
opt-in. To opt-in, `CATCH_CONFIG_EXPERIMENTAL_REDIRECT` needs to be
defined in the implementation file.

Closes #1243
</pre>
</div>
</content>
</entry>
</feed>
