summaryrefslogtreecommitdiff
path: root/Examples/test-suite/csharp/bools_runme.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/csharp/bools_runme.cs')
-rw-r--r--Examples/test-suite/csharp/bools_runme.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/test-suite/csharp/bools_runme.cs b/Examples/test-suite/csharp/bools_runme.cs
new file mode 100644
index 0000000..70620fc
--- /dev/null
+++ b/Examples/test-suite/csharp/bools_runme.cs
@@ -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);
+ }
+ }
+
+ }
+}
+