<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/include/internal/catch_run_context.cpp, branch v2.2.3</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>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>
<entry>
<title>Cleanup for performance reasons</title>
<updated>2018-03-02T15:24:35+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2018-03-02T15:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=d2ddb997a74f698e10ac3debbfc48b3722caf3eb'/>
<id>d2ddb997a74f698e10ac3debbfc48b3722caf3eb</id>
<content type='text'>
* Eliminated some copies
* Made makeTestCase fit into 4 arguments -- avoids spills on Win64
* Made string literals into StringRef literals
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Eliminated some copies
* Made makeTestCase fit into 4 arguments -- avoids spills on Win64
* Made string literals into StringRef literals
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed NoAssertions warning</title>
<updated>2018-01-26T16:52:28+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2018-01-26T16:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=ca2455e6e6436d18b4d62dddd0595444cceeb3ad'/>
<id>ca2455e6e6436d18b4d62dddd0595444cceeb3ad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactored StreamRedirect classes</title>
<updated>2017-12-05T23:19:28+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-12-05T23:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=aa9d635014c3ab321fe65bd59c50fa71d6a86583'/>
<id>aa9d635014c3ab321fe65bd59c50fa71d6a86583</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Just track whether last assertion passed directly, rather than deduce it from counts</title>
<updated>2017-12-02T18:44:23+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-12-02T18:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=dfa817ae73486bdff61336b60967407324e5e1f4'/>
<id>dfa817ae73486bdff61336b60967407324e5e1f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed assertionRun() and rolled its logic into assertionPassed() and assertionEnded()</title>
<updated>2017-12-02T18:44:23+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-12-02T16:32:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=57c346a46d0060c2cfb1504ed7c765745301503f'/>
<id>57c346a46d0060c2cfb1504ed7c765745301503f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed accidental const &amp; formating</title>
<updated>2017-11-27T19:28:45+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-11-27T19:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=da86ddc6207dc8c6980c8acf911ffeaaf1247134'/>
<id>da86ddc6207dc8c6980c8acf911ffeaaf1247134</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved all AssertionHandler logic into RunContext and de-virtualised interface</title>
<updated>2017-11-27T19:23:15+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-11-27T19:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4b614ee1d19514b9f72352b48589301ab808e774'/>
<id>4b614ee1d19514b9f72352b48589301ab808e774</id>
<content type='text'>
This makes the assertion handling much less "chatty". AssertionHandler is now just a thin shim over RunContext
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the assertion handling much less "chatty". AssertionHandler is now just a thin shim over RunContext
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactored most handle() calls to more specific/ descriptive calls</title>
<updated>2017-11-26T21:28:43+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-11-24T19:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=db44964e27cb9dc4e4ff115e0ba29c9038824bcc'/>
<id>db44964e27cb9dc4e4ff115e0ba29c9038824bcc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Always debug-break non-inline</title>
<updated>2017-11-23T19:14:26+00:00</updated>
<author>
<name>Phil Nash</name>
</author>
<published>2017-11-23T19:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=9329d97a43b36aa2499ac1bc1e7ed78815ca2584'/>
<id>9329d97a43b36aa2499ac1bc1e7ed78815ca2584</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
