From 824f80a3f9a166c58dc961f98b0e865157f7ae94 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 13 Nov 2010 20:55:06 +0000 Subject: [PATCH] actually turn the dptr test into a test git-svn-id: https://silmor.de/svn/softmagic/elam/trunk@625 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- tests/dptr/dptrpriv.cpp | 28 ++++++-------------------- tests/dptr/dptrtest.cpp | 49 +++++++++++++++++++++++++++------------------- tests/dptr/dptrtest.h | 4 +++ 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/tests/dptr/dptrpriv.cpp b/tests/dptr/dptrpriv.cpp index c3466ba..4e3dc91 100644 --- a/tests/dptr/dptrpriv.cpp +++ b/tests/dptr/dptrpriv.cpp @@ -3,21 +3,12 @@ #include -class DPTR_CLASS_NAME(ClassWithDptr) +class DPTR_CLASS_NAME(ClassWithDptr):public DPtr { public: - static int cnt; int num; - Private(){num=cnt++;qDebug()<<"creates dptr"<num); } +int ClassWithDptr::num()const{return d->num;} +void ClassWithDptr::setNum(int n){d->num=n;} class DPTR_CLASS_NAME(ClassWithSDptr):public SharedDPtr { public: - static int cnt; int num; - Private(){num=cnt++;qDebug()<<"creates dptr"<num); } +int ClassWithSDptr::num()const{return d->num;} +void ClassWithSDptr::setNum(int n){d->num=n;} diff --git a/tests/dptr/dptrtest.cpp b/tests/dptr/dptrtest.cpp index a2f5a68..273106c 100644 --- a/tests/dptr/dptrtest.cpp +++ b/tests/dptr/dptrtest.cpp @@ -7,30 +7,39 @@ void DPtrTest::simpleDP() { - qDebug()<<"dynamic"<