Skip to content

Commit e4bdfdd

Browse files
committed
Fix test with incorrect rounding
1 parent d334e87 commit e4bdfdd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/test_decimal32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ void test_addition()
218218
BOOST_TEST_EQ(small_num + big_num, big_num);
219219

220220
// Case 2: Round the last digit of the significand
221-
constexpr decimal32 full_length_num {1000000, 1};
222-
constexpr decimal32 rounded_full_length_num(1000001, 1);
221+
constexpr decimal32 full_length_num {1000000, 0};
222+
constexpr decimal32 rounded_full_length_num {1000001, 0};
223223
constexpr decimal32 no_round(1, -1);
224224
constexpr decimal32 round(9, -1);
225225
BOOST_TEST_EQ(full_length_num + no_round, full_length_num);

test/test_decimal32_fast_basis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ void test_addition()
176176
BOOST_TEST_EQ(small_num + big_num, big_num);
177177

178178
// Case 2: Round the last digit of the significand
179-
constexpr decimal32_fast full_length_num {1000000, 1};
180-
constexpr decimal32_fast rounded_full_length_num(1000001, 1);
179+
constexpr decimal32_fast full_length_num {1000000, 0};
180+
constexpr decimal32_fast rounded_full_length_num(1000001, 0);
181181
constexpr decimal32_fast no_round(1, -1);
182182
constexpr decimal32_fast round(9, -1);
183183
BOOST_TEST_EQ(full_length_num + no_round, full_length_num);

0 commit comments

Comments
 (0)