Lines Matching refs:buf
73 unsigned char buf[4] = {0xee, 0xee, 0xee, 0xee}; in TEST_F() local
75 ASSERT_EQ(size_t(4), mMBC->get("abcd", 4, buf, 4)); in TEST_F()
76 ASSERT_EQ('e', buf[0]); in TEST_F()
77 ASSERT_EQ('f', buf[1]); in TEST_F()
78 ASSERT_EQ('g', buf[2]); in TEST_F()
79 ASSERT_EQ('h', buf[3]); in TEST_F()
83 unsigned char buf[2] = {0xee, 0xee}; in TEST_F() local
86 ASSERT_EQ(size_t(2), mMBC->get("ab", 2, buf, 2)); in TEST_F()
87 ASSERT_EQ('c', buf[0]); in TEST_F()
88 ASSERT_EQ('d', buf[1]); in TEST_F()
89 ASSERT_EQ(size_t(2), mMBC->get("ef", 2, buf, 2)); in TEST_F()
90 ASSERT_EQ('g', buf[0]); in TEST_F()
91 ASSERT_EQ('h', buf[1]); in TEST_F()
95 unsigned char buf[2] = {0xee, 0xee}; in TEST_F() local
97 ASSERT_EQ(size_t(2), mMBC->get("ab", 2, buf, 2)); in TEST_F()
98 ASSERT_EQ('c', buf[0]); in TEST_F()
99 ASSERT_EQ('d', buf[1]); in TEST_F()
102 ASSERT_EQ(size_t(2), mMBC->get("ab", 2, buf, 2)); in TEST_F()
103 ASSERT_EQ('e', buf[0]); in TEST_F()
104 ASSERT_EQ('f', buf[1]); in TEST_F()
108 unsigned char buf[6] = {0xee, 0xee, 0xee, 0xee, 0xee, 0xee}; in TEST_F() local
110 ASSERT_EQ(size_t(4), mMBC->get("abcd", 4, buf + 1, 4)); in TEST_F()
111 ASSERT_EQ(0xee, buf[0]); in TEST_F()
112 ASSERT_EQ('e', buf[1]); in TEST_F()
113 ASSERT_EQ('f', buf[2]); in TEST_F()
114 ASSERT_EQ('g', buf[3]); in TEST_F()
115 ASSERT_EQ('h', buf[4]); in TEST_F()
116 ASSERT_EQ(0xee, buf[5]); in TEST_F()
120 unsigned char buf[3] = {0xee, 0xee, 0xee}; in TEST_F() local
122 ASSERT_EQ(size_t(4), mMBC->get("abcd", 4, buf, 3)); in TEST_F()
123 ASSERT_EQ(0xee, buf[0]); in TEST_F()
124 ASSERT_EQ(0xee, buf[1]); in TEST_F()
125 ASSERT_EQ(0xee, buf[2]); in TEST_F()
134 unsigned char buf[4] = {0xee, 0xee, 0xee, 0xee}; in TEST_F() local
137 ASSERT_EQ(size_t(4), mMBC->get("abcd", 4, buf, 4)); in TEST_F()
138 ASSERT_EQ('i', buf[0]); in TEST_F()
139 ASSERT_EQ('j', buf[1]); in TEST_F()
140 ASSERT_EQ('k', buf[2]); in TEST_F()
141 ASSERT_EQ('l', buf[3]); in TEST_F()
145 unsigned char buf[kMaxValueSize + 1] = {0xee, 0xee, 0xee, 0xee}; in TEST_F() local
147 mMBC->set("abcd", 4, buf, kMaxValueSize + 1); in TEST_F()
148 ASSERT_EQ(size_t(4), mMBC->get("abcd", 4, buf, 4)); in TEST_F()
149 ASSERT_EQ('e', buf[0]); in TEST_F()
150 ASSERT_EQ('f', buf[1]); in TEST_F()
151 ASSERT_EQ('g', buf[2]); in TEST_F()
152 ASSERT_EQ('h', buf[3]); in TEST_F()
157 unsigned char buf[4] = {0xee, 0xee, 0xee, 0xee}; in TEST_F() local
162 ASSERT_EQ(size_t(0), mMBC->get(key, kMaxKeySize + 1, buf, 4)); in TEST_F()
163 ASSERT_EQ(0xee, buf[0]); in TEST_F()
164 ASSERT_EQ(0xee, buf[1]); in TEST_F()
165 ASSERT_EQ(0xee, buf[2]); in TEST_F()
166 ASSERT_EQ(0xee, buf[3]); in TEST_F()
170 char buf[kMaxValueSize + 1]; in TEST_F() local
172 buf[i] = 'b'; in TEST_F()
174 mMBC->set("abcd", 4, buf, kMaxValueSize + 1); in TEST_F()
176 buf[i] = 0xee; in TEST_F()
178 ASSERT_EQ(size_t(0), mMBC->get("abcd", 4, buf, kMaxValueSize + 1)); in TEST_F()
181 ASSERT_EQ(0xee, buf[i]); in TEST_F()
187 unsigned char buf[4] = {0xee, 0xee, 0xee, 0xee}; in TEST_F() local
192 ASSERT_EQ(size_t(4), mMBC->get(key, kMaxKeySize, buf, 4)); in TEST_F()
193 ASSERT_EQ('w', buf[0]); in TEST_F()
194 ASSERT_EQ('x', buf[1]); in TEST_F()
195 ASSERT_EQ('y', buf[2]); in TEST_F()
196 ASSERT_EQ('z', buf[3]); in TEST_F()
200 char buf[kMaxValueSize]; in TEST_F() local
202 buf[i] = 'b'; in TEST_F()
204 mMBC->set("abcd", 4, buf, kMaxValueSize); in TEST_F()
206 buf[i] = 0xee; in TEST_F()
208 mMBC->get("abcd", 4, buf, kMaxValueSize); in TEST_F()
211 ASSERT_EQ('b', buf[i]); in TEST_F()
220 char buf[kMaxValueSize]; in TEST_F() local
222 buf[i] = 'b'; in TEST_F()
224 mMBC->set(key, kMaxKeySize, buf, kMaxValueSize); in TEST_F()
226 buf[i] = 0xee; in TEST_F()
228 mMBC->get(key, kMaxKeySize, buf, kMaxValueSize); in TEST_F()
231 ASSERT_EQ('b', buf[i]); in TEST_F()
253 unsigned char buf[1] = {0xee}; in TEST_F() local
255 ASSERT_EQ(size_t(1), mMBC->get("x", 1, buf, 1)); in TEST_F()
256 ASSERT_EQ('y', buf[0]); in TEST_F()