summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2011-03-14 11:58:58 +0000
committerOlly Betts <olly@survex.com>2011-03-14 11:58:58 +0000
commit5d765893ed7caa951db3059804cc4d761612d2f3 (patch)
tree60a700699701ebdfb108d03881a38b4e72d4f33d
parentc61cc387bc8148b8ed6982f895b5d3bee409c7b1 (diff)
downloadswig-5d765893ed7caa951db3059804cc4d761612d2f3.tar.gz
Simplify test-suite/overload_return_type.i (checked that it still fails before
the fix it's a regression test for) and added _runme.php for it. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12538 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/overload_return_type.i11
-rw-r--r--Examples/test-suite/php/overload_return_type_runme.php10
2 files changed, 12 insertions, 9 deletions
diff --git a/Examples/test-suite/overload_return_type.i b/Examples/test-suite/overload_return_type.i
index 1e324c3e1..e6b3b130a 100644
--- a/Examples/test-suite/overload_return_type.i
+++ b/Examples/test-suite/overload_return_type.i
@@ -4,17 +4,10 @@
%inline %{
-#include <string>
-using namespace std;
class A { };
class B {
public:
- int foo(int x);
- A foo(string y);
+ int foo(int x) { return 0; }
+ A foo(const char * y) { return A(); }
};
%}
-
-%{
-int B::foo(int x) { return 0; }
-A B::foo(string y) { return A(); }
-%}
diff --git a/Examples/test-suite/php/overload_return_type_runme.php b/Examples/test-suite/php/overload_return_type_runme.php
new file mode 100644
index 000000000..84979e6a1
--- /dev/null
+++ b/Examples/test-suite/php/overload_return_type_runme.php
@@ -0,0 +1,10 @@
+<?php
+
+require "tests.php";
+require "overload_return_type.php";
+
+$b = new B;
+check::equal($b->foo(1), 0, "");
+check::classname("A", $b->foo("test"));
+
+?>