MCPcopy Create free account
hub / github.com/boostorg/compute / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

test/test_mismatch.cpp:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include "context_setup.hpp"
19
20BOOST_AUTO_TEST_CASE(mismatch_int)
21{
22 int data1[] = { 1, 2, 3, 4, 5, 6 };
23 int data2[] = { 1, 2, 3, 7, 5, 6 };
24
25 boost::compute::vector<int> vector1(data1, data1 + 6, queue);
26 boost::compute::vector<int> vector2(data2, data2 + 6, queue);
27
28 typedef boost::compute::vector<int>::iterator iter;
29
30 std::pair<iter, iter> location =
31 boost::compute::mismatch(vector1.begin(), vector1.end(),
32 vector2.begin(), queue);
33 BOOST_CHECK(location.first == vector1.begin() + 3);
34 BOOST_CHECK_EQUAL(int(*location.first), int(4));
35 BOOST_CHECK(location.second == vector2.begin() + 3);
36 BOOST_CHECK_EQUAL(int(*location.second), int(7));
37}
38
39BOOST_AUTO_TEST_CASE(mismatch_different_range_sizes)
40{

Callers

nothing calls this directly

Calls 4

mismatchFunction · 0.85
fillFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected