MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / CHECK_RANGE_EQUAL

Function CHECK_RANGE_EQUAL

compute/test/test_sort.cpp:220–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 boost::compute::sort(vector.begin(), vector.end(), queue);
219 BOOST_CHECK(boost::compute::is_sorted(vector.begin(), vector.end(), queue) == true);
220 CHECK_RANGE_EQUAL(
221 double, 10, vector,
222 (-6023.0, -5000.1, -63.0, -8.25, -0.0, 0.0, 11.2, 14.0, 152.5, 1234567.0)
223 );
224
225}
226
227BOOST_AUTO_TEST_CASE(reverse_sort_int_vector)
228{
229 int data[] = { -4, 152, -5000, 963, 75321, -456, 0, 1112 };
230 boost::compute::vector<int> vector(data, data + 8, queue);
231 BOOST_CHECK_EQUAL(vector.size(), size_t(8));
232
233 boost::compute::sort(vector.begin(), vector.end(),
234 boost::compute::greater<int>(), queue);
235 CHECK_RANGE_EQUAL(int, 8, vector, (75321, 1112, 963, 152, 0, -4, -456, -5000));
236}
237
238BOOST_AUTO_TEST_CASE(sort_vectors_by_length)
239{

Callers 15

BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
test_fillFunction · 0.70
test_fill_nFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70

Calls 4

sortFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected