ACF $AcfVersion:0$
TDelPtrTest.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QObject>
7#include <QtTest/QtTest>
8
9// ACF includes
10#include <istd/TDelPtr.h>
12
13// Test class with destructor counter
14class TestObject
15{
16public:
17 static int destructorCount;
18 int value;
19
20 TestObject(int val = 0) : value(val) {}
22};
23
24class TDelPtrTest: public QObject
25{
26 Q_OBJECT
27private slots:
28 void initTestCase();
29
30 void DefaultConstructorTest();
31 void PointerConstructorTest();
32 void DestructorTest();
33 void SetPtrTest();
34 void ResetTest();
35 void PopPtrTest();
36 void TakeOverTest();
37 void MoveConstructorTest();
38 void MoveAssignmentTest();
39
40 void cleanupTestCase();
41};
42
43
static int destructorCount
Definition TDelPtrTest.h:17
virtual ~TestObject()
Definition TDelPtrTest.h:21
TestObject(int val=0)
Definition TDelPtrTest.h:20