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

Function BOOST_AUTO_TEST_CASE

compute/test/test_search_n.cpp:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace bc = boost::compute;
23
24BOOST_AUTO_TEST_CASE(search_int)
25{
26 int data[] = {1, 2, 2, 2, 3, 2, 2, 2, 4, 6, 6};
27 bc::vector<bc::int_> vectort(data, data + 11, queue);
28
29 bc::vector<bc::int_>::iterator iter =
30 bc::search_n(vectort.begin(), vectort.end(), 3, 2, queue);
31
32 BOOST_CHECK(iter == vectort.begin() + 1);
33
34 iter =
35 bc::search_n(vectort.begin(), vectort.end(), 5, 2, queue);
36
37 BOOST_CHECK(iter == vectort.begin() + 11);
38
39 iter =
40 bc::search_n(vectort.begin(), vectort.end(), 2, 6, queue);
41
42 BOOST_CHECK(iter == vectort.begin() + 9);
43}
44
45BOOST_AUTO_TEST_CASE(search_string)
46{

Callers

nothing calls this directly

Calls 3

search_nFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected