diff --git a/cpp/src/arrow/testing/generator.h b/cpp/src/arrow/testing/generator.h index 6326b416bf925..53a207c473b7a 100644 --- a/cpp/src/arrow/testing/generator.h +++ b/cpp/src/arrow/testing/generator.h @@ -306,7 +306,7 @@ ARROW_TESTING_EXPORT std::shared_ptr Constant( /// make a generator that returns an incrementing value /// /// Note: overflow is not prevented standard unsigned integer overflow applies -template +template ARROW_TESTING_EXPORT std::shared_ptr Step(T start = 0, T step = 1) { class StepGenerator : public ArrayGenerator { public: diff --git a/cpp/src/arrow/testing/generator_test.cc b/cpp/src/arrow/testing/generator_test.cc index 3b788ce9e6351..1a2292c2fa640 100644 --- a/cpp/src/arrow/testing/generator_test.cc +++ b/cpp/src/arrow/testing/generator_test.cc @@ -40,7 +40,7 @@ TEST(StepTest, Default) { for (auto length : {0, 1, 1024}) { ARROW_SCOPED_TRACE("length=" + std::to_string(length)); ASSERT_OK_AND_ASSIGN(auto array, Step()->Generate(length)); - CheckStep(*array, 0, 1, length); + CheckStep(*array, 0u, 1u, length); } }