| 44 | using test::internal::ExpectEqual; |
| 45 | |
| 46 | TEST(GraphRunnerTest, SingleConst) { |
| 47 | Scope root = Scope::NewRootScope(); |
| 48 | auto c = ops::Const(root, 42.0f); |
| 49 | GraphRunner graph_runner(Env::Default()); |
| 50 | std::vector<Tensor> outputs; |
| 51 | Status s = graph_runner.Run(root.graph(), nullptr, {}, {c.name()}, &outputs); |
| 52 | TF_ASSERT_OK(s); |
| 53 | ExpectEqual(42.0f, outputs[0].scalar<float>()()); |
| 54 | } |
| 55 | |
| 56 | // If not using DeepCopy, and the allocator is deleted with the cpu-device, |
| 57 | // this test will seg-fault. |
nothing calls this directly
no test coverage detected