mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 21:29:43 +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
60
sdk/lib/3rdparty/stlport/test/unit/stack_test.cpp
vendored
Normal file
60
sdk/lib/3rdparty/stlport/test/unit/stack_test.cpp
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <queue>
|
||||
#include <deque>
|
||||
#include <stack>
|
||||
|
||||
#include "cppunit/cppunit_proxy.h"
|
||||
|
||||
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
//
|
||||
// TestCase class
|
||||
//
|
||||
class StackTest : public CPPUNIT_NS::TestCase
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(StackTest);
|
||||
CPPUNIT_TEST(stack1);
|
||||
CPPUNIT_TEST(stack2);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
protected:
|
||||
void stack1();
|
||||
void stack2();
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(StackTest);
|
||||
|
||||
//
|
||||
// tests implementation
|
||||
//
|
||||
void StackTest::stack1()
|
||||
{
|
||||
stack<int, deque<int> > s;
|
||||
s.push(42);
|
||||
s.push(101);
|
||||
s.push(69);
|
||||
CPPUNIT_ASSERT(s.top()==69);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.top()==101);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.top()==42);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.empty());
|
||||
}
|
||||
void StackTest::stack2()
|
||||
{
|
||||
stack<int, list<int> > s;
|
||||
s.push(42);
|
||||
s.push(101);
|
||||
s.push(69);
|
||||
CPPUNIT_ASSERT(s.top()==69);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.top()==101);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.top()==42);
|
||||
s.pop();
|
||||
CPPUNIT_ASSERT(s.empty());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue