MCPcopy Create free account
hub / github.com/apache/arrow / TEST_F

Function TEST_F

cpp/src/arrow/testing/gtest_util_test.cc:44–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42class TestAssertContainsNaN : public ::testing::Test {};
43
44TEST_F(TestAssertContainsNaN, BatchesEqual) {
45 auto schema = ::arrow::schema({
46 {field("a", float32())},
47 {field("b", float64())},
48 });
49
50 auto expected = RecordBatchFromJSON(schema,
51 R"([{"a": 3, "b": 5},
52 {"a": 1, "b": 3},
53 {"a": 3, "b": 4},
54 {"a": NaN, "b": 6},
55 {"a": 2, "b": 5},
56 {"a": 1, "b": NaN},
57 {"a": 1, "b": 3}
58 ])");
59 auto actual = RecordBatchFromJSON(schema,
60 R"([{"a": 3, "b": 5},
61 {"a": 1, "b": 3},
62 {"a": 3, "b": 4},
63 {"a": NaN, "b": 6},
64 {"a": 2, "b": 5},
65 {"a": 1, "b": NaN},
66 {"a": 1, "b": 3}
67 ])");
68 ASSERT_BATCHES_EQUAL(*expected, *actual);
69 AssertBatchesApproxEqual(*expected, *actual);
70}
71
72TEST_F(TestAssertContainsNaN, TableEqual) {
73 auto schema = ::arrow::schema({

Callers

nothing calls this directly

Calls 15

RecordBatchFromJSONFunction · 0.85
AssertBatchesApproxEqualFunction · 0.85
TableFromJSONFunction · 0.85
ArrayFromJSONFunction · 0.85
AssertArraysEqualFunction · 0.85
ChunkedArrayFromJSONFunction · 0.85
AssertChunkedEqualFunction · 0.85
ScalarFromJSONFunction · 0.85
AssertDatumsEqualFunction · 0.85
WrapFunction · 0.85
TensorFromJSONFunction · 0.85
schemaFunction · 0.50

Tested by

no test coverage detected