From 722fdea9935611bb1b1c3927b8ba80dd7612074d Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 26 Jul 2015 08:31:28 +0000 Subject: [PATCH] * Improved testunit coverage git-svn-id: trunk@31234 - --- .gitattributes | 1 + utils/fpdoc/gentest.sh | 10 +++ utils/fpdoc/testunit.pp | 19 ++++ utils/fpdoc/testunit.xml | 182 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 utils/fpdoc/gentest.sh diff --git a/.gitattributes b/.gitattributes index ed1a2ef11f..4d76ecbb63 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15453,6 +15453,7 @@ utils/fpdoc/fpdocstripper.lpi svneol=native#text/plain utils/fpdoc/fpdocstripper.pp svneol=native#text/plain utils/fpdoc/fpdocxmlopts.pas svneol=native#text/plain utils/fpdoc/fpmake.pp svneol=native#text/plain +utils/fpdoc/gentest.sh svneol=native#text/plain utils/fpdoc/images/minus.png -text svneol=unset#image/png utils/fpdoc/images/plus.png -text svneol=unset#image/png utils/fpdoc/intl/Makefile svneol=native#text/plain diff --git a/utils/fpdoc/gentest.sh b/utils/fpdoc/gentest.sh new file mode 100644 index 0000000000..aff9eababf --- /dev/null +++ b/utils/fpdoc/gentest.sh @@ -0,0 +1,10 @@ +if [ -e ./fpdoc ]; then + FPDOC=./fpdoc +fi +NEWERDOC=`find bin -newer ./fpdoc -type f | xargs -r ls -t | head -1` +if [ ! -z "$NEWERDOC" ]; then + FPDOC="$NEWERDOC" +fi +echo "Using fpdoc executable $FPDOC" +echo "Writing output to fpdoctest" +$FPDOC --package=fpdoc --input='-S2 testunit.pp' --output=fpdoctest --format=html --warn-no-node -v --descr=testunit.xml diff --git a/utils/fpdoc/testunit.pp b/utils/fpdoc/testunit.pp index 58368c588b..615b8ac28a 100644 --- a/utils/fpdoc/testunit.pp +++ b/utils/fpdoc/testunit.pp @@ -45,7 +45,9 @@ Type TADeprecatedType = Integer deprecated; TMethodRecord = Record + Private + Const aconst = 123; X22 : Integer; Procedure SetX(AValue : Integer); Function GetX : Integer; @@ -56,6 +58,10 @@ Type 1 : (X2,Y2 : Integer); 2 : (phi,Omega : Real); end; + TAExtRecordType = Record + Const X = 100; + operator assign(Y : Integer) : TAExtRecordType; + end; Var ASimpleVar : Integer; @@ -138,6 +144,9 @@ Type Published Property AProtectedProp; end; + +Operator + (A,B : TAnArrayType) : TAnArrayType; +Operator multiply (A,B : TAnArrayType) : TAnArrayType; Implementation @@ -305,4 +314,14 @@ Procedure TMEthodRecord.MyMethod; begin end; +Operator + (A,B : TAnArrayType) : TAnArrayType; + +begin +end; + +Operator subtract (A,B : TAnArrayType) : TAnArrayType; + +begin +end; + end. diff --git a/utils/fpdoc/testunit.xml b/utils/fpdoc/testunit.xml index aa9ad01199..794022e81c 100644 --- a/utils/fpdoc/testunit.xml +++ b/utils/fpdoc/testunit.xml @@ -1114,6 +1114,188 @@ Appears in 2.0 + +Something short about operator add + +Something long about operator add + + + + +Something short about operator - + +Something long about operator - + + + + +An operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +