From 8f6616f79a5408b544a6964b3db0e63910fc16cb Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Thu, 8 Jan 2009 20:14:14 +0000 Subject: [PATCH] AssertHelperTest.TestAlmostEqualWithDoubles() was testing the same code twice - fixed; made use of Assert.AreSame() instead of manually calling object.ReferenceEquals() in the SharedTest class; fixed documentation referring to the custom WeakReference as the System.WeakReference class git-svn-id: file:///srv/devel/repo-conversion/nusu@112 d2e56fa2-650e-0410-a79f-9358c0239efd --- Source/AssertHelper.Test.cs | 2 +- Source/Shared.Test.cs | 4 +--- Source/WeakReference.cs | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Source/AssertHelper.Test.cs b/Source/AssertHelper.Test.cs index 0b3c4d9..6800050 100644 --- a/Source/AssertHelper.Test.cs +++ b/Source/AssertHelper.Test.cs @@ -64,7 +64,7 @@ namespace Nuclex.Support { [Test] public void TestAlmostEqualWithDoubles() { AssertHelper.AreAlmostEqual(exactDouble, minusOneDouble, 1); - AssertHelper.AreAlmostEqual(exactDouble, minusOneDouble, 1); + AssertHelper.AreAlmostEqual(exactDouble, plusOneDouble, 1); } /// diff --git a/Source/Shared.Test.cs b/Source/Shared.Test.cs index a1e94e5..17b59e4 100644 --- a/Source/Shared.Test.cs +++ b/Source/Shared.Test.cs @@ -58,9 +58,7 @@ namespace Nuclex.Support { // // Maybe this really is a defect in Shared<> and the class should be equipped with // a method such as Discard() or Dispose() to get rid of the instance? - Assert.IsTrue( - ReferenceEquals(dummyInstance, otherDummyInstance) - ); + Assert.AreSame(dummyInstance, otherDummyInstance); } } diff --git a/Source/WeakReference.cs b/Source/WeakReference.cs index 520c8dd..a8f3aba 100644 --- a/Source/WeakReference.cs +++ b/Source/WeakReference.cs @@ -33,7 +33,7 @@ namespace Nuclex.Support { where ReferencedType : class { /// - /// Initializes a new instance of the System.WeakReference class, referencing + /// Initializes a new instance of the WeakReference class, referencing /// the specified object. /// /// The object to track or null. @@ -41,7 +41,7 @@ namespace Nuclex.Support { : base(target) { } /// - /// Initializes a new instance of the System.WeakReference class, referencing + /// Initializes a new instance of the WeakReference class, referencing /// the specified object optionally using resurrection tracking. /// /// An object to track. @@ -53,7 +53,7 @@ namespace Nuclex.Support { : base(target, trackResurrection) { } /// - /// Initializes a new instance of the System.WeakReference class, using deserialized + /// Initializes a new instance of the WeakReference class, using deserialized /// data from the specified serialization and stream objects. /// /// @@ -71,7 +71,7 @@ namespace Nuclex.Support { : base(info, context) { } /// - /// Gets or sets the object (the target) referenced by the current System.WeakReference + /// Gets or sets the object (the target) referenced by the current WeakReference /// object. /// ///