| 94 | } |
| 95 | |
| 96 | void ExpectOutputValue(int idx, int expected_value) { |
| 97 | TF_Tensor* out = csession_->output_tensor(idx); |
| 98 | ASSERT_TRUE(out != nullptr); |
| 99 | EXPECT_EQ(TF_INT32, TF_TensorType(out)); |
| 100 | EXPECT_EQ(0, TF_NumDims(out)); |
| 101 | ASSERT_EQ(sizeof(int32_t), TF_TensorByteSize(out)); |
| 102 | int32_t* data = static_cast<int32_t*>(TF_TensorData(out)); |
| 103 | EXPECT_EQ(expected_value, *data); |
| 104 | } |
| 105 | |
| 106 | // Create a valid conditional graph. Useful for testing unrelated errors. |
| 107 | void CreateCondGraph() { |
nothing calls this directly
no test coverage detected