| 25 | |
| 26 | template <typename T> |
| 27 | void ExpectNodeEqual(const Node* n, gtl::ArraySlice<T> values, |
| 28 | TensorShape shape) { |
| 29 | EXPECT_TRUE(n->IsConstant()); |
| 30 | Tensor tensor; |
| 31 | TF_EXPECT_OK(GetNodeAttr(n->attrs(), "value", &tensor)); |
| 32 | DataType dtype; |
| 33 | TF_EXPECT_OK(GetNodeAttr(n->attrs(), "dtype", &dtype)); |
| 34 | EXPECT_EQ(tensor.dtype(), dtype); |
| 35 | test::ExpectTensorEqual<T>(tensor, test::AsTensor(values, shape)); |
| 36 | } |
| 37 | |
| 38 | void ExpectTypeAndShape(const Node* n, DataType expected_dtype, |
| 39 | TensorShape expected_shape) { |
nothing calls this directly
no test coverage detected