| 51 | using ::arrow::internal::TemporaryDir; |
| 52 | |
| 53 | static std::string GenerateRandomData(size_t nbytes) { |
| 54 | // MSVC doesn't accept uint8_t for std::independent_bits_engine<> |
| 55 | typedef unsigned long UInt; // NOLINT |
| 56 | std::independent_bits_engine<std::default_random_engine, 8 * sizeof(UInt), UInt> engine; |
| 57 | |
| 58 | std::vector<UInt> data(nbytes / sizeof(UInt) + 1); |
| 59 | std::generate(begin(data), end(data), std::ref(engine)); |
| 60 | return std::string(reinterpret_cast<char*>(data.data()), nbytes); |
| 61 | } |
| 62 | |
| 63 | template <typename FileType> |
| 64 | class FileTestFixture : public ::testing::Test { |