externals: Add catch2 v3.2.1

Merge commit '6879e5bb1c' as 'externals/catch'
This commit is contained in:
Merry 2022-12-31 17:28:39 +00:00
commit 3dce8d1984
521 changed files with 182737 additions and 0 deletions

20
externals/catch/fuzzing/NullOStream.h vendored Normal file
View file

@ -0,0 +1,20 @@
#pragma once
#include <ostream>
#include <streambuf>
// from https://stackoverflow.com/a/8244052
class NullStreambuf : public std::streambuf {
char dummyBuffer[64];
protected:
virtual int overflow(int c) override final;
};
class NullOStream final : private NullStreambuf, public std::ostream {
public:
NullOStream() : std::ostream(this) {}
NullStreambuf *rdbuf() { return this; }
virtual void avoidOutOfLineVirtualCompilerWarning();
};