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

Function TEST_F

cpp/src/arrow/pretty_print_test.cc:100–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100TEST_F(TestPrettyPrint, PrimitiveType) {
101 std::vector<bool> is_valid = {true, true, false, true, false};
102
103 std::vector<int32_t> values = {0, 1, 2, 3, 4};
104 static const char* expected = R"expected([
105 0,
106 1,
107 null,
108 3,
109 null
110])expected";
111 CheckPrimitive<Int32Type, int32_t>({0, 10}, is_valid, values, expected);
112
113 static const char* expected_na = R"expected([
114 0,
115 1,
116 NA,
117 3,
118 NA
119])expected";
120 CheckPrimitive<Int32Type, int32_t>({0, 10, 2, "NA"}, is_valid, values, expected_na,
121 false);
122
123 static const char* ex_in2 = R"expected( [
124 0,
125 1,
126 null,
127 3,
128 null
129 ])expected";
130 CheckPrimitive<Int32Type, int32_t>({2, 10}, is_valid, values, ex_in2);
131
132 static const char* ex_in2_w2 = R"expected( [
133 0,
134 1,
135 null,
136 3,
137 null
138 ])expected";
139 CheckPrimitive<Int32Type, int32_t>({2, 2}, is_valid, values, ex_in2_w2);
140
141 static const char* ex_in2_w1 = R"expected( [
142 0,
143 ...
144 null
145 ])expected";
146 CheckPrimitive<Int32Type, int32_t>({2, 1}, is_valid, values, ex_in2_w1);
147
148 std::vector<double> values2 = {0., 1., 2., 3., 4.};
149 static const char* ex2 = R"expected([
150 0,
151 1,
152 null,
153 3,
154 null
155])expected";
156 CheckPrimitive<DoubleType, double>({0, 10}, is_valid, values2, ex2);
157 static const char* ex2_in2 = R"expected( [

Callers

nothing calls this directly

Calls 15

struct_Function · 0.85
ArrayFromJSONFunction · 0.85
CheckStreamFunction · 0.85
PrettyPrintOptionsFunction · 0.85
listFunction · 0.85
CheckArrayFunction · 0.85
mapFunction · 0.85
fixed_size_listFunction · 0.85
fixed_size_binaryFunction · 0.85
decimal32Function · 0.85
decimal64Function · 0.85
decimal256Function · 0.85

Tested by

no test coverage detected