mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
tests/gtest_DecimalFunctions: fix due to incorrect cast in wide_integer
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
f14645a94f
commit
4412f66709
@ -23,7 +23,7 @@ class DecimalUtilsSplitAndCombineTest : public ::testing::TestWithParam<DecimalU
|
||||
template <typename DecimalType>
|
||||
void testSplit(const DecimalUtilsSplitAndCombineTestParam & param)
|
||||
{
|
||||
const DecimalType decimal_value(static_cast<typename DecimalType::NativeType>(param.decimal_value));
|
||||
const DecimalType decimal_value(static_cast<typename DecimalType::NativeType>(param.decimal_value.value));
|
||||
const auto & actual_components = DecimalUtils::split(decimal_value, param.scale);
|
||||
|
||||
EXPECT_EQ(param.components.whole, actual_components.whole);
|
||||
@ -45,7 +45,7 @@ void testGetWhole(const DecimalUtilsSplitAndCombineTestParam & param)
|
||||
{
|
||||
EXPECT_EQ(param.components.whole,
|
||||
DecimalUtils::getWholePart(
|
||||
DecimalType{static_cast<typename DecimalType::NativeType>(param.decimal_value)},
|
||||
DecimalType{static_cast<typename DecimalType::NativeType>(param.decimal_value.value)},
|
||||
param.scale));
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ void testGetFractional(const DecimalUtilsSplitAndCombineTestParam & param)
|
||||
{
|
||||
EXPECT_EQ(param.components.fractional,
|
||||
DecimalUtils::getFractionalPart(
|
||||
DecimalType{static_cast<typename DecimalType::NativeType>(param.decimal_value)},
|
||||
DecimalType{static_cast<typename DecimalType::NativeType>(param.decimal_value.value)},
|
||||
param.scale));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user