Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable JSON tests #8843

Merged
merged 2 commits into from
Jul 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions cpp/tests/io/json_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ void check_float_column(cudf::column_view const& col,
struct JsonReaderTest : public cudf::test::BaseFixture {
};

/*
TEST_F(JsonReaderTest, BasicJsonLines)
{
std::string data = "[1, 1.1]\n[2, 2.2]\n[3, 3.3]\n";
Expand Down Expand Up @@ -615,10 +614,11 @@ TEST_F(JsonReaderTest, JsonLinesObjectsOutOfOrder)
CUDF_TEST_EXPECT_COLUMNS_EQUAL(result.tbl->get_column(2),
cudf::test::strings_column_wrapper({"aaa", "bbb"}));
}
*/

/*
// currently, the json reader is strict about having non-empty input.
TEST_F(JsonReaderTest, EmptyFile) {
TEST_F(JsonReaderTest, EmptyFile)
{
auto filepath = temp_env->get_temp_dir() + "EmptyFile.csv";
{
std::ofstream outfile{filepath, std::ofstream::out};
Expand All @@ -634,7 +634,8 @@ TEST_F(JsonReaderTest, EmptyFile) {
}

// currently, the json reader is strict about having non-empty input.
TEST_F(JsonReaderTest, NoDataFile) {
TEST_F(JsonReaderTest, NoDataFile)
{
auto filepath = temp_env->get_temp_dir() + "NoDataFile.csv";
{
std::ofstream outfile{filepath, std::ofstream::out};
Expand All @@ -649,7 +650,7 @@ TEST_F(JsonReaderTest, NoDataFile) {
EXPECT_EQ(0, view.num_columns());
}
*/
/*

TEST_F(JsonReaderTest, ArrowFileSource)
{
const std::string fname = temp_env->get_temp_dir() + "ArrowFileSource.csv";
Expand Down Expand Up @@ -698,7 +699,8 @@ TEST_F(JsonReaderTest, InvalidFloatingPoint)

const auto col_data = cudf::test::to_host<float>(result.tbl->view().column(0));
// col_data.first contains the column data
for (const auto& elem : col_data.first) ASSERT_TRUE(std::isnan(elem));
for (const auto& elem : col_data.first)
ASSERT_TRUE(std::isnan(elem));
// col_data.second contains the bitmasks
ASSERT_EQ(0u, col_data.second[0]);
}
Expand Down Expand Up @@ -861,7 +863,7 @@ TEST_F(JsonReaderTest, ParseOutOfRangeIntegers)
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(input_less_int64_min_append, view.column(8));
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(input_mixed_range_append, view.column(9));
}
*/

TEST_F(JsonReaderTest, JsonLinesMultipleFileInputs)
{
const std::string file1 = temp_env->get_temp_dir() + "JsonLinesFileTest1.json";
Expand Down