diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /dcop/tests/testcases | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dcop/tests/testcases')
-rw-r--r-- | dcop/tests/testcases | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/dcop/tests/testcases b/dcop/tests/testcases new file mode 100644 index 000000000..0f16bdbe3 --- /dev/null +++ b/dcop/tests/testcases @@ -0,0 +1,105 @@ +# Format of this file: +# +# Lines beginning with '#' are comments +# The file consists of a repetion of the following pattern +# (\n means newline and + means you can repeat the line): +# +# // comment \n+ +# return_type \n +# function_name \n +# (argument_list) \n +# { \n +# body \n +# } \n +# arguments_to_use_in_shell;arguments_to_use_in_c++ \n+ +# +# The last line has a few nuances: +# 1. to call a void function you can use '-' or leave it out. +# +# 2. First you put shell like argument: +# "string with spaces" 4 string_without_spaces +# Then you should put c++ style arguments: +# QString::fromLatin1("string with spaces"),4,"string_with_spaces" +# +# Note that the first argument has type QString and the last type const char* +# (adapt accordingly) +# +// 1. easy case +QString +url +() +{ +return QString::fromLatin1( "http://www.kde.org/"); +} +- + +// 2.1 overloading on number of args +unsigned +getObject +( int num ) +{ + return num; +} +42;42 +1;1 + + + +unsigned int +getObject +( int x, int y) +{ + return x + y; +} +2 3;2,3 + + + + +// 2.2 overloading on type of args +QString +identity +( QString x) +{ + return x; +} +"test";QString::fromLatin1("test") + +// 2.3 unsigned long int +unsigned long int +getObject23 +( int x, int y) +{ + return x + y; +} +2 3;2,3 + + + +// 2.4 unsigned long int +unsigned long int +getObject24 +( unsigned long int x, int y) +{ + return x + y; +} +5 7;5,7 + + + +#virtual QString identity( QCString ); +# +#// 4. simple template argument: +#virtual +# +#// 3. simple template return type: +#virtual QValueList<DCOPRef> getWindows(); +# +# +#// spaces in the return value +#virtual unsigned long int srvv(); +#unsigned long int srv(); +# +#// spaces in the return value's template +#QValueList< DCOPRef > srvtv(); +#QValueList< DCOPRef > srvt(); |