| 44 | }; |
| 45 | |
| 46 | TEST(redis, serialization) { |
| 47 | auto s = new_string_socket_stream(); |
| 48 | DEFER(delete s); |
| 49 | RedisClient rc(s, false); |
| 50 | rc << "asldkfjasfkd" |
| 51 | << __RC::_strint{234} |
| 52 | << "this-is-another-string" |
| 53 | << __RC::_strint{-1234234} |
| 54 | ; |
| 55 | rc.flush(); |
| 56 | puts(s->output().c_str()); |
| 57 | const static char RESP[] = BSTR(12,asldkfjasfkd) BSTR(03,234) |
| 58 | BSTR(22,this-is-another-string) BSTR(08,-1234234); |
| 59 | EXPECT_EQ(s->output(), RESP); |
| 60 | } |
| 61 | |
| 62 | void print_resp(const std::string_view s) { |
| 63 | for (char c: s) { |
nothing calls this directly
no test coverage detected