Log Message:
-----------
?\208?\148?\208?\190?\208?\177?\208?\176?\208?\178?\208?\184?\208?\187 ?\208?\188?\208?\181?\209?\130?\208?\190?\208?\180 tearDown()
?\208?\184 ?\208?\186?\208?\190?\208?\188?\208?\181?\208?\189?\209?\130?\208?\176?\209?\128?\208?\184?\208?\184.
Modified Paths:
--------------
ananas-test/trunk/tests/lib/aObjectTestCase.cpp
ananas-test/trunk/tests/lib/aObjectTestCase.h
Modified: ananas-test/trunk/tests/lib/aObjectTestCase.cpp
===================================================================
--- ananas-test/trunk/tests/lib/aObjectTestCase.cpp 2008-01-22 12:15:19 UTC (rev 56)
+++ ananas-test/trunk/tests/lib/aObjectTestCase.cpp 2008-04-05 14:52:27 UTC (rev 57)
@@ -33,6 +33,8 @@
aObjectTest::aObjectTest()
{
+ _dbParams = 0;
+ _dataBase = 0;
addTest(aObjectTest, testCreateAbstractObject);
addTest(aObjectTest, testCreateBadDataObject);
addTest(aObjectTest, testCreateCatalogueDataObject);
@@ -42,6 +44,9 @@
addTest(aObjectTest, testCreateARegisterDataObject);
}
+/**
+ * Запускается перед каждым методом-тестом
+ */
void aObjectTest::setUp()
{
aLog::init();
@@ -66,6 +71,21 @@
}
+/**
+ * Запускается после каждого метода-теста
+ */
+void aObjectTest::tearDown()
+{
+ if ( _dbParams ) {
+ delete _dbParams;
+ _dbParams = 0;
+ }
+ if ( _dataBase ) {
+ delete _dataBase;
+ _dataBase = 0;
+ }
+}
+
void aObjectTest::testCreateAbstractObject()
{
aObject* abstractObject;
Modified: ananas-test/trunk/tests/lib/aObjectTestCase.h
===================================================================
--- ananas-test/trunk/tests/lib/aObjectTestCase.h 2008-01-22 12:15:19 UTC (rev 56)
+++ ananas-test/trunk/tests/lib/aObjectTestCase.h 2008-04-05 14:52:27 UTC (rev 57)
@@ -44,6 +44,7 @@
public:
aObjectTest();
void setUp();
+ void tearDown();
protected:
void testCreateAbstractObject();
void testCreateBadDataObject();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.