| 5920 | namespace Catch { |
| 5921 | |
| 5922 | struct Colour { |
| 5923 | enum Code { |
| 5924 | None = 0, |
| 5925 | |
| 5926 | White, |
| 5927 | Red, |
| 5928 | Green, |
| 5929 | Blue, |
| 5930 | Cyan, |
| 5931 | Yellow, |
| 5932 | Grey, |
| 5933 | |
| 5934 | Bright = 0x10, |
| 5935 | |
| 5936 | BrightRed = Bright | Red, |
| 5937 | BrightGreen = Bright | Green, |
| 5938 | LightGrey = Bright | Grey, |
| 5939 | BrightWhite = Bright | White, |
| 5940 | BrightYellow = Bright | Yellow, |
| 5941 | |
| 5942 | // By intention |
| 5943 | FileName = LightGrey, |
| 5944 | Warning = BrightYellow, |
| 5945 | ResultError = BrightRed, |
| 5946 | ResultSuccess = BrightGreen, |
| 5947 | ResultExpectedFailure = Warning, |
| 5948 | |
| 5949 | Error = BrightRed, |
| 5950 | Success = Green, |
| 5951 | |
| 5952 | OriginalExpression = Cyan, |
| 5953 | ReconstructedExpression = BrightYellow, |
| 5954 | |
| 5955 | SecondaryText = LightGrey, |
| 5956 | Headers = White |
| 5957 | }; |
| 5958 | |
| 5959 | // Use constructed object for RAII guard |
| 5960 | Colour( Code _colourCode ); |
| 5961 | Colour( Colour&& other ) noexcept; |
| 5962 | Colour& operator=( Colour&& other ) noexcept; |
| 5963 | ~Colour(); |
| 5964 | |
| 5965 | // Use static method for one-shot changes |
| 5966 | static void use( Code _colourCode ); |
| 5967 | |
| 5968 | private: |
| 5969 | bool m_moved = false; |
| 5970 | }; |
| 5971 | |
| 5972 | std::ostream& operator << ( std::ostream& os, Colour const& ); |
| 5973 |
no outgoing calls
no test coverage detected