2 using System
.Collections
.Generic
;
10 enum SByteEnum
: sbyte {
14 enum ShortEnum
: short {
18 enum UShortEnum
: ushort {
26 enum UIntEnum
: uint {
30 enum LongEnum
: long {
34 enum ULongEnum
: ulong {
38 public enum YaddaYadda
{
44 public enum byteenum
: byte {
51 public enum longenum
: long {
56 public enum sbyteenum
: sbyte {
62 public static int test_0_basic_enum_vals ()
64 YaddaYadda val
= YaddaYadda
.dadoom
;
65 byteenum be
= byteenum
.one
;
66 if (val
!= YaddaYadda
.dadoom
)
68 if (be
!= (byteenum
)1)
73 public static int test_0_byte_enum_hashcode ()
75 if (ByteEnum
.A
.GetHashCode () != EqualityComparer
<ByteEnum
>.Default
.GetHashCode (ByteEnum
.A
))
77 if (ByteEnum
.A
.GetHashCode () != ((byte)ByteEnum
.A
).GetHashCode () )
82 public static int test_0_sbyte_enum_hashcode ()
84 if (SByteEnum
.A
.GetHashCode () != EqualityComparer
<SByteEnum
>.Default
.GetHashCode (SByteEnum
.A
))
86 if (SByteEnum
.A
.GetHashCode () != ((sbyte)SByteEnum
.A
).GetHashCode () )
91 public static int test_0_short_enum_hashcode ()
93 if (ShortEnum
.A
.GetHashCode () != EqualityComparer
<ShortEnum
>.Default
.GetHashCode (ShortEnum
.A
))
95 if (ShortEnum
.A
.GetHashCode () != ((short)ShortEnum
.A
).GetHashCode () )
100 public static int test_0_ushort_enum_hashcode ()
102 if (UShortEnum
.A
.GetHashCode () != EqualityComparer
<UShortEnum
>.Default
.GetHashCode (UShortEnum
.A
))
104 if (UShortEnum
.A
.GetHashCode () != ((ushort)UShortEnum
.A
).GetHashCode () )
109 public static int test_0_int_enum_hashcode ()
111 if (IntEnum
.A
.GetHashCode () != EqualityComparer
<IntEnum
>.Default
.GetHashCode (IntEnum
.A
))
113 if (IntEnum
.A
.GetHashCode () != ((int)IntEnum
.A
).GetHashCode () )
118 public static int test_0_uint_enum_hashcode ()
120 if (UIntEnum
.A
.GetHashCode () != EqualityComparer
<UIntEnum
>.Default
.GetHashCode (UIntEnum
.A
))
122 if (UIntEnum
.A
.GetHashCode () != ((uint)UIntEnum
.A
).GetHashCode () )
127 public static int test_0_long_enum_hashcode ()
129 if (LongEnum
.A
.GetHashCode () != EqualityComparer
<LongEnum
>.Default
.GetHashCode (LongEnum
.A
))
131 if (LongEnum
.A
.GetHashCode () != ((long)LongEnum
.A
).GetHashCode () )
136 public static int test_0_ulong_enum_hashcode ()
138 if (ULongEnum
.A
.GetHashCode () != EqualityComparer
<ULongEnum
>.Default
.GetHashCode (ULongEnum
.A
))
140 if (ULongEnum
.A
.GetHashCode () != ((ulong)ULongEnum
.A
).GetHashCode () )
145 public static int Main (String
[] args
) {
146 return TestDriver
.RunTests (typeof (Tests
), args
);