MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TestConsumeNonWhitespace

Function TestConsumeNonWhitespace

tensorflow/core/platform/str_util_test.cc:182–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182void TestConsumeNonWhitespace(StringPiece s, StringPiece expected,
183 StringPiece remaining) {
184 StringPiece v;
185 StringPiece input(s);
186 if (str_util::ConsumeNonWhitespace(&input, &v)) {
187 EXPECT_EQ(v, expected);
188 EXPECT_EQ(input, remaining);
189 } else {
190 EXPECT_EQ(expected, "");
191 EXPECT_EQ(input, remaining);
192 }
193}
194
195TEST(ConsumeNonWhitespace, Basic) {
196 TestConsumeNonWhitespace("", "", "");

Callers 1

TESTFunction · 0.85

Calls 1

ConsumeNonWhitespaceFunction · 0.85

Tested by

no test coverage detected