mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-02 04:04:44 +02:00
Implement formatting of objects with (s)printf.
This commit is contained in:
13
test/util.h
13
test/util.h
@@ -67,3 +67,16 @@ inline FILE *safe_fopen(const char *filename, const char *mode) {
|
||||
return std::fopen(filename, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
class TestString {
|
||||
private:
|
||||
std::string value_;
|
||||
|
||||
public:
|
||||
explicit TestString(const char *value = "") : value_(value) {}
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os, const TestString &s) {
|
||||
os << s.value_;
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user