alexdesiqueira commented on PR #13144:
URL: https://github.com/apache/arrow/pull/13144#issuecomment-1163802255

   I'm back @pitrou :slightly_smiling_face: 
   For these tests, I'm trying to emulate 
[cpp/src/arrow/io/memory_test.cc:320](https://github.com/apache/arrow/blob/8daa7a4ed5629c0020dadf7325a6b523bdfc62e9/cpp/src/arrow/io/memory_test.cc#L320):
   
   ```c++
   // Read to end of each stream
     ASSERT_OK_AND_EQ(2, stream1->Read(4, buf3));
     ASSERT_EQ(0, std::memcmp(buf3, "a2", 2));
     ASSERT_OK_AND_EQ(10, stream1->Tell());
   
     ASSERT_OK_AND_EQ(0, stream1->Read(1, buf3));
     ASSERT_OK_AND_EQ(10, stream1->Tell());
   
     // stream2 had its extent limited
     ASSERT_OK_AND_ASSIGN(buf2, stream2->Read(20));
     ASSERT_TRUE(SliceBuffer(buf, 13, 12)->Equals(*buf2));
   
     ASSERT_OK_AND_ASSIGN(buf2, stream2->Read(1));
     ASSERT_EQ(0, buf2->size());
     ASSERT_OK_AND_EQ(16, stream2->Tell());
   
     ASSERT_OK(stream1->Close());
   
     // idempotent
     ASSERT_OK(stream1->Close());
     ASSERT_TRUE(stream1->closed());
   
     // Check whether closed
     ASSERT_RAISES(IOError, stream1->Tell());
     ASSERT_RAISES(IOError, stream1->Read(1));
     ASSERT_RAISES(IOError, stream1->Read(1, buf3));
   ```
   What do you think on what we have so far? I'm kinda lost on the ones we have 
missing. Any ideas I could use?
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to