Testing serialization of tensor name and tensor slice in the ordered code format.
| 29 | // Testing serialization of tensor name and tensor slice in the ordered code |
| 30 | // format. |
| 31 | TEST(TensorShapeUtilTest, TensorNameSliceToOrderedCode) { |
| 32 | { |
| 33 | TensorSlice s = TensorSlice::ParseOrDie("-:-:1,3:4,5"); |
| 34 | string buffer = EncodeTensorNameSlice("foo", s); |
| 35 | string name; |
| 36 | s.Clear(); |
| 37 | TF_CHECK_OK(DecodeTensorNameSlice(buffer, &name, &s)); |
| 38 | EXPECT_EQ("foo", name); |
| 39 | EXPECT_EQ("-:-:1,3:4,5", s.DebugString()); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | } // namespace |
| 44 |
nothing calls this directly
no test coverage detected