mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:23:03 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
55
sdk/lib/3rdparty/stlport/test/unit/bcompos_test.cpp
vendored
Normal file
55
sdk/lib/3rdparty/stlport/test/unit/bcompos_test.cpp
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
#include <algorithm>
|
||||
#include "unary.h"
|
||||
|
||||
#include "cppunit/cppunit_proxy.h"
|
||||
|
||||
#if defined(_STLP_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
//
|
||||
// TestCase class
|
||||
//
|
||||
class BcomposTest : public CPPUNIT_NS::TestCase
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(BcomposTest);
|
||||
#if !defined (STLPORT) || defined (_STLP_NO_EXTENSIONS)
|
||||
CPPUNIT_IGNORE;
|
||||
#endif
|
||||
CPPUNIT_TEST(bcompos1);
|
||||
CPPUNIT_TEST(bcompos2);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
protected:
|
||||
void bcompos1();
|
||||
void bcompos2();
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(BcomposTest);
|
||||
|
||||
//
|
||||
// tests implementation
|
||||
//
|
||||
void BcomposTest::bcompos1()
|
||||
{
|
||||
#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
|
||||
int array [6] = { -2, -1, 0, 1, 2, 3 };
|
||||
|
||||
binary_compose<logical_and<bool>, odd, positive>
|
||||
b = binary_compose<logical_and<bool>, odd, positive>(logical_and<bool>(), odd(), positive());
|
||||
|
||||
int* p = find_if((int*)array, (int*)array + 6, b);
|
||||
CPPUNIT_ASSERT(p != array + 6);
|
||||
#endif
|
||||
}
|
||||
|
||||
void BcomposTest::bcompos2()
|
||||
{
|
||||
#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
|
||||
int array [6] = { -2, -1 , 0, 1, 2, 3 };
|
||||
|
||||
int* p = find_if((int*)array, (int*)array + 6,
|
||||
compose2(logical_and<bool>(), odd(), positive()));
|
||||
CPPUNIT_ASSERT(p != array + 6);
|
||||
#endif
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue