ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

iota_test.cpp
Go to the documentation of this file.
00001 #include <vector>
00002 #include <numeric>
00003 
00004 #include "cppunit/cppunit_proxy.h"
00005 
00006 #if defined(_STLP_USE_NAMESPACES)
00007 using namespace std;
00008 #endif
00009 
00010 //
00011 // TestCase class
00012 //
00013 class IotaTest : public CPPUNIT_NS::TestCase
00014 {
00015   CPPUNIT_TEST_SUITE(IotaTest);
00016 #if !defined (STLPORT) || defined (_STLP_NO_EXTENSIONS)
00017   CPPUNIT_IGNORE;
00018 #endif
00019   CPPUNIT_TEST(iota1);
00020   CPPUNIT_TEST_SUITE_END();
00021 
00022 protected:
00023   void iota1();
00024 };
00025 
00026 CPPUNIT_TEST_SUITE_REGISTRATION(IotaTest);
00027 
00028 //
00029 // tests implementation
00030 //
00031 void IotaTest::iota1()
00032 {
00033 #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
00034   int numbers[10];
00035   iota(numbers, numbers + 10, 42);
00036   CPPUNIT_ASSERT(numbers[0]==42);
00037   CPPUNIT_ASSERT(numbers[1]==43);
00038   CPPUNIT_ASSERT(numbers[2]==44);
00039   CPPUNIT_ASSERT(numbers[3]==45);
00040   CPPUNIT_ASSERT(numbers[4]==46);
00041   CPPUNIT_ASSERT(numbers[5]==47);
00042   CPPUNIT_ASSERT(numbers[6]==48);
00043   CPPUNIT_ASSERT(numbers[7]==49);
00044   CPPUNIT_ASSERT(numbers[8]==50);
00045   CPPUNIT_ASSERT(numbers[9]==51);
00046 #endif
00047 }

Generated on Fri May 25 2012 04:33:56 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.