| 29 | class DebugStripperTest : public GrapplerTest {}; |
| 30 | |
| 31 | TEST_F(DebugStripperTest, OutputEqualToInput) { |
| 32 | tensorflow::Scope s = tensorflow::Scope::NewRootScope(); |
| 33 | Output x = ops::Placeholder(s, DT_FLOAT, ops::Placeholder::Shape({})); |
| 34 | Output y = ops::Placeholder(s, DT_FLOAT, ops::Placeholder::Shape({})); |
| 35 | Output add = ops::Add(s, x, y); |
| 36 | Output result = ops::Identity(s, add); |
| 37 | GrapplerItem item; |
| 38 | TF_CHECK_OK(s.ToGraphDef(&item.graph)); |
| 39 | |
| 40 | DebugStripper optimizer; |
| 41 | GraphDef output; |
| 42 | EXPECT_EQ(optimizer.Optimize(nullptr, item, &output), |
| 43 | errors::Aborted("Nothing to do.")); |
| 44 | } |
| 45 | |
| 46 | TEST_F(DebugStripperTest, StripAssertOnTwoOutputs) { |
| 47 | tensorflow::Scope s = tensorflow::Scope::NewRootScope(); |
nothing calls this directly
no test coverage detected