libcudf  24.04.00
table_utilities.hpp
1 /*
2  * Copyright (c) 2019-2022, 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 
22 namespace cudf::test::detail {
32 void expect_table_properties_equal(cudf::table_view lhs, cudf::table_view rhs);
33 
44 void expect_tables_equal(cudf::table_view lhs, cudf::table_view rhs);
45 
58 void expect_tables_equivalent(cudf::table_view lhs, cudf::table_view rhs);
59 
60 } // namespace cudf::test::detail
61 
62 // Macros for showing line of failure.
63 #define CUDF_TEST_EXPECT_TABLE_PROPERTIES_EQUAL(lhs, rhs) \
64  do { \
65  SCOPED_TRACE(" <-- line of failure\n"); \
66  cudf::test::detail::expect_table_properties_equal(lhs, rhs); \
67  } while (0)
68 
69 #define CUDF_TEST_EXPECT_TABLES_EQUAL(lhs, rhs) \
70  do { \
71  SCOPED_TRACE(" <-- line of failure\n"); \
72  cudf::test::detail::expect_tables_equal(lhs, rhs); \
73  } while (0)
74 
75 #define CUDF_TEST_EXPECT_TABLES_EQUIVALENT(lhs, rhs) \
76  do { \
77  SCOPED_TRACE(" <-- line of failure\n"); \
78  cudf::test::detail::expect_tables_equivalent(lhs, rhs); \
79  } while (0)
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:187
Class definitions for (mutable)_table_view
Type declarations for libcudf.