MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / medfilt1d_PadTest

Function medfilt1d_PadTest

test/medfilt.cpp:318–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317template<typename T>
318void medfilt1d_PadTest(void) {
319 SUPPORTED_TYPE_CHECK(T);
320
321 af_array inArray = 0;
322 af_array outArray = 0;
323
324 vector<T> in(100, 1);
325
326 // Check for 4D inputs
327 dim4 dims(10, 10, 1, 1);
328
329 ASSERT_SUCCESS(af_create_array(&inArray, &in.front(), dims.ndims(),
330 dims.get(),
331 (af_dtype)dtype_traits<T>::af_type));
332
333 ASSERT_EQ(AF_ERR_ARG,
334 af_medfilt1(&outArray, inArray, 3, af_border_type(3)));
335
336 ASSERT_EQ(AF_ERR_ARG,
337 af_medfilt1(&outArray, inArray, 3, af_border_type(-1)));
338
339 ASSERT_SUCCESS(af_release_array(inArray));
340}
341
342TYPED_TEST(MedianFilter1d, InvalidPadType) { medfilt1d_PadTest<TypeParam>(); }
343

Callers

nothing calls this directly

Calls 5

af_create_arrayFunction · 0.50
af_medfilt1Function · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected