tensorflow/core/profiler/utils/parse_annotation_test.cc
// Make sure unmatched quotes don't die.
Make sure unmatched quotes don't die.
Make sure unmatched quotes don ' t die .
TEST(ParseAnnotationTest, UnmatchedQuotedMetadata) {
  Annotation annotation = ParseAnnotation("name#k1=v1,k2=(v2,k3=v3#");
  EXPECT_EQ(annotation.metadata.at(0).key, "k1");
  EXPECT_EQ(annotation.metadata.at(0).value, "v1");
  EXPECT_EQ(annotation.metadata.at(1).key, "k2");
  EXPECT_EQ(annotation.metadata.at(1).value, "(v2,k3=v3");
}
TEST ( ParseAnnotationTest , UnmatchedQuotedMetadata ) { Annotation annotation = ParseAnnotation ( " " ) ; EXPECT_EQ ( annotation . metadata . at ( 0 ) . key , " " ) ; EXPECT_EQ ( annotation . metadata . at ( 0 ) . value , " " ) ; EXPECT_EQ ( annotation . metadata . at ( 1 ) . key , " " ) ; EXPECT_EQ ( annotation . metadata . at ( 1 ) . value , " " ) ; }
Make sure unmatched quotes don't die.
Make sure unmatched quotes don ' t die .