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

Function TEST

cpp/src/arrow/compute/kernels/vector_swizzle_test.cc:130–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128} // namespace
129
130TEST(InversePermutation, InvalidOutputType) {
131 {
132 ARROW_SCOPED_TRACE("Output type unsigned");
133 auto indices = ArrayFromJSON(int32(), "[]");
134 ASSERT_RAISES_WITH_MESSAGE(
135 TypeError,
136 "Type error: Output type of inverse_permutation must be signed integer, got "
137 "uint32",
138 InversePermutation(indices, /*max_index=*/0, /*output_type=*/uint32()));
139 }
140 {
141 ARROW_SCOPED_TRACE("Output type float");
142 auto indices = ArrayFromJSON(int32(), "[]");
143 ASSERT_RAISES_WITH_MESSAGE(
144 TypeError,
145 "Type error: Output type of inverse_permutation must be signed integer, got "
146 "float",
147 InversePermutation(indices, /*max_index=*/0, /*output_type=*/float32()));
148 }
149 {
150 ARROW_SCOPED_TRACE("Output type string");
151 auto indices = ArrayFromJSON(int32(), "[]");
152 ASSERT_RAISES_WITH_MESSAGE(
153 TypeError,
154 "Type error: Output type of inverse_permutation must be signed integer, got "
155 "string",
156 InversePermutation(indices, /*max_index=*/0, /*output_type=*/utf8()));
157 }
158}
159
160TEST(InversePermutation, DefaultOptions) {
161 {

Callers

nothing calls this directly

Calls 7

ArrayFromJSONFunction · 0.85
AssertDatumsEqualFunction · 0.85
TestInversePermutationFunction · 0.85
TestScatterFunction · 0.85
InversePermutationFunction · 0.70
ScatterFunction · 0.70
ToStringMethod · 0.45

Tested by

no test coverage detected