File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,9 @@ if(ARROW_TESTING)
284284 ArrowTesting::arrow_testing_static)
285285 endif ()
286286 list (APPEND ARROW_FLIGHT_TESTING_SHARED_LINK_LIBS ${ARROW_FLIGHT_TEST_INTERFACE_LIBS} )
287+ list (APPEND ARROW_FLIGHT_TESTING_SHARED_LINK_LIBS ${ARROW_GTEST_GMOCK} )
287288 list (APPEND ARROW_FLIGHT_TESTING_STATIC_LINK_LIBS ${ARROW_FLIGHT_TEST_INTERFACE_LIBS} )
289+ list (APPEND ARROW_FLIGHT_TESTING_STATIC_LINK_LIBS ${ARROW_GTEST_GMOCK} )
288290 add_arrow_lib(arrow_flight_testing
289291 CMAKE_PACKAGE_NAME
290292 ArrowFlightTesting
Original file line number Diff line number Diff line change 2525// We need Windows fixes before including Boost
2626#include " arrow/util/windows_compatibility.h"
2727
28+ #include < gmock/gmock.h>
2829#include < gtest/gtest.h>
2930
3031#include " arrow/array.h"
@@ -105,6 +106,20 @@ arrow::Result<FlightPayload> NumberingStream::Next() {
105106 return payload;
106107}
107108
109+ void AssertEqual (const FlightInfo& expected, const FlightInfo& actual) {
110+ ipc::DictionaryMemo expected_memo;
111+ ipc::DictionaryMemo actual_memo;
112+ ASSERT_OK_AND_ASSIGN (auto ex_schema, expected.GetSchema (&expected_memo));
113+ ASSERT_OK_AND_ASSIGN (auto actual_schema, actual.GetSchema (&actual_memo));
114+
115+ AssertSchemaEqual (*ex_schema, *actual_schema);
116+ ASSERT_EQ (expected.total_records (), actual.total_records ());
117+ ASSERT_EQ (expected.total_bytes (), actual.total_bytes ());
118+
119+ ASSERT_EQ (expected.descriptor (), actual.descriptor ());
120+ ASSERT_THAT (actual.endpoints (), ::testing::ContainerEq (expected.endpoints ()));
121+ }
122+
108123std::shared_ptr<Schema> ExampleIntSchema () {
109124 auto f0 = field (" f0" , int8 ());
110125 auto f1 = field (" f1" , uint8 ());
Original file line number Diff line number Diff line change 1717
1818#pragma once
1919
20- #include < gmock/gmock.h>
2120#include < gtest/gtest.h>
2221
2322#include < cstdint>
@@ -42,20 +41,8 @@ namespace flight {
4241
4342// ----------------------------------------------------------------------
4443// Helpers to compare values for equality
45-
46- inline void AssertEqual (const FlightInfo& expected, const FlightInfo& actual) {
47- ipc::DictionaryMemo expected_memo;
48- ipc::DictionaryMemo actual_memo;
49- ASSERT_OK_AND_ASSIGN (auto ex_schema, expected.GetSchema (&expected_memo));
50- ASSERT_OK_AND_ASSIGN (auto actual_schema, actual.GetSchema (&actual_memo));
51-
52- AssertSchemaEqual (*ex_schema, *actual_schema);
53- ASSERT_EQ (expected.total_records (), actual.total_records ());
54- ASSERT_EQ (expected.total_bytes (), actual.total_bytes ());
55-
56- ASSERT_EQ (expected.descriptor (), actual.descriptor ());
57- ASSERT_THAT (actual.endpoints (), ::testing::ContainerEq (expected.endpoints ()));
58- }
44+ ARROW_FLIGHT_EXPORT
45+ void AssertEqual (const FlightInfo& expected, const FlightInfo& actual);
5946
6047// ----------------------------------------------------------------------
6148// Fixture to use for running test servers
You can’t perform that action at this time.
0 commit comments