mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 02:39:42 +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
54
sdk/lib/3rdparty/stlport/test/unit/binsert_test.cpp
vendored
Normal file
54
sdk/lib/3rdparty/stlport/test/unit/binsert_test.cpp
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "cppunit/cppunit_proxy.h"
|
||||
|
||||
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
//
|
||||
// TestCase class
|
||||
//
|
||||
class BinsertTest : public CPPUNIT_NS::TestCase
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(BinsertTest);
|
||||
CPPUNIT_TEST(binsert1);
|
||||
CPPUNIT_TEST(binsert2);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
protected:
|
||||
void binsert1();
|
||||
void binsert2();
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(BinsertTest);
|
||||
|
||||
//
|
||||
// tests implementation
|
||||
//
|
||||
void BinsertTest::binsert1()
|
||||
{
|
||||
const char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
vector<const char*> names;
|
||||
back_insert_iterator<vector<const char*> > bit(names);
|
||||
bit = copy(array, array + 3, bit);
|
||||
|
||||
CPPUNIT_ASSERT(!strcmp(names[0],array[0]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[1],array[1]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[2],array[2]));
|
||||
|
||||
copy(array, array + 3, bit);
|
||||
CPPUNIT_ASSERT(!strcmp(names[3],array[0]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[4],array[1]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[5],array[2]));
|
||||
}
|
||||
void BinsertTest::binsert2()
|
||||
{
|
||||
const char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
vector<const char*> names;
|
||||
copy(array, array + 3, back_inserter(names));
|
||||
CPPUNIT_ASSERT(!strcmp(names[0],array[0]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[1],array[1]));
|
||||
CPPUNIT_ASSERT(!strcmp(names[2],array[2]));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue