test from Mark Traudt
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6060 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fd6676b31d
commit
b0127065d1
1 changed files with 29 additions and 0 deletions
29
SWIG/Examples/test-suite/csharp/bools_runme.cs
Executable file
29
SWIG/Examples/test-suite/csharp/bools_runme.cs
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
// This is the bool runtime testcase. It checks that the C++ bool type works.
|
||||
|
||||
using System;
|
||||
using boolsNamespace;
|
||||
|
||||
public class bools_runme {
|
||||
|
||||
public static void Main() {
|
||||
|
||||
bool t = true;
|
||||
bool f = false;
|
||||
|
||||
check_bo(f);
|
||||
check_bo(t);
|
||||
}
|
||||
|
||||
public static void check_bo(bool input) {
|
||||
|
||||
for( int i=0; i<1000; i++ ) {
|
||||
if( bools.bo(input) != input ) {
|
||||
string ErrorMessage = "Runtime test check_bo failed.";
|
||||
throw new Exception(ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue