aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/subgraph_test.cc
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2016-04-20 05:09:08 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-04-20 06:12:24 -0700
commit855dc5f5c1fe9caa0901141aae1a0c1de1de9414 (patch)
tree8c1822363fec3014d3ec648b7af01ea3b172e854 /tensorflow/core/graph/subgraph_test.cc
parent301b762ca0f94cc4f8ad53a1326416f128b65b37 (diff)
Remove the ability to run the entire graph by passing an empty target list.
This was only used in testing, and when used in the wild could lead to confusing behavior (by running all of the nodes in the graph and performing all of their side effects) such as placeholder-not-fed errors or deadlocks. Change: 120329908
Diffstat (limited to 'tensorflow/core/graph/subgraph_test.cc')
-rw-r--r--tensorflow/core/graph/subgraph_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/core/graph/subgraph_test.cc b/tensorflow/core/graph/subgraph_test.cc
index a4fe0e9172..48ede49cfb 100644
--- a/tensorflow/core/graph/subgraph_test.cc
+++ b/tensorflow/core/graph/subgraph_test.cc
@@ -266,11 +266,13 @@ TEST_F(SubgraphTest, Errors) {
EXPECT_TRUE(
HasSubstr(Subgraph("c:0", "b:0,c:0", ""), "both fed and fetched"));
// Feed not found.
- EXPECT_TRUE(HasSubstr(Subgraph("foo:0", "", ""), "unable to find"));
+ EXPECT_TRUE(HasSubstr(Subgraph("foo:0", "c:0", ""), "unable to find"));
// Fetch not found.
EXPECT_TRUE(HasSubstr(Subgraph("", "foo:0", ""), "not found"));
// Target not found.
EXPECT_TRUE(HasSubstr(Subgraph("", "", "foo"), "not found"));
+ // No targets specified.
+ EXPECT_TRUE(HasSubstr(Subgraph("", "", ""), "at least one target"));
}
REGISTER_OP("In").Output("o: float");