Writes the passed vector to file and reads it back, returns the read vector.
| 131 | // Writes the passed vector to file and reads it back, returns the read |
| 132 | // vector. |
| 133 | VectorPtr takeRoundTrip(const VectorPtr& vector) { |
| 134 | auto path = exec::test::TempFilePath::create(); |
| 135 | |
| 136 | std::ofstream outputFile(path->path, std::ofstream::binary); |
| 137 | saveVector(*vector, outputFile); |
| 138 | outputFile.close(); |
| 139 | |
| 140 | std::ifstream inputFile(path->path, std::ifstream::binary); |
| 141 | auto copy = restoreVector(inputFile, pool()); |
| 142 | inputFile.close(); |
| 143 | return copy; |
| 144 | } |
| 145 | |
| 146 | void testRoundTrip(const VectorPtr& vector) { |
| 147 | auto copy = takeRoundTrip(vector); |
nothing calls this directly
no test coverage detected