| 3850 | namespace Catch { |
| 3851 | |
| 3852 | struct Colour { |
| 3853 | enum Code { |
| 3854 | None = 0, |
| 3855 | |
| 3856 | White, |
| 3857 | Red, |
| 3858 | Green, |
| 3859 | Blue, |
| 3860 | Cyan, |
| 3861 | Yellow, |
| 3862 | Grey, |
| 3863 | |
| 3864 | Bright = 0x10, |
| 3865 | |
| 3866 | BrightRed = Bright | Red, |
| 3867 | BrightGreen = Bright | Green, |
| 3868 | LightGrey = Bright | Grey, |
| 3869 | BrightWhite = Bright | White, |
| 3870 | BrightYellow = Bright | Yellow, |
| 3871 | |
| 3872 | // By intention |
| 3873 | FileName = LightGrey, |
| 3874 | Warning = BrightYellow, |
| 3875 | ResultError = BrightRed, |
| 3876 | ResultSuccess = BrightGreen, |
| 3877 | ResultExpectedFailure = Warning, |
| 3878 | |
| 3879 | Error = BrightRed, |
| 3880 | Success = Green, |
| 3881 | |
| 3882 | OriginalExpression = Cyan, |
| 3883 | ReconstructedExpression = BrightYellow, |
| 3884 | |
| 3885 | SecondaryText = LightGrey, |
| 3886 | Headers = White |
| 3887 | }; |
| 3888 | |
| 3889 | // Use constructed object for RAII guard |
| 3890 | Colour(Code _colourCode); |
| 3891 | Colour(Colour &&other) noexcept; |
| 3892 | Colour &operator=(Colour &&other) noexcept; |
| 3893 | ~Colour(); |
| 3894 | |
| 3895 | // Use static method for one-shot changes |
| 3896 | static void use(Code _colourCode); |
| 3897 | |
| 3898 | private: |
| 3899 | bool m_moved = false; |
| 3900 | }; |
| 3901 | |
| 3902 | std::ostream &operator<<(std::ostream &os, Colour const &); |
| 3903 |
no outgoing calls