Skip to content

Commit 01e531a

Browse files
committed
ok and fail values
1 parent 66eb03b commit 01e531a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cryptoTools/Common/Log.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,19 @@ namespace osuCrypto
219219
void setThreadName(const std::string name);
220220
void setThreadName(const char* name);
221221

222+
223+
struct OK_t {};
224+
struct FAIL_t {};
225+
226+
inline std::ostream& operator<<(std::ostream& o, OK_t) {
227+
o << Color::Green << "[OK]" << Color::Default;
228+
return o;
229+
}
230+
inline std::ostream& operator<<(std::ostream& o, FAIL_t) {
231+
o << Color::Red << "[FAIL]" << Color::Default;
232+
return o;
233+
}
234+
235+
static constexpr OK_t OK;
236+
static constexpr FAIL_t FAIL{};
222237
}

0 commit comments

Comments
 (0)