table_utilities.hpp
1 /*
2  * Copyright (c) 2019-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
20 #include <cudf/types.hpp>
21 #include <cudf/utilities/export.hpp>
22 
23 namespace CUDF_EXPORT cudf {
24 namespace test::detail {
34 void expect_table_properties_equal(cudf::table_view lhs, cudf::table_view rhs);
35 
46 void expect_tables_equal(cudf::table_view lhs, cudf::table_view rhs);
47 
60 void expect_tables_equivalent(cudf::table_view lhs, cudf::table_view rhs);
61 
62 } // namespace test::detail
63 } // namespace CUDF_EXPORT cudf
64 
65 // Macros for showing line of failure.
66 #define CUDF_TEST_EXPECT_TABLE_PROPERTIES_EQUAL(lhs, rhs) \
67  do { \
68  SCOPED_TRACE(" <-- line of failure\n"); \
69  cudf::test::detail::expect_table_properties_equal(lhs, rhs); \
70  } while (0)
71 
72 #define CUDF_TEST_EXPECT_TABLES_EQUAL(lhs, rhs) \
73  do { \
74  SCOPED_TRACE(" <-- line of failure\n"); \
75  cudf::test::detail::expect_tables_equal(lhs, rhs); \
76  } while (0)
77 
78 #define CUDF_TEST_EXPECT_TABLES_EQUIVALENT(lhs, rhs) \
79  do { \
80  SCOPED_TRACE(" <-- line of failure\n"); \
81  cudf::test::detail::expect_tables_equivalent(lhs, rhs); \
82  } while (0)
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:200
cuDF interfaces
Definition: host_udf.hpp:39
Class definitions for (mutable)_table_view
Type declarations for libcudf.