User: xtoff
Date: 2010/01/06 02:39 PM
Modified:
/Core/trunk/src/Castle.Core.Tests/
LinkedListTestCase.cs
/Core/trunk/src/Castle.Core/Internal/
LinkedList.cs
Log:
- fixed CORE-ISSUE-26 - "Bug in LinkedList AddFirst" with patch from Simone
Busoli
File Changes:
Directory: /Core/trunk/src/Castle.Core.Tests/
=============================================
File [modified]: LinkedListTestCase.cs
Delta lines: +0 -0
===================================================================
Directory: /Core/trunk/src/Castle.Core/Internal/
================================================
File [modified]: LinkedList.cs
Delta lines: +15 -0
===================================================================
--- Core/trunk/src/Castle.Core.Tests/LinkedListTestCase.cs 2010-01-06
16:34:28 UTC (rev 6589)
+++ Core/trunk/src/Castle.Core.Tests/LinkedListTestCase.cs 2010-01-06
21:39:00 UTC (rev 6590)
@@ -247,6 +247,21 @@
}
[Test]
+ public void Insert1_AfterReplacingHeadWithAddFirst()
+ {
+ LinkedList list = new LinkedList();
+
+ list.Add("2");
+ list.AddFirst("1");
+ list.Insert(1, "x");
+
+ Assert.AreEqual(3, list.Count);
+
+ String[] array = (String[])list.ToArray(typeof(String));
+ Assert.AreEqual("1,x,2", String.Join(",", array));
+ }
+
+ [Test]
public void Insert2()
{
--
You received this message because you are subscribed to the Google Groups
"Castle Project Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-commits?hl=en.