Skip to content

Commit

Permalink
Modify tests to use the updated scalar factory correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
magnatelee committed Feb 27, 2021
1 parent be1d3b8 commit 94073c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/tests/scalar/factories_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TYPED_TEST(TimestampScalarFactory, TypeCast)
}

template <typename T>
struct DefaultScalarFactory : public cudf::test::BaseFixture {
struct DefaultScalarFactory : public ScalarFactoryTest {
static constexpr auto factory = cudf::make_default_constructed_scalar;
};

Expand All @@ -98,15 +98,17 @@ TYPED_TEST_CASE(DefaultScalarFactory, MixedTypes);

TYPED_TEST(DefaultScalarFactory, FactoryDefault)
{
std::unique_ptr<cudf::scalar> s = this->factory(cudf::data_type{cudf::type_to_id<TypeParam>()});
std::unique_ptr<cudf::scalar> s =
this->factory(cudf::data_type{cudf::type_to_id<TypeParam>()}, this->stream(), this->mr());

EXPECT_EQ(s->type(), cudf::data_type{cudf::type_to_id<TypeParam>()});
EXPECT_FALSE(s->is_valid());
}

TYPED_TEST(DefaultScalarFactory, TypeCast)
{
std::unique_ptr<cudf::scalar> s = this->factory(cudf::data_type{cudf::type_to_id<TypeParam>()});
std::unique_ptr<cudf::scalar> s =
this->factory(cudf::data_type{cudf::type_to_id<TypeParam>()}, this->stream(), this->mr());

auto numeric_s = static_cast<cudf::scalar_type_t<TypeParam>*>(s.get());

Expand Down

0 comments on commit 94073c6

Please sign in to comment.