1
// ****************************************************************
2
// This is free software licensed under the NUnit license. You
3
// may obtain a copy of the license as well as information regarding
4
// copyright ownership at http://nunit.org.
5
// ****************************************************************
8
using System.Text.RegularExpressions;
9
using System.Globalization;
11
using System.Threading;
13
namespace NUnit.Framework.Tests
16
public class EqualsFixture : MessageChecker
21
string nunitString = "Hello NUnit";
22
string expected = nunitString;
23
string actual = nunitString;
25
Assert.IsTrue(expected == actual);
26
Assert.AreEqual(expected, actual);
30
public void EqualsNull()
32
Assert.AreEqual(null, null);
36
public void Bug575936Int32Int64Comparison()
40
Assert.AreEqual(i32, l64);
44
public void IntegerLongComparison()
46
Assert.AreEqual(1, 1L);
47
Assert.AreEqual(1L, 1);
51
public void IntegerEquals()
54
Assert.AreEqual(val, 42);
58
[Test,ExpectedException(typeof(AssertionException))]
59
public void EqualsFail()
61
string junitString = "Goodbye JUnit";
62
string expected = "Hello NUnit";
65
" Expected string length 11 but was 13. Strings differ at index 0." + Environment.NewLine +
66
" Expected: \"Hello NUnit\"" + Environment.NewLine +
67
" But was: \"Goodbye JUnit\"" + Environment.NewLine +
68
" -----------^" + Environment.NewLine;
69
Assert.AreEqual(expected, junitString);
72
[Test,ExpectedException(typeof(AssertionException))]
73
public void EqualsNaNFails()
76
" Expected: 1.234d +/- 0.0d" + Environment.NewLine +
77
" But was: NaN" + Environment.NewLine;
78
Assert.AreEqual(1.234, Double.NaN, 0.0);
83
[ExpectedException(typeof(AssertionException))]
84
public void NanEqualsFails()
87
" Expected: NaN" + Environment.NewLine +
88
" But was: 1.234d" + Environment.NewLine;
89
Assert.AreEqual(Double.NaN, 1.234, 0.0);
93
public void NanEqualsNaNSucceeds()
95
Assert.AreEqual(Double.NaN, Double.NaN, 0.0);
99
public void NegInfinityEqualsInfinity()
101
Assert.AreEqual(Double.NegativeInfinity, Double.NegativeInfinity, 0.0);
105
public void PosInfinityEqualsInfinity()
107
Assert.AreEqual(Double.PositiveInfinity, Double.PositiveInfinity, 0.0);
110
[Test,ExpectedException(typeof(AssertionException))]
111
public void PosInfinityNotEquals()
114
" Expected: Infinity" + Environment.NewLine +
115
" But was: 1.23d" + Environment.NewLine;
116
Assert.AreEqual(Double.PositiveInfinity, 1.23, 0.0);
119
[Test,ExpectedException(typeof(AssertionException))]
120
public void PosInfinityNotEqualsNegInfinity()
123
" Expected: Infinity" + Environment.NewLine +
124
" But was: -Infinity" + Environment.NewLine;
125
Assert.AreEqual(Double.PositiveInfinity, Double.NegativeInfinity, 0.0);
128
[Test,ExpectedException(typeof(AssertionException))]
129
public void SinglePosInfinityNotEqualsNegInfinity()
132
" Expected: Infinity" + Environment.NewLine +
133
" But was: -Infinity" + Environment.NewLine;
134
Assert.AreEqual(float.PositiveInfinity, float.NegativeInfinity, (float)0.0);
137
[Test,ExpectedException(typeof(AssertionException))]
138
public void EqualsThrowsException()
140
object o = new object();
144
[Test,ExpectedException(typeof(AssertionException))]
145
public void ReferenceEqualsThrowsException()
147
object o = new object();
148
Assert.ReferenceEquals(o, o);
154
float val = (float)1.0;
155
float expected = val;
158
Assert.IsTrue(expected == actual);
159
Assert.AreEqual(expected, actual, (float)0.0);
169
Assert.IsTrue(expected == actual);
170
Assert.AreEqual(expected, actual);
177
string s2 = new System.Text.StringBuilder(s1).ToString();
179
Assert.IsTrue(s1.Equals(s2));
180
Assert.AreEqual(s1,s2);
187
short expected = val;
190
Assert.IsTrue(expected == actual);
191
Assert.AreEqual(expected, actual);
201
Assert.IsTrue(expected == actual);
202
Assert.AreEqual(expected, actual);
212
Assert.IsTrue(expected == actual);
213
Assert.AreEqual(expected, actual);
217
public void Decimal()
219
decimal expected = 100m;
220
decimal actual = 100.0m;
223
Assert.IsTrue( expected == actual );
224
Assert.AreEqual(expected, actual);
225
Assert.IsTrue(expected == integer);
226
Assert.AreEqual(expected, integer);
227
Assert.IsTrue(actual == integer);
228
Assert.AreEqual(actual, integer);
234
/// Checks to see that a value comparison works with all types.
235
/// Current version has problems when value is the same but the
236
/// types are different...C# is not like Java, and doesn't automatically
237
/// perform value type conversion to simplify this type of comparison.
239
/// Related to Bug575936Int32Int64Comparison, but covers all numeric
243
public void EqualsSameTypes()
256
System.Byte b12 = 35;
257
System.SByte sb13 = 35;
258
System.Decimal d14 = 35;
259
System.Double d15 = 35;
260
System.Single s16 = 35;
261
System.Int32 i17 = 35;
262
System.UInt32 ui18 = 35;
263
System.Int64 i19 = 35;
264
System.UInt64 ui20 = 35;
265
System.Int16 i21 = 35;
266
System.UInt16 i22 = 35;
268
Assert.AreEqual(35, b1);
269
Assert.AreEqual(35, sb2);
270
Assert.AreEqual(35, d4);
271
Assert.AreEqual(35, d5);
272
Assert.AreEqual(35, f6);
273
Assert.AreEqual(35, i7);
274
Assert.AreEqual(35, u8);
275
Assert.AreEqual(35, l9);
276
Assert.AreEqual(35, s10);
277
Assert.AreEqual(35, us11);
279
Assert.AreEqual( 35, b12 );
280
Assert.AreEqual( 35, sb13 );
281
Assert.AreEqual( 35, d14 );
282
Assert.AreEqual( 35, d15 );
283
Assert.AreEqual( 35, s16 );
284
Assert.AreEqual( 35, i17 );
285
Assert.AreEqual( 35, ui18 );
286
Assert.AreEqual( 35, i19 );
287
Assert.AreEqual( 35, ui20 );
288
Assert.AreEqual( 35, i21 );
289
Assert.AreEqual( 35, i22 );
291
#if CLR_2_0 || CLR_4_0
303
Assert.AreEqual(35, b23);
304
Assert.AreEqual(35, sb24);
305
Assert.AreEqual(35, d25);
306
Assert.AreEqual(35, d26);
307
Assert.AreEqual(35, f27);
308
Assert.AreEqual(35, i28);
309
Assert.AreEqual(35, u29);
310
Assert.AreEqual(35, l30);
311
Assert.AreEqual(35, s31);
312
Assert.AreEqual(35, us32);
317
public void EnumsEqual()
319
MyEnum actual = MyEnum.a;
320
Assert.AreEqual( MyEnum.a, actual );
323
[Test, ExpectedException( typeof(AssertionException) )]
324
public void EnumsNotEqual()
326
MyEnum actual = MyEnum.a;
328
" Expected: c" + Environment.NewLine +
329
" But was: a" + Environment.NewLine;
330
Assert.AreEqual( MyEnum.c, actual );
334
public void DateTimeEqual()
336
DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
337
DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 ) + TimeSpan.FromHours( 7.0 );
338
Assert.AreEqual( dt1, dt2 );
341
[Test, ExpectedException( typeof (AssertionException) )]
342
public void DateTimeNotEqual()
344
DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
345
DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 );
347
" Expected: 2005-06-01 07:00:00.000" + Environment.NewLine +
348
" But was: 2005-06-01 00:00:00.000" + Environment.NewLine;
349
Assert.AreEqual(dt1, dt2);
358
public void DoubleNotEqualMessageDisplaysAllDigits()
365
double d2 = 36.099999999999994;
366
Assert.AreEqual( d1, d2 );
368
catch(AssertionException ex)
370
message = ex.Message;
374
Assert.Fail( "Should have thrown an AssertionException" );
376
int i = message.IndexOf('3');
377
int j = message.IndexOf( 'd', i );
378
string expected = message.Substring( i, j - i + 1 );
379
i = message.IndexOf( '3', j );
380
j = message.IndexOf( 'd', i );
381
string actual = message.Substring( i , j - i + 1 );
382
Assert.AreNotEqual( expected, actual );
386
public void FloatNotEqualMessageDisplaysAllDigits()
393
float f2 = 36.125004F;
394
Assert.AreEqual( f1, f2 );
396
catch(AssertionException ex)
398
message = ex.Message;
402
Assert.Fail( "Should have thrown an AssertionException" );
404
int i = message.IndexOf( '3' );
405
int j = message.IndexOf( 'f', i );
406
string expected = message.Substring( i, j - i + 1 );
407
i = message.IndexOf( '3', j );
408
j = message.IndexOf( 'f', i );
409
string actual = message.Substring( i, j - i + 1 );
410
Assert.AreNotEqual( expected, actual );
414
public void DoubleNotEqualMessageDisplaysTolerance()
423
Assert.AreEqual(d1, d2, tol);
425
catch (AssertionException ex)
427
message = ex.Message;
431
Assert.Fail("Should have thrown an AssertionException");
433
StringAssert.Contains("+/- 0.005", message);
437
public void FloatNotEqualMessageDisplaysTolerance()
446
Assert.AreEqual( f1, f2, tol );
448
catch( AssertionException ex )
450
message = ex.Message;
454
Assert.Fail( "Should have thrown an AssertionException" );
456
StringAssert.Contains( "+/- 0.001", message );
460
public void DoubleNotEqualMessageDisplaysDefaultTolerance()
463
GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
469
Assert.AreEqual(d1, d2);
471
catch (AssertionException ex)
473
message = ex.Message;
477
GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
481
Assert.Fail("Should have thrown an AssertionException");
483
StringAssert.Contains("+/- 0.005", message);
487
public void DoubleNotEqualWithNanDoesNotDisplayDefaultTolerance()
490
GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
494
double d1 = double.NaN;
496
Assert.AreEqual(d1, d2);
498
catch (AssertionException ex)
500
message = ex.Message;
504
GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
508
Assert.Fail("Should have thrown an AssertionException");
510
Assert.That(message.IndexOf("+/-") == -1);
514
public void DirectoryInfoEquality()
516
string path = Environment.CurrentDirectory;
517
DirectoryInfo dir1 = new DirectoryInfo(path);
518
DirectoryInfo dir2 = new DirectoryInfo(path);
520
Assert.AreEqual(dir1, dir2);
524
public void DirectoryInfoEqualityIgnoresTrailingDirectorySeparator()
526
string path1 = Environment.CurrentDirectory;
527
string path2 = path1;
528
int length = path1.Length;
530
if (path1[length - 1] == Path.DirectorySeparatorChar)
531
path1 = path1.Substring(0, length - 1);
533
path1 += Path.DirectorySeparatorChar;
535
DirectoryInfo dir1 = new DirectoryInfo(path1);
536
DirectoryInfo dir2 = new DirectoryInfo(path2);
538
Assert.AreEqual(dir1, dir2);
541
#if CLR_2_0 || CLR_4_0
543
public void IEquatableSuccess_OldSyntax()
545
IntEquatable a = new IntEquatable(1);
547
Assert.AreEqual(1, a);
548
Assert.AreEqual(a, 1);
552
public void IEquatableSuccess_ConstraintSyntax()
554
IntEquatable a = new IntEquatable(1);
556
Assert.That(a, Is.EqualTo(1));
557
Assert.That(1, Is.EqualTo(a));
562
#if CLR_2_0 || CLR_4_0
563
public class IntEquatable : IEquatable<int>
567
public IntEquatable(int i)
572
public bool Equals(int other)
574
return i.Equals(other);
1
// ****************************************************************
2
// This is free software licensed under the NUnit license. You
3
// may obtain a copy of the license as well as information regarding
4
// copyright ownership at http://nunit.org.
5
// ****************************************************************
8
using System.Text.RegularExpressions;
9
using System.Globalization;
11
using System.Threading;
13
namespace NUnit.Framework.Tests
16
public class EqualsFixture : MessageChecker
21
string nunitString = "Hello NUnit";
22
string expected = nunitString;
23
string actual = nunitString;
25
Assert.IsTrue(expected == actual);
26
Assert.AreEqual(expected, actual);
30
public void EqualsNull()
32
Assert.AreEqual(null, null);
36
public void Bug575936Int32Int64Comparison()
40
Assert.AreEqual(i32, l64);
44
public void IntegerLongComparison()
46
Assert.AreEqual(1, 1L);
47
Assert.AreEqual(1L, 1);
51
public void IntegerEquals()
54
Assert.AreEqual(val, 42);
58
[Test,ExpectedException(typeof(AssertionException))]
59
public void EqualsFail()
61
string junitString = "Goodbye JUnit";
62
string expected = "Hello NUnit";
65
" Expected string length 11 but was 13. Strings differ at index 0." + Environment.NewLine +
66
" Expected: \"Hello NUnit\"" + Environment.NewLine +
67
" But was: \"Goodbye JUnit\"" + Environment.NewLine +
68
" -----------^" + Environment.NewLine;
69
Assert.AreEqual(expected, junitString);
72
[Test,ExpectedException(typeof(AssertionException))]
73
public void EqualsNaNFails()
76
" Expected: 1.234d +/- 0.0d" + Environment.NewLine +
77
" But was: NaN" + Environment.NewLine;
78
Assert.AreEqual(1.234, Double.NaN, 0.0);
83
[ExpectedException(typeof(AssertionException))]
84
public void NanEqualsFails()
87
" Expected: NaN" + Environment.NewLine +
88
" But was: 1.234d" + Environment.NewLine;
89
Assert.AreEqual(Double.NaN, 1.234, 0.0);
93
public void NanEqualsNaNSucceeds()
95
Assert.AreEqual(Double.NaN, Double.NaN, 0.0);
99
public void NegInfinityEqualsInfinity()
101
Assert.AreEqual(Double.NegativeInfinity, Double.NegativeInfinity, 0.0);
105
public void PosInfinityEqualsInfinity()
107
Assert.AreEqual(Double.PositiveInfinity, Double.PositiveInfinity, 0.0);
110
[Test,ExpectedException(typeof(AssertionException))]
111
public void PosInfinityNotEquals()
114
" Expected: Infinity" + Environment.NewLine +
115
" But was: 1.23d" + Environment.NewLine;
116
Assert.AreEqual(Double.PositiveInfinity, 1.23, 0.0);
119
[Test,ExpectedException(typeof(AssertionException))]
120
public void PosInfinityNotEqualsNegInfinity()
123
" Expected: Infinity" + Environment.NewLine +
124
" But was: -Infinity" + Environment.NewLine;
125
Assert.AreEqual(Double.PositiveInfinity, Double.NegativeInfinity, 0.0);
128
[Test,ExpectedException(typeof(AssertionException))]
129
public void SinglePosInfinityNotEqualsNegInfinity()
132
" Expected: Infinity" + Environment.NewLine +
133
" But was: -Infinity" + Environment.NewLine;
134
Assert.AreEqual(float.PositiveInfinity, float.NegativeInfinity, (float)0.0);
137
[Test,ExpectedException(typeof(InvalidOperationException))]
138
public void EqualsThrowsException()
140
object o = new object();
144
[Test,ExpectedException(typeof(InvalidOperationException))]
145
public void ReferenceEqualsThrowsException()
147
object o = new object();
148
Assert.ReferenceEquals(o, o);
154
float val = (float)1.0;
155
float expected = val;
158
Assert.IsTrue(expected == actual);
159
Assert.AreEqual(expected, actual, (float)0.0);
169
Assert.IsTrue(expected == actual);
170
Assert.AreEqual(expected, actual);
177
string s2 = new System.Text.StringBuilder(s1).ToString();
179
Assert.IsTrue(s1.Equals(s2));
180
Assert.AreEqual(s1,s2);
187
short expected = val;
190
Assert.IsTrue(expected == actual);
191
Assert.AreEqual(expected, actual);
201
Assert.IsTrue(expected == actual);
202
Assert.AreEqual(expected, actual);
212
Assert.IsTrue(expected == actual);
213
Assert.AreEqual(expected, actual);
217
public void Decimal()
219
decimal expected = 100m;
220
decimal actual = 100.0m;
223
Assert.IsTrue( expected == actual );
224
Assert.AreEqual(expected, actual);
225
Assert.IsTrue(expected == integer);
226
Assert.AreEqual(expected, integer);
227
Assert.IsTrue(actual == integer);
228
Assert.AreEqual(actual, integer);
234
/// Checks to see that a value comparison works with all types.
235
/// Current version has problems when value is the same but the
236
/// types are different...C# is not like Java, and doesn't automatically
237
/// perform value type conversion to simplify this type of comparison.
239
/// Related to Bug575936Int32Int64Comparison, but covers all numeric
243
public void EqualsSameTypes()
256
System.Byte b12 = 35;
257
System.SByte sb13 = 35;
258
System.Decimal d14 = 35;
259
System.Double d15 = 35;
260
System.Single s16 = 35;
261
System.Int32 i17 = 35;
262
System.UInt32 ui18 = 35;
263
System.Int64 i19 = 35;
264
System.UInt64 ui20 = 35;
265
System.Int16 i21 = 35;
266
System.UInt16 i22 = 35;
268
Assert.AreEqual(35, b1);
269
Assert.AreEqual(35, sb2);
270
Assert.AreEqual(35, d4);
271
Assert.AreEqual(35, d5);
272
Assert.AreEqual(35, f6);
273
Assert.AreEqual(35, i7);
274
Assert.AreEqual(35, u8);
275
Assert.AreEqual(35, l9);
276
Assert.AreEqual(35, s10);
277
Assert.AreEqual(35, us11);
279
Assert.AreEqual( 35, b12 );
280
Assert.AreEqual( 35, sb13 );
281
Assert.AreEqual( 35, d14 );
282
Assert.AreEqual( 35, d15 );
283
Assert.AreEqual( 35, s16 );
284
Assert.AreEqual( 35, i17 );
285
Assert.AreEqual( 35, ui18 );
286
Assert.AreEqual( 35, i19 );
287
Assert.AreEqual( 35, ui20 );
288
Assert.AreEqual( 35, i21 );
289
Assert.AreEqual( 35, i22 );
291
#if CLR_2_0 || CLR_4_0
303
Assert.AreEqual(35, b23);
304
Assert.AreEqual(35, sb24);
305
Assert.AreEqual(35, d25);
306
Assert.AreEqual(35, d26);
307
Assert.AreEqual(35, f27);
308
Assert.AreEqual(35, i28);
309
Assert.AreEqual(35, u29);
310
Assert.AreEqual(35, l30);
311
Assert.AreEqual(35, s31);
312
Assert.AreEqual(35, us32);
317
public void EnumsEqual()
319
MyEnum actual = MyEnum.a;
320
Assert.AreEqual( MyEnum.a, actual );
323
[Test, ExpectedException( typeof(AssertionException) )]
324
public void EnumsNotEqual()
326
MyEnum actual = MyEnum.a;
328
" Expected: c" + Environment.NewLine +
329
" But was: a" + Environment.NewLine;
330
Assert.AreEqual( MyEnum.c, actual );
334
public void DateTimeEqual()
336
DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
337
DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 ) + TimeSpan.FromHours( 7.0 );
338
Assert.AreEqual( dt1, dt2 );
341
[Test, ExpectedException( typeof (AssertionException) )]
342
public void DateTimeNotEqual()
344
DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
345
DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 );
347
" Expected: 2005-06-01 07:00:00.000" + Environment.NewLine +
348
" But was: 2005-06-01 00:00:00.000" + Environment.NewLine;
349
Assert.AreEqual(dt1, dt2);
358
public void DoubleNotEqualMessageDisplaysAllDigits()
365
double d2 = 36.099999999999994;
366
Assert.AreEqual( d1, d2 );
368
catch(AssertionException ex)
370
message = ex.Message;
374
Assert.Fail( "Should have thrown an AssertionException" );
376
int i = message.IndexOf('3');
377
int j = message.IndexOf( 'd', i );
378
string expected = message.Substring( i, j - i + 1 );
379
i = message.IndexOf( '3', j );
380
j = message.IndexOf( 'd', i );
381
string actual = message.Substring( i , j - i + 1 );
382
Assert.AreNotEqual( expected, actual );
386
public void FloatNotEqualMessageDisplaysAllDigits()
393
float f2 = 36.125004F;
394
Assert.AreEqual( f1, f2 );
396
catch(AssertionException ex)
398
message = ex.Message;
402
Assert.Fail( "Should have thrown an AssertionException" );
404
int i = message.IndexOf( '3' );
405
int j = message.IndexOf( 'f', i );
406
string expected = message.Substring( i, j - i + 1 );
407
i = message.IndexOf( '3', j );
408
j = message.IndexOf( 'f', i );
409
string actual = message.Substring( i, j - i + 1 );
410
Assert.AreNotEqual( expected, actual );
414
public void DoubleNotEqualMessageDisplaysTolerance()
423
Assert.AreEqual(d1, d2, tol);
425
catch (AssertionException ex)
427
message = ex.Message;
431
Assert.Fail("Should have thrown an AssertionException");
433
StringAssert.Contains("+/- 0.005", message);
437
public void FloatNotEqualMessageDisplaysTolerance()
446
Assert.AreEqual( f1, f2, tol );
448
catch( AssertionException ex )
450
message = ex.Message;
454
Assert.Fail( "Should have thrown an AssertionException" );
456
StringAssert.Contains( "+/- 0.001", message );
460
public void DoubleNotEqualMessageDisplaysDefaultTolerance()
463
GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
469
Assert.AreEqual(d1, d2);
471
catch (AssertionException ex)
473
message = ex.Message;
477
GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
481
Assert.Fail("Should have thrown an AssertionException");
483
StringAssert.Contains("+/- 0.005", message);
487
public void DoubleNotEqualWithNanDoesNotDisplayDefaultTolerance()
490
GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
494
double d1 = double.NaN;
496
Assert.AreEqual(d1, d2);
498
catch (AssertionException ex)
500
message = ex.Message;
504
GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
508
Assert.Fail("Should have thrown an AssertionException");
510
Assert.That(message.IndexOf("+/-") == -1);
514
public void DirectoryInfoEquality()
516
string path = Environment.CurrentDirectory;
517
DirectoryInfo dir1 = new DirectoryInfo(path);
518
DirectoryInfo dir2 = new DirectoryInfo(path);
520
Assert.AreEqual(dir1, dir2);
524
public void DirectoryInfoEqualityIgnoresTrailingDirectorySeparator()
526
string path1 = Environment.CurrentDirectory;
527
string path2 = path1;
528
int length = path1.Length;
530
if (path1[length - 1] == Path.DirectorySeparatorChar)
531
path1 = path1.Substring(0, length - 1);
533
path1 += Path.DirectorySeparatorChar;
535
DirectoryInfo dir1 = new DirectoryInfo(path1);
536
DirectoryInfo dir2 = new DirectoryInfo(path2);
538
Assert.AreEqual(dir1, dir2);
541
#if CLR_2_0 || CLR_4_0
543
public void IEquatableSuccess_OldSyntax()
545
IntEquatable a = new IntEquatable(1);
547
Assert.AreEqual(1, a);
548
Assert.AreEqual(a, 1);
552
public void IEquatableSuccess_ConstraintSyntax()
554
IntEquatable a = new IntEquatable(1);
556
Assert.That(a, Is.EqualTo(1));
557
Assert.That(1, Is.EqualTo(a));
562
#if CLR_2_0 || CLR_4_0
563
public class IntEquatable : IEquatable<int>
567
public IntEquatable(int i)
572
public bool Equals(int other)
574
return i.Equals(other);
b'\\ No newline at end of file'