| 33 | } |
| 34 | |
| 35 | bool 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. |
| 48 | TEST(SemverTest, VersionStringFollowsSemver) { |
no test coverage detected