From 740d3543a716bbaaedfeb88b7364e5ffa70a4916 Mon Sep 17 00:00:00 2001 From: David Wendt <45795991+davidwendt@users.noreply.github.com> Date: Thu, 5 Aug 2021 22:28:06 -0400 Subject: [PATCH] Fix debug compile error for csv_test.cpp (#8981) Found an compile error in `csv_test.cpp` that only occurs with a debug build since it exists in an `assert()` statement. Looks like this was introduced in PR #8856 Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Vukasin Milovanovic (https://github.com/vuule) - Mike Wilson (https://github.com/hyperbolic2346) URL: https://github.com/rapidsai/cudf/pull/8981 --- cpp/tests/io/csv_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/tests/io/csv_test.cpp b/cpp/tests/io/csv_test.cpp index 43d9bd7b514..53e0ab14fd3 100644 --- a/cpp/tests/io/csv_test.cpp +++ b/cpp/tests/io/csv_test.cpp @@ -415,7 +415,7 @@ TYPED_TEST(CsvFixedPointWriterTest, SingleColumnNegativeScale) result_strings.reserve(reference_strings.size()); std::ifstream read_result_file(filepath); - assert(read_result_file.is_open()); + ASSERT_TRUE(read_result_file.is_open()); std::copy(std::istream_iterator(read_result_file), std::istream_iterator(), @@ -461,7 +461,7 @@ TYPED_TEST(CsvFixedPointWriterTest, SingleColumnPositiveScale) result_strings.reserve(reference_strings.size()); std::ifstream read_result_file(filepath); - assert(read_result_file.is_open()); + ASSERT_TRUE(read_result_file.is_open()); std::copy(std::istream_iterator(read_result_file), std::istream_iterator(), @@ -2175,9 +2175,9 @@ TEST_F(CsvReaderTest, DtypesMap) auto result = cudf_io::read_csv(in_opts); const auto result_table = result.tbl->view(); - assert(result_table->num_columns() == 2); - assert(result_table.column(0).type() == data_type{type_id::INT32}); - assert(result_table.column(1).type() == data_type{type_id::INT16}); + ASSERT_EQ(result_table.num_columns(), 2); + ASSERT_EQ(result_table.column(0).type(), data_type{type_id::INT32}); + ASSERT_EQ(result_table.column(1).type(), data_type{type_id::INT16}); expect_column_data_equal(std::vector{12, 34, 56}, result_table.column(0)); expect_column_data_equal(std::vector{9, 8, 7}, result_table.column(1)); }