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

gtest-435.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9add10976281e1af1e1be4928ec4e8262333b0a1 (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
30
31
32
33
34
35
36
37
38
using System;

namespace testcase
{
	public class Program
	{
		public static int Main ()
		{
			DateTime? dt = null;
			var res1 = default (DateTime?) == dt;
			if (!res1)
				return 5;

			DateTime? a = default (DateTime?);
			DateTime? b = default (DateTime?);
			bool res = a == b;
			if (!res)
				return 4;

			res = a != b;
			if (res)
				return 3;

			decimal? D1 = null;
			decimal? D2 = 7;

			if (D1 == D2) {
				Console.WriteLine ("null == 7  incorrect");
				return 1;
			} else if (D1 != D2) {
				Console.WriteLine ("null != 7  correct");
				return 0;
			}
			return 2;
		}
	}
}