diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2004-10-20 21:06:55 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2004-10-20 21:06:55 +0000 |
commit | 2c5f8a09d2f16e05c420dbd8800872c19e8d7626 (patch) | |
tree | 579fa028141c2bd2f5cbfbcbdb13ad6c18e813c0 /Examples/test-suite | |
parent | 1800d7914f386839be1c031a7f3e2d0b11824ac4 (diff) | |
download | swig-2c5f8a09d2f16e05c420dbd8800872c19e8d7626.tar.gz |
runtime tests for templated functions with default args in namespace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6455 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite')
-rw-r--r-- | Examples/test-suite/python/overload_template_runme.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/test-suite/python/overload_template_runme.py b/Examples/test-suite/python/overload_template_runme.py index 8bc10b67a..39675105b 100644 --- a/Examples/test-suite/python/overload_template_runme.py +++ b/Examples/test-suite/python/overload_template_runme.py @@ -111,3 +111,32 @@ if (overload() != 50): raise RuntimeError, ("overload(const char *)") +# everything put in a namespace +if (nsoverload("hi") != 1000): + raise RuntimeError, ("nsoverload()") + +if (nsoverload(1) != 1010): + raise RuntimeError, ("nsoverload(int t)") + +if (nsoverload(1, 1) != 1020): + raise RuntimeError, ("nsoverload(int t, const int &)") + +if (nsoverload(1, "hello") != 1030): + raise RuntimeError, ("nsoverload(int t, const char *)") + +if (nsoverload(k) != 1010): + raise RuntimeError, ("nsoverload(Klass t)") + +if (nsoverload(k, k) != 1020): + raise RuntimeError, ("nsoverload(Klass t, const Klass &)") + +if (nsoverload(k, "hello") != 1030): + raise RuntimeError, ("nsoverload(Klass t, const char *)") + +if (nsoverload(10.0, "hi") != 1040): + raise RuntimeError, ("nsoverload(double t, const char *)") + +if (nsoverload() != 1050): + raise RuntimeError, ("nsoverload(const char *)") + + |