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

Function ConsumeDotSeparatedIdentifiers

tensorflow/core/util/semver_test.cc:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35bool ConsumeDotSeparatedIdentifiers(StringPiece* s, const string& prefix,
36 StringPiece* val) {
37 if (!absl::ConsumePrefix(s, prefix)) return false;
38 size_t i;
39 for (i = 0; i < s->size() && IsDotOrIdentifierChar((*s)[i]); ++i) {
40 // Intentionally empty
41 }
42 *val = StringPiece(s->data(), i);
43 s->remove_prefix(i);
44 return i > 0;
45}
46
47// Test that TF_VERSION_STRING follows semantic versioning.
48TEST(SemverTest, VersionStringFollowsSemver) {

Callers 1

TESTFunction · 0.85

Calls 4

IsDotOrIdentifierCharFunction · 0.85
ConsumePrefixFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected