| 47 | } |
| 48 | |
| 49 | TEST(ValidateConfig, Good) { |
| 50 | tf2xla::Config config; |
| 51 | tf2xla::Feed* feed = config.add_feed(); |
| 52 | feed->mutable_id()->set_node_name("foo"); |
| 53 | feed->mutable_id()->set_output_index(123); |
| 54 | feed->set_name("foo_debug"); |
| 55 | feed = config.add_feed(); |
| 56 | feed->mutable_id()->set_node_name("bar"); |
| 57 | feed->mutable_id()->set_output_index(0); |
| 58 | tf2xla::Fetch* fetch = config.add_fetch(); |
| 59 | fetch->mutable_id()->set_node_name("baz"); |
| 60 | fetch->mutable_id()->set_output_index(456); |
| 61 | fetch->set_name("baz_debug"); |
| 62 | fetch = config.add_fetch(); |
| 63 | fetch->mutable_id()->set_node_name("banana"); |
| 64 | fetch->mutable_id()->set_output_index(0); |
| 65 | TF_EXPECT_OK(ValidateConfig(config)); |
| 66 | } |
| 67 | |
| 68 | TEST(ValidateConfig, BadEmpty) { |
| 69 | tf2xla::Config config; |
nothing calls this directly
no test coverage detected