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

gtest-523.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7840a15b4e3d5ab51a671e52ff5e539d9dbedc04 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
using System;
using System.Collections.Generic;

namespace Test
{
	internal struct TestClass4<T> : IEquatable<TestClass4<T>>, IEquatable<T>, IEqualityComparer<TestClass4<T>> where T : class
	{
		public bool Equals (T obj)
		{
			return true;
		}

		public bool Equals (TestClass4<T> entry)
		{
			return true;
		}

		public bool Equals (TestClass4<T> x, TestClass4<T> y)
		{
			return x.Equals (y);
		}

		public int GetHashCode (TestClass4<T> obj)
		{
			return obj.GetHashCode ();
		}

		public override int GetHashCode ()
		{
			return 1;
		}

		public override bool Equals (object obj)
		{
			return false;
		}

		public static bool operator == (TestClass4<T> entry1, TestClass4<T> entry2)
		{
			return entry1.Equals (entry2);
		}

		public static bool operator == (T entry1, TestClass4<T> entry2)
		{
			return entry2.Equals (entry1);
		}

		public static bool operator == (TestClass4<T> entry1, T entry2)
		{
			return entry1.Equals (entry2);
		}

		public static bool operator == (object entry1, TestClass4<T> entry2)
		{
			return entry2.Equals (entry1);
		}

		public static bool operator == (TestClass4<T> entry1, object entry2)
		{
			return entry1.Equals (entry2);
		}

		public static bool operator != (TestClass4<T> entry1, TestClass4<T> entry2)
		{
			return !(entry1 == entry2);
		}

		public static bool operator != (T entry1, TestClass4<T> entry2)
		{
			return !(entry1 == entry2);
		}

		public static bool operator != (TestClass4<T> entry1, T entry2)
		{
			return !(entry1 == entry2);
		}

		public static bool operator != (object entry1, TestClass4<T> entry2)
		{
			return !(entry1 == entry2);
		}

		public static bool operator != (TestClass4<T> entry1, object entry2)
		{
			return !(entry1 == entry2);
		}
	}

	class C
	{
		public static void Main ()
		{
			new TestClass4<string> ();
		}
	}
}