• Home
  • Raw
  • Download

Lines Matching refs:sb

23   SimpleStringBuilder sb(sb_buf);  in TEST()  local
24 EXPECT_EQ(0u, strlen(sb.str())); in TEST()
28 sb << "012345678"; // 9 characters + '\0'. in TEST()
29 EXPECT_EQ(0, strcmp(sb.str(), "012345678")); in TEST()
34 SimpleStringBuilder sb(sb_buf); in TEST() local
35 sb << 1 << ':' << 2.1 << ":" << 2.2f << ':' << 78187493520ll << ':' in TEST()
37 EXPECT_EQ(0, strcmp(sb.str(), "1:2.1:2.2:78187493520:78187493520")); in TEST()
42 SimpleStringBuilder sb(sb_buf); in TEST() local
43 sb << "Here we go - "; in TEST()
44 sb.AppendFormat("This is a hex formatted value: 0x%08llx", 3735928559ULL); in TEST()
46 strcmp(sb.str(), in TEST()
52 SimpleStringBuilder sb(sb_buf); in TEST() local
54 sb << str; in TEST()
55 EXPECT_EQ(str, sb.str()); in TEST()
64 SimpleStringBuilder sb(sb_buf); in TEST() local
67 EXPECT_DEATH(sb << msg, ""); in TEST()
69 sb << msg; in TEST()
70 EXPECT_THAT(sb.str(), ::testing::StrEq("Thi")); in TEST()
76 SimpleStringBuilder sb(sb_buf); in TEST() local
77 sb << 12; in TEST()
80 EXPECT_DEATH(sb << msg, ""); in TEST()
82 sb << msg; in TEST()
83 EXPECT_THAT(sb.str(), ::testing::StrEq("12A")); in TEST()
89 SimpleStringBuilder sb(sb_buf); in TEST() local
92 EXPECT_DEATH(sb << num, ""); in TEST()
94 sb << num; in TEST()
98 EXPECT_THAT(sb.str(), in TEST()
105 SimpleStringBuilder sb(sb_buf); in TEST() local
108 EXPECT_DEATH(sb << num, ""); in TEST()
110 sb << num; in TEST()
111 EXPECT_THAT(sb.str(), in TEST()
118 SimpleStringBuilder sb(sb_buf); in TEST() local
119 sb << 123; in TEST()
122 EXPECT_DEATH(sb << msg, ""); in TEST()
124 sb << msg; in TEST()
125 EXPECT_THAT(sb.str(), ::testing::StrEq("123")); in TEST()
131 SimpleStringBuilder sb(sb_buf); in TEST() local
132 sb << "xyz"; in TEST()
135 EXPECT_DEATH(sb << num, ""); in TEST()
137 sb << num; in TEST()
138 EXPECT_THAT(sb.str(), ::testing::StrEq("xyz")); in TEST()
148 StringBuilder sb; in TEST() local
149 EXPECT_EQ(0u, sb.str().size()); in TEST()
151 sb << "012345678"; in TEST()
152 EXPECT_EQ(sb.str(), "012345678"); in TEST()
156 StringBuilder sb; in TEST() local
157 sb << 1 << ":" << 2.1 << ":" << 2.2f << ":" << 78187493520ll << ":" in TEST()
159 EXPECT_THAT(sb.str(), in TEST()
164 StringBuilder sb; in TEST() local
165 sb << "Here we go - "; in TEST()
166 sb.AppendFormat("This is a hex formatted value: 0x%08llx", 3735928559ULL); in TEST()
167 EXPECT_EQ(sb.str(), "Here we go - This is a hex formatted value: 0xdeadbeef"); in TEST()
171 StringBuilder sb; in TEST() local
173 sb << str; in TEST()
174 EXPECT_EQ(str, sb.str()); in TEST()
178 StringBuilder sb; in TEST() local
183 sb << str; in TEST()
184 EXPECT_EQ(str, sb.str()); in TEST()
185 const char* original_buffer = sb.str().c_str(); in TEST()
186 std::string moved = sb.Release(); in TEST()
187 EXPECT_TRUE(sb.str().empty()); in TEST()
193 StringBuilder sb("abc"); in TEST() local
194 sb << "def"; in TEST()
195 EXPECT_EQ("abcdef", sb.str()); in TEST()
196 sb.Clear(); in TEST()
197 EXPECT_TRUE(sb.str().empty()); in TEST()
198 sb << 123 << "!"; in TEST()
199 EXPECT_EQ("123!", sb.str()); in TEST()