| 27 | class GrapplerTestTest : public GrapplerTest {}; |
| 28 | |
| 29 | TEST_F(GrapplerTestTest, CompareIdenticalGraphs) { |
| 30 | tensorflow::Scope s1 = tensorflow::Scope::NewRootScope(); |
| 31 | auto s1_a = ops::Variable(s1.WithOpName("a"), {2, 2}, DT_FLOAT); |
| 32 | auto s1_b = ops::Variable(s1.WithOpName("b"), {2, 2}, DT_FLOAT); |
| 33 | auto s1_add = ops::Add(s1.WithOpName("Add_1"), s1_a, s1_b); |
| 34 | |
| 35 | tensorflow::Scope s2 = tensorflow::Scope::NewRootScope(); |
| 36 | auto s2_a = ops::Variable(s2.WithOpName("a"), {2, 2}, DT_FLOAT); |
| 37 | auto s2_b = ops::Variable(s2.WithOpName("b"), {2, 2}, DT_FLOAT); |
| 38 | auto s2_add = ops::Add(s2.WithOpName("Add_1"), s2_a, s2_b); |
| 39 | |
| 40 | GraphDef graph1; |
| 41 | TF_ASSERT_OK(s1.ToGraphDef(&graph1)); |
| 42 | |
| 43 | GraphDef graph2; |
| 44 | TF_ASSERT_OK(s2.ToGraphDef(&graph2)); |
| 45 | |
| 46 | CompareGraphs(graph1, graph2); |
| 47 | } |
| 48 | |
| 49 | TEST_F(GrapplerTestTest, CheckNodesConnectivity) { |
| 50 | tensorflow::Scope s = tensorflow::Scope::NewRootScope(); |
nothing calls this directly
no test coverage detected