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

divides_test.cpp
Go to the documentation of this file.
00001 #include <numeric>
00002 #include <functional>
00003 
00004 #include "cppunit/cppunit_proxy.h"
00005 
00006 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
00007 using namespace std;
00008 #endif
00009 
00010 //
00011 // TestCase class
00012 //
00013 class DivideTest : public CPPUNIT_NS::TestCase
00014 {
00015   CPPUNIT_TEST_SUITE(DivideTest);
00016   CPPUNIT_TEST(div);
00017   CPPUNIT_TEST_SUITE_END();
00018 
00019 protected:
00020   void div();
00021 };
00022 
00023 CPPUNIT_TEST_SUITE_REGISTRATION(DivideTest);
00024 
00025 //
00026 // tests implementation
00027 //
00028 void DivideTest::div()
00029 {
00030   int input [3] = { 2, 3, 4 };
00031   int result = accumulate(input, input + 3, 48, divides<int>());
00032   CPPUNIT_ASSERT(result==2);
00033 }

Generated on Sat May 26 2012 04:34:15 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.