Skip to content

Commit 5cbc75d

Browse files
committed
Add test tracing
1 parent 342a945 commit 5cbc75d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ class TestUnaryArithmetic : public TestBaseUnaryArithmetic<T, ArithmeticOptions>
241241
protected:
242242
using Base = TestBaseUnaryArithmetic<T, ArithmeticOptions>;
243243
using Base::options_;
244-
void SetOverflowCheck(bool value) { options_.check_overflow = value; }
244+
void SetOverflowCheck(bool value) {
245+
ARROW_SCOPED_TRACE("check_overflow = ", value);
246+
options_.check_overflow = value;
247+
}
245248
};
246249

247250
template <typename T>
@@ -421,7 +424,10 @@ class TestBinaryArithmetic : public TestBaseArithmetic<T> {
421424
AssertArraysApproxEqual(*expected, *actual, /*verbose=*/true, equal_options_);
422425
}
423426

424-
void SetOverflowCheck(bool value = true) { options_.check_overflow = value; }
427+
void SetOverflowCheck(bool value) {
428+
ARROW_SCOPED_TRACE("check_overflow = ", value);
429+
options_.check_overflow = value;
430+
}
425431

426432
void SetNansEqual(bool value = true) {
427433
this->equal_options_ = equal_options_.nans_equal(value);

cpp/src/arrow/util/int_util_overflow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ template <typename Int>
122122
template <typename Int>
123123
[[nodiscard]] bool DivideWithOverflowGeneric(Int u, Int v, Int* out) {
124124
if (v == 0) {
125+
*out = Int{};
125126
return true;
126127
}
127128
if constexpr (sizeof(Int) < 4) {

0 commit comments

Comments
 (0)