summaryrefslogtreecommitdiff
path: root/Examples/test-suite/csharp/bools_runme.cs
blob: 70620fcef65d31cbfb6a4288af717020e2aec075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
			}
		}

  }
}