| 231 | }; |
| 232 | |
| 233 | TEST_F(TestStreamReader, DefaultConstructed) { |
| 234 | StreamReader os; |
| 235 | int i; |
| 236 | std::string s; |
| 237 | |
| 238 | // N.B. Default constructor objects are not usable. |
| 239 | EXPECT_THROW(os >> i, ParquetException); |
| 240 | EXPECT_THROW(os >> s, ParquetException); |
| 241 | EXPECT_THROW(os >> EndRow, ParquetException); |
| 242 | |
| 243 | EXPECT_EQ(true, os.eof()); |
| 244 | EXPECT_EQ(0, os.current_column()); |
| 245 | EXPECT_EQ(0, os.current_row()); |
| 246 | |
| 247 | EXPECT_EQ(0, os.num_columns()); |
| 248 | EXPECT_EQ(0, os.num_rows()); |
| 249 | |
| 250 | // Skipping columns and rows is allowed. |
| 251 | // |
| 252 | EXPECT_EQ(0, os.SkipColumns(100)); |
| 253 | EXPECT_EQ(0, os.SkipRows(100)); |
| 254 | } |
| 255 | |
| 256 | TEST(StreamReaderEmptySchema, ThrowsOnConstruction) { |
| 257 | PARQUET_ASSIGN_OR_THROW(auto buffer_os, ::arrow::io::BufferOutputStream::Create()); |
nothing calls this directly
no test coverage detected