| 30 | // No need for a full TfDriver. We just want to test the read/write methods. |
| 31 | TestDriver() : TfDriver({}, {}, {}, {}) {} |
| 32 | string WriteAndReadBack(tensorflow::DataType type, |
| 33 | const std::vector<int64_t>& shape, |
| 34 | const string& values) { |
| 35 | tensorflow::Tensor t = { |
| 36 | type, |
| 37 | tensorflow::TensorShape{tensorflow::gtl::ArraySlice<tensorflow::int64>{ |
| 38 | reinterpret_cast<const tensorflow::int64*>(shape.data()), |
| 39 | shape.size()}}}; |
| 40 | SetInput(values, &t); |
| 41 | return ReadOutput(t); |
| 42 | } |
| 43 | }; |
| 44 | |
| 45 | TEST(TfDriverTest, ReadingAndWrintingValues) { |