mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 09:27:54 +00:00
Refactored ConsoleColour impl. Tweaked the (Windows) colours a bit.
Also fixed issue that would cause warnings on some compilers when doing REQUIRE( p ); where p is a pointer. Moved to build 23
This commit is contained in:
parent
a04981b450
commit
3df6c0d1b4
7 changed files with 237 additions and 235 deletions
|
@ -12,11 +12,7 @@
|
|||
|
||||
namespace Catch {
|
||||
|
||||
struct ConsoleColourImpl;
|
||||
|
||||
class TextColour : NonCopyable {
|
||||
public:
|
||||
|
||||
struct IConsoleColourCodes : NonCopyable {
|
||||
enum Colours {
|
||||
None,
|
||||
|
||||
|
@ -30,13 +26,18 @@ namespace Catch {
|
|||
OriginalExpression,
|
||||
ReconstructedExpression
|
||||
};
|
||||
|
||||
|
||||
virtual void set( Colours colour ) = 0;
|
||||
};
|
||||
|
||||
class TextColour : public IConsoleColourCodes {
|
||||
public:
|
||||
TextColour( Colours colour = None );
|
||||
void set( Colours colour );
|
||||
~TextColour();
|
||||
|
||||
private:
|
||||
ConsoleColourImpl* m_impl;
|
||||
IConsoleColourCodes* m_impl;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue