caffe2/core/nomnigraph/tests/subgraph_matcher_test.cc
// Simple test cases for node matching criteria.
Simple test cases for node matching criteria.
Simple test cases for node matching criteria .
TEST(SubgraphMatcher, IsNodeMatch) {
  TestGraph graph;
  auto n1 = graph.createNode("Hello");
  auto n2 = graph.createNode("Le");
  graph.createEdge(n1, n2);
  EXPECT_TRUE(TestMatcher::isNodeMatch(n1, "Hello"));
  EXPECT_FALSE(TestMatcher::isNodeMatch(n1, "G"));
  EXPECT_TRUE(TestMatcher::isNodeMatch(n2, "Le"));
  EXPECT_FALSE(TestMatcher::isNodeMatch(n2, "le"));
}
TEST ( SubgraphMatcher , IsNodeMatch ) { TestGraph graph ; auto n1 = graph . createNode ( " " ) ; auto n2 = graph . createNode ( " " ) ; graph . createEdge ( n1 , n2 ) ; EXPECT_TRUE ( TestMatcher :: isNodeMatch ( n1 , " " ) ) ; EXPECT_FALSE ( TestMatcher :: isNodeMatch ( n1 , " " ) ) ; EXPECT_TRUE ( TestMatcher :: isNodeMatch ( n2 , " " ) ) ; EXPECT_FALSE ( TestMatcher :: isNodeMatch ( n2 , " " ) ) ; }
Simple test cases for node matching criteria.
Simple test cases for node matching criteria .