Update contrib.
4 #include "cppunit/cppunit_proxy.h"
6 #if defined(_STLP_USE_NAMESPACES)
13 class BcomposTest : public CPPUNIT_NS::TestCase
15 CPPUNIT_TEST_SUITE(BcomposTest);
16 #if !defined (STLPORT) || defined (_STLP_NO_EXTENSIONS)
19 CPPUNIT_TEST(bcompos1);
20 CPPUNIT_TEST(bcompos2);
21 CPPUNIT_TEST_SUITE_END();
28 CPPUNIT_TEST_SUITE_REGISTRATION(BcomposTest);
31 // tests implementation
33 void BcomposTest::bcompos1()
35 #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
36 int array [6] = { -2, -1, 0, 1, 2, 3 };
38 binary_compose<logical_and<bool>, odd, positive>
39 b = binary_compose<logical_and<bool>, odd, positive>(logical_and<bool>(), odd(), positive());
41 int* p = find_if((int*)array, (int*)array + 6, b);
42 CPPUNIT_ASSERT(p != array + 6);
46 void BcomposTest::bcompos2()
48 #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
49 int array [6] = { -2, -1 , 0, 1, 2, 3 };
51 int* p = find_if((int*)array, (int*)array + 6,
52 compose2(logical_and<bool>(), odd(), positive()));
53 CPPUNIT_ASSERT(p != array + 6);