/* * memoryusageobserverunittest.hpp */ #ifndef MEMORYUSAGEOBSERVERTEST_HPP_ #define MEMORYUSAGEOBSERVERTEST_HPP_ #include "memoryusageobserver.hpp" #include /********************************************** Test classes **************************************/ class MemoryUsageObserverTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( MemoryUsageObserverTest) ; CPPUNIT_TEST ( getInstanceReturnsMemoryUsageObserverTest ); CPPUNIT_TEST ( getInstanceTwiceReturnsSameInstanceTest ); CPPUNIT_TEST ( getInstanceAfterPurgeInstanceReturnsNewInstanceTest ); CPPUNIT_TEST ( addAndRemoveMemoryTest ); CPPUNIT_TEST ( removeNonTrackedMemoryDoesNotCauseACrashTest ); CPPUNIT_TEST ( addMemoryTwiceTest ); CPPUNIT_TEST ( addMemoryAndChangeSizeOfAddedMemoryTest ); CPPUNIT_TEST ( addMemoryChangeSizeOfAddedMemoryAndGetMaximumSizeTest ); CPPUNIT_TEST ( addMemoryRemoveMemoryAndGetMaximumSizeTest ); CPPUNIT_TEST ( getPointersToAllocatedMemoryTest ); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void getInstanceReturnsMemoryUsageObserverTest(); void getInstanceTwiceReturnsSameInstanceTest(); void getInstanceAfterPurgeInstanceReturnsNewInstanceTest(); void addAndRemoveMemoryTest(); void removeNonTrackedMemoryDoesNotCauseACrashTest(); void addMemoryTwiceTest(); void addMemoryAndChangeSizeOfAddedMemoryTest(); void addMemoryChangeSizeOfAddedMemoryAndGetMaximumSizeTest(); void addMemoryRemoveMemoryAndGetMaximumSizeTest(); void getPointersToAllocatedMemoryTest(); }; #endif /* MEMORYUSAGEOBSERVERTEST_HPP_ */