Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-484.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea6e1914ac7a5ae6d11e179730daf49a002fb175 (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
using System;

namespace Test
{
        public class TestBit {
		const bool a00 = false & false;
		const bool a01 = false & true;
		const bool a10 = true  & false;
		const bool a11 = true  & true;

		const bool o00 = false | false;
		const bool o01 = false | true;
		const bool o10 = true  | false;
		const bool o11 = true  | true;

		const bool x00 = false ^ false;
		const bool x01 = false ^ true;
		const bool x10 = true  ^ false;
		const bool x11 = true  ^ true;

		const bool correct = !a00 & !a01 & !a10 & a11 & !o00 & o01 & o10 & o11 & !x00 & x01 & x10 & !x11;

                public static void Main()
                {
			if (!correct)
				throw new Exception ();
                }
        }
}