Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentimes_test.cpp
Go to the documentation of this file.
00001 #include <algorithm> 00002 #include <numeric> 00003 #include <functional> 00004 00005 #include "cppunit/cppunit_proxy.h" 00006 00007 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 00008 using namespace std; 00009 #endif 00010 00011 // 00012 // TestCase class 00013 // 00014 class TimesTest : public CPPUNIT_NS::TestCase 00015 { 00016 CPPUNIT_TEST_SUITE(TimesTest); 00017 CPPUNIT_TEST(times); 00018 CPPUNIT_TEST_SUITE_END(); 00019 00020 protected: 00021 void times(); 00022 }; 00023 00024 CPPUNIT_TEST_SUITE_REGISTRATION(TimesTest); 00025 00026 // 00027 // tests implementation 00028 // 00029 void TimesTest::times() 00030 { 00031 int input [4] = { 1, 5, 7, 2 }; 00032 int total = accumulate(input, input + 4, 1, multiplies<int>()); 00033 CPPUNIT_ASSERT(total==70); 00034 } Generated on Sun May 27 2012 04:35:52 for ReactOS by
1.7.6.1
|