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

Function medfiltPadTest

test/medfilt.cpp:291–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290template<typename T>
291void medfiltPadTest(void) {
292 SUPPORTED_TYPE_CHECK(T);
293
294 af_array inArray = 0;
295 af_array outArray = 0;
296
297 vector<T> in(100, 1);
298
299 // Check for 4D inputs
300 dim4 dims(10, 10, 1, 1);
301
302 ASSERT_SUCCESS(af_create_array(&inArray, &in.front(), dims.ndims(),
303 dims.get(),
304 (af_dtype)dtype_traits<T>::af_type));
305
306 ASSERT_EQ(AF_ERR_ARG,
307 af_medfilt2(&outArray, inArray, 3, 3, af_border_type(3)));
308
309 ASSERT_EQ(AF_ERR_ARG,
310 af_medfilt2(&outArray, inArray, 3, 3, af_border_type(-1)));
311
312 ASSERT_SUCCESS(af_release_array(inArray));
313}
314
315TYPED_TEST(MedianFilter, InvalidPadType) { medfiltPadTest<TypeParam>(); }
316

Callers

nothing calls this directly

Calls 5

af_create_arrayFunction · 0.50
af_medfilt2Function · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected