MCPcopy Create free account
hub / github.com/apache/impala / VerifyFuzzyEquals

Function VerifyFuzzyEquals

be/src/runtime/decimal-test.cc:799–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797
798template<typename T>
799void VerifyFuzzyEquals(const T& actual, const ColumnType& t,
800 double expected, bool overflow, double max_error = MAX_ERROR) {
801 double actual_d = actual.ToDouble(t.scale);
802 EXPECT_FALSE(overflow);
803 EXPECT_TRUE(fabs(actual_d - expected) < max_error)
804 << actual_d << " != " << expected;
805}
806
807TEST(DecimalTest, BasicArithmetic) {
808 ColumnType t1 = ColumnType::CreateDecimalType(5, 4);

Callers 1

TESTFunction · 0.85

Calls 1

ToDoubleMethod · 0.45

Tested by

no test coverage detected