add iostream test

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6771 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-28 09:18:32 +00:00
commit 36bfc66486
4 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,32 @@
%module lib_std_stream
%include <std_iostream.i>
%pythoncallback(1) A::bar;
%inline %{
struct A
{
void __add__(int a)
{
}
void __add__(double a)
{
}
static int bar(int a){
return a;
}
static int foo(int a, int (*pf)(int a))
{
return pf(a);
}
};
%}

View file

@ -0,0 +1,10 @@
import lib_std_stream as std
std.cout << 2345 << " " << 1.435 << std.endl
std.endl(std.cout)
print "hello"
a = std.A()
print a.bar(2)
print a.foo(4, a.bar)