From: konrad Date: Sat, 13 Nov 2010 20:55:06 +0000 (+0000) Subject: actually turn the dptr test into a test X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=824f80a3f9a166c58dc961f98b0e865157f7ae94;p=web%2Fkonrad%2Felam.git actually turn the dptr test into a test git-svn-id: https://silmor.de/svn/softmagic/elam/trunk@625 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- 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"<