Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendivides_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
1.7.6.1
|