some char * wrapping runtime tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5071 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c9bc204231
commit
12267cef8a
1 changed files with 33 additions and 0 deletions
33
SWIG/Examples/test-suite/csharp/constover_runme.cs
Normal file
33
SWIG/Examples/test-suite/csharp/constover_runme.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public class runme
|
||||||
|
{
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
string p = constover.test("test");
|
||||||
|
if ( p != "test" )
|
||||||
|
throw new Exception( "test failed!" );
|
||||||
|
|
||||||
|
p = constover.test_pconst("test");
|
||||||
|
if ( p != "test_pconst" )
|
||||||
|
throw new Exception( "test_pconst failed!" );
|
||||||
|
|
||||||
|
Foo f = new Foo();
|
||||||
|
p = f.test("test");
|
||||||
|
if ( p != "test" )
|
||||||
|
throw new Exception( "member-test failed!" );
|
||||||
|
|
||||||
|
p = f.test_pconst("test");
|
||||||
|
if ( p != "test_pconst" )
|
||||||
|
throw new Exception( "member-test_pconst failed!" );
|
||||||
|
|
||||||
|
p = f.test_constm("test");
|
||||||
|
if ( p != "test_constmethod" )
|
||||||
|
throw new Exception( "member-test_constm failed!" );
|
||||||
|
|
||||||
|
p = f.test_pconstm("test");
|
||||||
|
if ( p != "test_pconstmethod" )
|
||||||
|
throw new Exception( "member-test_pconstm failed!" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue