MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / TEST

Function TEST

ecosystem/test/test_redis.cpp:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46TEST(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
62void print_resp(const std::string_view s) {
63 for (char c: s) {

Callers

nothing calls this directly

Calls 15

new_string_socket_streamFunction · 0.85
print_respFunction · 0.85
is_using_default_engineFunction · 0.85
new_tcp_socket_clientFunction · 0.85
flushMethod · 0.80
parse_response_itemMethod · 0.80
initFunction · 0.50
finiFunction · 0.50
c_strMethod · 0.45
set_inputMethod · 0.45
inputMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected