| 1 | /* |
| 2 | Copyright (c) 2005-2019 Intel Corporation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #if __TBB_CPF_BUILD |
| 18 | #define TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1 |
| 19 | #endif |
| 20 | |
| 21 | #include "test_join_node.h" |
| 22 | |
| 23 | int TestMain() { |
| 24 | #if __TBB_USE_TBB_TUPLE |
| 25 | REMARK(" Using TBB tuple\n" ); |
| 26 | #else |
| 27 | REMARK(" Using platform tuple\n" ); |
| 28 | #endif |
| 29 | |
| 30 | REMARK("key_matching\n" ); |
| 31 | generate_test<serial_test, tbb::flow::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int> >::do_test(); |
| 32 | generate_test<serial_test, tbb::flow::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float> >, tbb::flow::key_matching<std::string> >::do_test(); |
| 33 | #if MAX_TUPLE_TEST_SIZE >= 3 |
| 34 | generate_test<serial_test, tbb::flow::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float>, MyKeyWithBrokenMessageKey<std::string, int> >, tbb::flow::key_matching<std::string&> >::do_test(); |
| 35 | #endif |
| 36 | #if MAX_TUPLE_TEST_SIZE >= 7 |
| 37 | generate_test<serial_test, tbb::flow::tuple< |
| 38 | MyKeyFirst<std::string, double>, |
| 39 | MyKeyWithBrokenMessageKey<std::string, int>, |
| 40 | MyKeyFirst<std::string, int>, |
| 41 | MyKeySecond<std::string, size_t>, |
| 42 | MyKeyWithBrokenMessageKey<std::string, int>, |
| 43 | MyKeySecond<std::string, short>, |
| 44 | MyKeySecond<std::string, threebyte> |
| 45 | >, tbb::flow::key_matching<std::string&> >::do_test(); |
| 46 | #endif |
| 47 | |
| 48 | generate_test<parallel_test, tbb::flow::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int> >::do_test(); |
| 49 | generate_test<parallel_test, tbb::flow::tuple<MyKeyFirst<int, double>, MyKeySecond<int, float> >, tbb::flow::key_matching<int&> >::do_test(); |
| 50 | generate_test<parallel_test, tbb::flow::tuple<MyKeyFirst<std::string, double>, MyKeySecond<std::string, float> >, tbb::flow::key_matching<std::string&> >::do_test(); |
| 51 | #if MAX_TUPLE_TEST_SIZE >= 10 |
| 52 | generate_test<parallel_test, tbb::flow::tuple< |
| 53 | MyKeyFirst<std::string, double>, |
| 54 | MyKeySecond<std::string, int>, |
| 55 | MyKeyFirst<std::string, int>, |
| 56 | MyKeyWithBrokenMessageKey<std::string, size_t>, |
| 57 | MyKeyWithBrokenMessageKey<std::string, int>, |
| 58 | MyKeySecond<std::string, short>, |
| 59 | MyKeySecond<std::string, threebyte>, |
| 60 | MyKeyFirst<std::string, int>, |
| 61 | MyKeySecond<std::string, threebyte>, |
| 62 | MyKeyWithBrokenMessageKey<std::string, size_t> |
| 63 | >, tbb::flow::key_matching<std::string&> >::do_test(); |
| 64 | #endif |
| 65 | |
| 66 | return Harness::Done; |
| 67 | } |
| 68 | |