mapleFU commented on PR #15124:
URL: https://github.com/apache/arrow/pull/15124#issuecomment-1369821218

   > Well, it would actually be simpler without adding a separate test 
method... and it would exercise the code more thoroughly as well.
   
   So how can I organize that code? I didn't make it clear. Is it like:
   
   ## case 1
   
   ```c++
   template <typename Type>
   class TestEncodingBase : public ::testing::Test {
    public:
   ...
    private:
      std::vector<int> small_read_batch_size_;
   };
   ```
   
   and 
   
   ```c++
   TYPED_TEST(TestDeltaBitPackEncoding, SmallBatchRoundTrip) {
     // .. set draws_ 1, 3
     ASSERT_NO_FATAL_FAILURE(this->Execute(1, 1));
     ASSERT_NO_FATAL_FAILURE(this->Execute(1, 2));
     ASSERT_NO_FATAL_FAILURE(this->Execute(2, 2));
     ASSERT_NO_FATAL_FAILURE(this->ExecuteSteps(10, 10));
     ASSERT_NO_FATAL_FAILURE(this->ExecuteSteps(10, 10));
     ASSERT_NO_FATAL_FAILURE(this->ExecuteSteps(1, 10));
   }
   ```
   
   Or 
   
   ## case 2
   
   ```c++
   template <typename Type>
   class TestDeltaBitPackEncoding : public TestEncodingBase<Type> {
    public:
     using c_type = typename Type::c_type;
     static constexpr int TYPE = Type::type_num;
     static constexpr size_t ROUND_TRIP_TIMES = 3;
   
     void InitReadBatchSizedData(...);
   };
   ```
   
   Can you help me make it clear? @pitrou 


-- 
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