ReactOS  0.4.15-dev-509-g96a357b
times_test.cpp
Go to the documentation of this file.
1 #include <algorithm>
2 #include <numeric>
3 #include <functional>
4 
6 
7 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
8 using namespace std;
9 #endif
10 
11 //
12 // TestCase class
13 //
14 class TimesTest : public CPPUNIT_NS::TestCase
15 {
19 
20 protected:
21  void times();
22 };
23 
25 
26 //
27 // tests implementation
28 //
30 {
31  int input [4] = { 1, 5, 7, 2 };
32  int total = accumulate(input, input + 4, 1, multiplies<int>());
33  CPPUNIT_ASSERT(total==70);
34 }
#define CPPUNIT_TEST_SUITE(X)
Definition: cppunit_mini.h:142
#define CPPUNIT_TEST(X)
Definition: cppunit_mini.h:182
Definition: features.h:417
#define CPPUNIT_TEST_SUITE_END()
Definition: cppunit_mini.h:191
static const struct encodedFiletime times[]
Definition: encode.c:556
CPPUNIT_TEST_SUITE_REGISTRATION(TimesTest)
_STLP_BEGIN_NAMESPACE _STLP_INLINE_LOOP _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init)
Definition: _numeric.h:42
void times()
Definition: times_test.cpp:29
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
GLenum GLenum GLenum input
Definition: glext.h:9031