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

Function TEST

test/match_template.cpp:105–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105TEST(MatchTemplate, InvalidMatchType) {
106 af_array inArray = 0;
107 af_array tArray = 0;
108 af_array outArray = 0;
109
110 vector<float> in(100, 1);
111
112 dim4 sDims(10, 10, 1, 1);
113 dim4 tDims(4, 4, 1, 1);
114
115 ASSERT_SUCCESS(af_create_array(&inArray, &in.front(), sDims.ndims(),
116 sDims.get(),
117 (af_dtype)dtype_traits<float>::af_type));
118
119 ASSERT_SUCCESS(af_create_array(&tArray, &in.front(), tDims.ndims(),
120 tDims.get(),
121 (af_dtype)dtype_traits<float>::af_type));
122
123 ASSERT_EQ(AF_ERR_ARG,
124 af_match_template(&outArray, inArray, tArray, (af_match_type)-1));
125
126 ASSERT_SUCCESS(af_release_array(inArray));
127 ASSERT_SUCCESS(af_release_array(tArray));
128}
129
130///////////////////////////////// CPP TESTS /////////////////////////////
131//

Callers

nothing calls this directly

Calls 6

af_create_arrayFunction · 0.50
af_match_templateFunction · 0.50
af_release_arrayFunction · 0.50
matchTemplateFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected