Sha256: 91e503fef0b30dd10d0f26195961f55b60530c87f9d2ac60e5c9e687123b9d30
Contents?: true
Size: 604 Bytes
Versions: 135
Compression:
Stored size: 604 Bytes
Contents
#include <algorithm> #include <numeric> #include <functional> #include "cppunit/cppunit_proxy.h" #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) using namespace std; #endif // // TestCase class // class TimesTest : public CPPUNIT_NS::TestCase { CPPUNIT_TEST_SUITE(TimesTest); CPPUNIT_TEST(times); CPPUNIT_TEST_SUITE_END(); protected: void times(); }; CPPUNIT_TEST_SUITE_REGISTRATION(TimesTest); // // tests implementation // void TimesTest::times() { int input [4] = { 1, 5, 7, 2 }; int total = accumulate(input, input + 4, 1, multiplies<int>()); CPPUNIT_ASSERT(total==70); }
Version data entries
135 entries across 135 versions & 2 rubygems