Update C5 to version 1.1.1
authorMarek Safar <marek.safar@gmail.com>
Sun, 23 Jan 2011 19:10:41 +0000 (19:10 +0000)
committerMarek Safar <marek.safar@gmail.com>
Mon, 24 Jan 2011 13:58:10 +0000 (13:58 +0000)
22 files changed:
mcs/class/Mono.C5/C5.sln
mcs/class/Mono.C5/C5/.gitattributes [new file with mode: 0644]
mcs/class/Mono.C5/C5/AssemblyInfo.cs
mcs/class/Mono.C5/C5/C5.csproj
mcs/class/Mono.C5/C5/ClsdiagWork.png [deleted file]
mcs/class/Mono.C5/C5/Collections.cs
mcs/class/Mono.C5/C5/hashing/HashTable.cs
mcs/class/Mono.C5/C5/heaps/IntervalHeap.cs
mcs/class/Mono.C5/C5/trees/.cvsignore [deleted file]
mcs/class/Mono.C5/C5/trees/RedBlackTreeBag.cs
mcs/class/Mono.C5/C5/trees/RedBlackTreeSet.cs
mcs/class/Mono.C5/RELEASE-NOTES.txt [new file with mode: 0644]
mcs/class/Mono.C5/Test/BasesTest.cs
mcs/class/Mono.C5/Test/SupportClasses.cs
mcs/class/Mono.C5/Test/arrays/SortedArrayTests.cs
mcs/class/Mono.C5/Test/hashing/HashDictionaryTests.cs
mcs/class/Mono.C5/Test/hashing/HashTableTests.cs
mcs/class/Mono.C5/Test/heaps/HeapTests.cs
mcs/class/Mono.C5/Test/nunit.csproj
mcs/class/Mono.C5/Test/trees/Bag.cs
mcs/class/Mono.C5/Test/trees/Dictionary.cs
mcs/class/Mono.C5/Test/trees/RedBlackTreeSetTests.cs

index e94773d6ffa9d99831c0209a5af4f85928a3a3c5..f6add3c878a050cca0c296fa5dc2d369630d69ba 100644 (file)
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C5", "C5\C5.csproj", "{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}"
-       ProjectSection(ProjectDependencies) = postProject
-               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F} = {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}
-       EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\nunit.csproj", "{08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserGuideExamples", "UserGuideExamples\UserGuideExamples.csproj", "{B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Debug|Mixed platforms = Debug|Mixed platforms
-               Debug|Win32 = Debug|Win32
-               Release|Any CPU = Release|Any CPU
-               Release|Mixed platforms = Release|Mixed platforms
-               Release|Win32 = Release|Win32
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Win32.ActiveCfg = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Win32.Build.0 = Debug|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Mixed platforms.ActiveCfg = Release|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Mixed platforms.Build.0 = Release|Any CPU
-               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Win32.ActiveCfg = Release|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Win32.ActiveCfg = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Win32.Build.0 = Debug|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Any CPU.Build.0 = Release|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Mixed platforms.ActiveCfg = Release|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Mixed platforms.Build.0 = Release|Any CPU
-               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Win32.ActiveCfg = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C5", "C5\C5.csproj", "{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F} = {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}\r
+       EndProjectSection\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit", "nunit\nunit.csproj", "{08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docNet", "docNet\docNet.csproj", "{42811A81-6A99-4C7A-A6DA-DF104C767B72}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserGuideExamples", "UserGuideExamples\UserGuideExamples.csproj", "{B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PreProcess", "PreProcess\PreProcess.csproj", "{6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Debug|Mixed platforms = Debug|Mixed platforms\r
+               Debug|Win32 = Debug|Win32\r
+               DebugSnk|Any CPU = DebugSnk|Any CPU\r
+               DebugSnk|Mixed platforms = DebugSnk|Mixed platforms\r
+               DebugSnk|Win32 = DebugSnk|Win32\r
+               Release|Any CPU = Release|Any CPU\r
+               Release|Mixed platforms = Release|Mixed platforms\r
+               Release|Win32 = Release|Win32\r
+               ReleaseSnk|Any CPU = ReleaseSnk|Any CPU\r
+               ReleaseSnk|Mixed platforms = ReleaseSnk|Mixed platforms\r
+               ReleaseSnk|Win32 = ReleaseSnk|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Mixed platforms.Build.0 = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Win32.Build.0 = Debug|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Mixed platforms.ActiveCfg = Release|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Mixed platforms.Build.0 = Release|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Win32.ActiveCfg = Release|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU\r
+               {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Mixed platforms.Build.0 = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Debug|Win32.Build.0 = Debug|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Mixed platforms.ActiveCfg = Release|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Mixed platforms.Build.0 = Release|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.Release|Win32.ActiveCfg = Release|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU\r
+               {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Mixed platforms.Build.0 = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Win32.Build.0 = Debug|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Mixed platforms.ActiveCfg = Release|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Mixed platforms.Build.0 = Release|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Win32.ActiveCfg = Release|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU\r
+               {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Mixed platforms.Build.0 = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Debug|Win32.Build.0 = Debug|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Mixed platforms.ActiveCfg = Release|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Mixed platforms.Build.0 = Release|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.Release|Win32.ActiveCfg = Release|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU\r
+               {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Mixed platforms.Build.0 = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Win32.ActiveCfg = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Win32.Build.0 = Debug|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Mixed platforms.ActiveCfg = Release|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Mixed platforms.Build.0 = Release|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Win32.ActiveCfg = Release|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU\r
+               {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/mcs/class/Mono.C5/C5/.gitattributes b/mcs/class/Mono.C5/C5/.gitattributes
new file mode 100644 (file)
index 0000000..aedb600
--- /dev/null
@@ -0,0 +1 @@
+C5.csproj -crlf
index 7ffe0d36eb232e409a36b90b6bab75df412d2634..b9e028c43328b35dd25a76fee3ac244b26761e06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright (c) 2003-2007 Niels Kokholm and Peter Sestoft
+ Copyright (c) 2003-2010 Niels Kokholm and Peter Sestoft
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
@@ -29,11 +29,11 @@ using System;
 // associated with an assembly.
 //
 [assembly: AssemblyTitle("C5: Copenhagen Comprehensive Collection Classes for CLI")]
-[assembly: AssemblyDescription("This is a build of release 1.1.0")]
+[assembly: AssemblyDescription("This is a build of release 1.1.1")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("(c) 2003-2008 Niels Kokholm and Peter Sestoft")]
+[assembly: AssemblyCopyright("(c) 2003-2010 Niels Kokholm and Peter Sestoft")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
@@ -48,7 +48,7 @@ using System;
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("1.1.0")]
+[assembly: AssemblyVersion("1.1.1")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 
index e01de642ecf29e44d95d08e1a1b77216e1f2b4a5..f1a4feef2097f57c74718e562a7f42b2dadf55b6 100644 (file)
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <ProductVersion>9.0.21022</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <RootNamespace>C5</RootNamespace>
-    <NoStandardLibraries>false</NoStandardLibraries>
-    <AssemblyName>C5</AssemblyName>
-    <SignAssembly>false</SignAssembly>
-    <AssemblyOriginatorKeyFile>
-    </AssemblyOriginatorKeyFile>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <UpgradeBackupLocation>
-    </UpgradeBackupLocation>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <StartupObject>
-    </StartupObject>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <DocumentationFile>c5.xml</DocumentationFile>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugSnk|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\DebugSnk\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;STRONGNAME</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseSnk|AnyCPU' ">
-    <OutputPath>bin\ReleaseSnk\</OutputPath>
-    <DefineConstants>TRACE;STRONGNAME</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System">
-    </Reference>
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="arrays\CircularQueue.cs" />
-    <Compile Include="arrays\HashedArrayList.cs" />
-    <Compile Include="AssemblyInfo.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Attributes.cs" />
-    <Compile Include="Builtin.cs" />
-    <Compile Include="Comparer.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Delegates.cs" />
-    <Compile Include="Enums.cs" />
-    <Compile Include="Exceptions.cs" />
-    <Compile Include="Formatting.cs" />
-    <Compile Include="Hashers.cs" />
-    <Compile Include="Events.cs" />
-    <Compile Include="Collections.cs">
-    </Compile>
-    <Compile Include="Dictionaries.cs">
-    </Compile>
-    <Compile Include="Interfaces.cs">
-    </Compile>
-    <Compile Include="linkedlists\HashedLinkedList.cs" />
-    <Compile Include="Random.cs" />
-    <Compile Include="Records.cs" />
-    <Compile Include="Sorting.cs" />
-    <Compile Include="ViewSupport.cs" />
-    <Compile Include="MappedEnumerators.cs" />
-    <Compile Include="WrappedArray.cs" />
-    <Compile Include="Wrappers.cs">
-    </Compile>
-    <Compile Include="arrays\ArrayList.cs">
-    </Compile>
-    <Compile Include="arrays\SortedArray.cs">
-    </Compile>
-    <Compile Include="hashing\HashBag.cs">
-    </Compile>
-    <Compile Include="hashing\HashDictionary.cs">
-    </Compile>
-    <Compile Include="hashing\HashTable.cs">
-    </Compile>
-    <Compile Include="heaps\IntervalHeap.cs">
-    </Compile>
-    <Compile Include="linkedlists\LinkedList.cs">
-    </Compile>
-    <Compile Include="trees\RedBlackTreeSet.cs">
-    </Compile>
-    <Compile Include="trees\RedBlackTreeBag.cs">
-    </Compile>
-    <Compile Include="trees\RedBlackTreeDictionary.cs">
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
-  <PropertyGroup>
-    <PreBuildEvent>"$(SolutionDir)PreProcess\$(OutDir)PreProcess.exe"</PreBuildEvent>
-    <PostBuildEvent>
-    </PostBuildEvent>
-  </PropertyGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <RootNamespace>C5</RootNamespace>\r
+    <NoStandardLibraries>false</NoStandardLibraries>\r
+    <AssemblyName>C5</AssemblyName>\r
+    <SignAssembly>false</SignAssembly>\r
+    <AssemblyOriginatorKeyFile>\r
+    </AssemblyOriginatorKeyFile>\r
+    <FileUpgradeFlags>\r
+    </FileUpgradeFlags>\r
+    <UpgradeBackupLocation>\r
+    </UpgradeBackupLocation>\r
+    <OldToolsVersion>3.5</OldToolsVersion>\r
+    <StartupObject>\r
+    </StartupObject>\r
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <DocumentationFile>c5.xml</DocumentationFile>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugSnk|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\DebugSnk\</OutputPath>\r
+    <DefineConstants>TRACE;DEBUG;STRONGNAME</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseSnk|AnyCPU' ">\r
+    <OutputPath>bin\ReleaseSnk\</OutputPath>\r
+    <DefineConstants>TRACE;STRONGNAME</DefineConstants>\r
+    <Optimize>true</Optimize>\r
+    <DebugType>pdbonly</DebugType>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Reference Include="System">\r
+    </Reference>\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Xml" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="arrays\CircularQueue.cs" />\r
+    <Compile Include="arrays\HashedArrayList.cs" />\r
+    <Compile Include="AssemblyInfo.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="Attributes.cs" />\r
+    <Compile Include="Builtin.cs" />\r
+    <Compile Include="Comparer.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="Delegates.cs" />\r
+    <Compile Include="Enums.cs" />\r
+    <Compile Include="Exceptions.cs" />\r
+    <Compile Include="Formatting.cs" />\r
+    <Compile Include="Hashers.cs" />\r
+    <Compile Include="Events.cs" />\r
+    <Compile Include="Collections.cs">\r
+    </Compile>\r
+    <Compile Include="Dictionaries.cs">\r
+    </Compile>\r
+    <Compile Include="Interfaces.cs">\r
+    </Compile>\r
+    <Compile Include="linkedlists\HashedLinkedList.cs" />\r
+    <Compile Include="Random.cs" />\r
+    <Compile Include="Records.cs" />\r
+    <Compile Include="Sorting.cs" />\r
+    <Compile Include="ViewSupport.cs" />\r
+    <Compile Include="MappedEnumerators.cs" />\r
+    <Compile Include="WrappedArray.cs" />\r
+    <Compile Include="Wrappers.cs">\r
+    </Compile>\r
+    <Compile Include="arrays\ArrayList.cs">\r
+    </Compile>\r
+    <Compile Include="arrays\SortedArray.cs">\r
+    </Compile>\r
+    <Compile Include="hashing\HashBag.cs">\r
+    </Compile>\r
+    <Compile Include="hashing\HashDictionary.cs">\r
+    </Compile>\r
+    <Compile Include="hashing\HashTable.cs">\r
+    </Compile>\r
+    <Compile Include="heaps\IntervalHeap.cs">\r
+    </Compile>\r
+    <Compile Include="linkedlists\LinkedList.cs">\r
+    </Compile>\r
+    <Compile Include="trees\RedBlackTreeSet.cs">\r
+    </Compile>\r
+    <Compile Include="trees\RedBlackTreeBag.cs">\r
+    </Compile>\r
+    <Compile Include="trees\RedBlackTreeDictionary.cs">\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />\r
+  <PropertyGroup>\r
+    <PreBuildEvent>"$(SolutionDir)PreProcess\$(OutDir)PreProcess.exe"</PreBuildEvent>\r
+    <PostBuildEvent>\r
+    </PostBuildEvent>\r
+  </PropertyGroup>\r
 </Project>
\ No newline at end of file
diff --git a/mcs/class/Mono.C5/C5/ClsdiagWork.png b/mcs/class/Mono.C5/C5/ClsdiagWork.png
deleted file mode 100644 (file)
index 9a18666..0000000
Binary files a/mcs/class/Mono.C5/C5/ClsdiagWork.png and /dev/null differ
index 2fc7c55475ad43c1f79478b4301ec4f885fe5d7e..a4164e9ffcd007e55d71093f2c4027a5c2d484f1 100644 (file)
@@ -838,8 +838,9 @@ namespace C5
       }
       else
       {
-        //To avoid an O(n^2) algorithm, we make an aux hashtable to hold the count of items
-        HashDictionary<T, int> dict = new HashDictionary<T, int>();
+        // To avoid an O(n^2) algorithm, we make an aux hashtable to hold the count of items
+        // bug20101103: HashDictionary<T, int> dict = new HashDictionary<T, int>();
+        HashDictionary<T, int> dict = new HashDictionary<T, int>(itemequalityComparer);
         foreach (T item in collection2)
         {
           int count = 1;
index 7dbab93a0b76a8392750385b00cd011efe715d4a..1b6ece3b450bb06342eab6d01b8eb014aa33e510 100644 (file)
@@ -128,7 +128,8 @@ namespace C5
 #if DEBUG
     const uint randomhashfactor = 1529784659;
 #else
-    uint randomhashfactor = (2 * (uint)(new Random()).Next() + 1) * 1529784659;
+    private static readonly Random random = new Random();
+    uint randomhashfactor = (2 * (uint)random.Next() + 1) * 1529784659;
 #endif
 #endif
 
index 4d59c9547f55f6f79de661f8d3ed3b930231c8df..8f3256747dbb3cad087a933d2a99979da5766aba 100644 (file)
@@ -70,7 +70,7 @@ namespace C5
       T currentitem = heap[cell].first;
       Handle currenthandle = heap[cell].firsthandle;
 
-      if (i > 0)
+      // bug20080222.txt
       {
         T other = heap[cell].last;
         if (2 * cell + 1 < size && comparer.Compare(currentitem, other) > 0)
@@ -132,10 +132,10 @@ namespace C5
       T currentitem = heap[cell].last;
       Handle currenthandle = heap[cell].lasthandle;
 
-      if (i > 0)
+      // bug20080222.txt
       {
         T other = heap[cell].first;
-        if (comparer.Compare(currentitem, other) < 0)
+        if (2 * cell + 1 < size && comparer.Compare(currentitem, other) < 0)
         {
           swappedroot = true;
           Handle otherhandle = heap[cell].firsthandle;
diff --git a/mcs/class/Mono.C5/C5/trees/.cvsignore b/mcs/class/Mono.C5/C5/trees/.cvsignore
deleted file mode 100644 (file)
index 9577892..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RedBlackTreeBag.cs
\ No newline at end of file
index 033ca99824a58d0750049c93153ee9ef8ac3c9be..5003bf104a74706f562145be4d3e704497a65e76 100644 (file)
@@ -1661,7 +1661,7 @@ namespace C5
     }
 
 
-    private bool removeIterativePhase2(Node cursor, int level)
+private bool removeIterativePhase2(Node cursor, int level)
     {
       if (size == 1)
       {
@@ -1670,8 +1670,7 @@ namespace C5
       }
 
 #if BAG
-      int removedcount = cursor.items;
-      size -= removedcount;
+      size -= cursor.items;
 #else
       //We are certain to remove one node:
       size--;
@@ -1731,7 +1730,7 @@ namespace C5
 #endif
       childsibling = comp > 0 ? cursor.right : cursor.left;
 #if BAG
-      cursor.size -= removedcount;
+      cursor.size = cursor.items + (newchild == null ? 0 : newchild.size) + (childsibling == null ? 0 : childsibling.size);
 #elif MAINTAIN_SIZE
       cursor.size--;
 #endif
@@ -1781,7 +1780,7 @@ namespace C5
           Node.update(ref cursor, comp > 0, child, maxsnapid, generation);
 #endif
 #if BAG
-          cursor.size -= removedcount;
+          cursor.size = cursor.items + (child == null ? 0 : child.size) + (childsibling == null ? 0 : childsibling.size);
 #elif MAINTAIN_SIZE
           cursor.size--;
 #endif
@@ -2039,7 +2038,7 @@ namespace C5
                                                cursor.right = swap;
 #endif
 #if BAG
-          cursor.size -= removedcount;
+          cursor.size = cursor.items + (cursor.right == null ? 0 : cursor.right.size) + (cursor.left == null ? 0 : cursor.left.size);
 #elif MAINTAIN_SIZE
           cursor.size--;
 #endif
@@ -2058,7 +2057,7 @@ namespace C5
           Node.update(ref cursor, dirs[level] > 0, child, maxsnapid, generation);
 #endif
 #if BAG
-        cursor.size -= removedcount;
+        cursor.size = cursor.items + (cursor.right == null ? 0 : cursor.right.size) + (cursor.left == null ? 0 : cursor.left.size);
 #elif MAINTAIN_SIZE
         cursor.size--;
 #endif
@@ -2809,27 +2808,27 @@ namespace C5
     /// <exception cref="IndexOutOfRangeException"/>.
     /// </summary>
     /// <value>The directed collection of items in a specific index interval.</value>
-    /// <param name="start">The low index of the interval (inclusive).</param>
-    /// <param name="end">The high index of the interval (exclusive).</param>
+    /// <param name="start">The starting index of the interval (inclusive).</param>
+    /// <param name="count">The length of the interval.</param>
     [Tested]
-    public IDirectedCollectionValue<T> this[int start, int end]
+    public IDirectedCollectionValue<T> this[int start, int count]
     {
       [Tested]
       get
       {
-        checkRange(start, end - start);
-        return new Interval(this, start, end - start, true);
+        checkRange(start, count);
+        return new Interval(this, start, count, true);
       }
     }
 
     #region Interval nested class
     class Interval : DirectedCollectionValueBase<T>, IDirectedCollectionValue<T>
     {
-      int start, length, stamp;
+      readonly int start, length, stamp;
 
-      bool forwards;
+      readonly bool forwards;
 
-      TreeBag<T> tree;
+      readonly TreeBag<T> tree;
 
 
       internal Interval(TreeBag<T> tree, int start, int count, bool forwards)
@@ -2884,12 +2883,11 @@ namespace C5
             if (i > j)
             {
 #if BAG
-              i -= j + cursor.items;
-              if (i < 0)
-              {
-                togo = cursor.items + i;
+              if (cursor.items > i - j) {
+                togo = cursor.items - (i - j);
                 break;
               }
+              i -= j + cursor.items;
 #else
               i -= j + 1;
 #endif
@@ -2901,7 +2899,7 @@ namespace C5
               togo = cursor.items;
 #endif
               break;
-            }
+            } // i < j, start point tree[start] is in left subtree
             else
             {
               path[level++] = cursor;
@@ -2936,7 +2934,7 @@ namespace C5
 #endif
           }
         }
-        else
+        else // backwards
         {
           int i = start + length - 1;
 
@@ -2944,7 +2942,7 @@ namespace C5
           {
             int j = cursor.left == null ? 0 : cursor.left.size;
 
-            if (i > j)
+            if (i > j) 
             {
 #if BAG
               if (i - j < cursor.items)
@@ -2966,7 +2964,7 @@ namespace C5
 #endif
               break;
             }
-            else
+            else // i <= j, end point tree[start+count-1] is in left subtree
             {
               cursor = cursor.left;
             }
index b137061f7ff4de34ab5994aaf11fdbebd4c0c451..da19a754df764a83592853617b229fe24e18de4a 100644 (file)
@@ -1661,7 +1661,7 @@ namespace C5
     }
 
 
-    private bool removeIterativePhase2(Node cursor, int level)
+private bool removeIterativePhase2(Node cursor, int level)
     {
       if (size == 1)
       {
@@ -1670,8 +1670,7 @@ namespace C5
       }
 
 #if BAG
-      int removedcount = cursor.items;
-      size -= removedcount;
+      size -= cursor.items;
 #else
       //We are certain to remove one node:
       size--;
@@ -1731,7 +1730,7 @@ namespace C5
 #endif
       childsibling = comp > 0 ? cursor.right : cursor.left;
 #if BAG
-      cursor.size -= removedcount;
+      cursor.size = cursor.items + (newchild == null ? 0 : newchild.size) + (childsibling == null ? 0 : childsibling.size);
 #elif MAINTAIN_SIZE
       cursor.size--;
 #endif
@@ -1781,7 +1780,7 @@ namespace C5
           Node.update(ref cursor, comp > 0, child, maxsnapid, generation);
 #endif
 #if BAG
-          cursor.size -= removedcount;
+          cursor.size = cursor.items + (child == null ? 0 : child.size) + (childsibling == null ? 0 : childsibling.size);
 #elif MAINTAIN_SIZE
           cursor.size--;
 #endif
@@ -2039,7 +2038,7 @@ namespace C5
                                                cursor.right = swap;
 #endif
 #if BAG
-          cursor.size -= removedcount;
+          cursor.size = cursor.items + (cursor.right == null ? 0 : cursor.right.size) + (cursor.left == null ? 0 : cursor.left.size);
 #elif MAINTAIN_SIZE
           cursor.size--;
 #endif
@@ -2058,7 +2057,7 @@ namespace C5
           Node.update(ref cursor, dirs[level] > 0, child, maxsnapid, generation);
 #endif
 #if BAG
-        cursor.size -= removedcount;
+        cursor.size = cursor.items + (cursor.right == null ? 0 : cursor.right.size) + (cursor.left == null ? 0 : cursor.left.size);
 #elif MAINTAIN_SIZE
         cursor.size--;
 #endif
@@ -2809,27 +2808,27 @@ namespace C5
     /// <exception cref="IndexOutOfRangeException"/>.
     /// </summary>
     /// <value>The directed collection of items in a specific index interval.</value>
-    /// <param name="start">The low index of the interval (inclusive).</param>
-    /// <param name="end">The high index of the interval (exclusive).</param>
+    /// <param name="start">The starting index of the interval (inclusive).</param>
+    /// <param name="count">The length of the interval.</param>
     [Tested]
-    public IDirectedCollectionValue<T> this[int start, int end]
+    public IDirectedCollectionValue<T> this[int start, int count]
     {
       [Tested]
       get
       {
-        checkRange(start, end - start);
-        return new Interval(this, start, end - start, true);
+        checkRange(start, count);
+        return new Interval(this, start, count, true);
       }
     }
 
     #region Interval nested class
     class Interval : DirectedCollectionValueBase<T>, IDirectedCollectionValue<T>
     {
-      int start, length, stamp;
+      readonly int start, length, stamp;
 
-      bool forwards;
+      readonly bool forwards;
 
-      TreeSet<T> tree;
+      readonly TreeSet<T> tree;
 
 
       internal Interval(TreeSet<T> tree, int start, int count, bool forwards)
@@ -2884,12 +2883,11 @@ namespace C5
             if (i > j)
             {
 #if BAG
-              i -= j + cursor.items;
-              if (i < 0)
-              {
-                togo = cursor.items + i;
+              if (cursor.items > i - j) {
+                togo = cursor.items - (i - j);
                 break;
               }
+              i -= j + cursor.items;
 #else
               i -= j + 1;
 #endif
@@ -2901,7 +2899,7 @@ namespace C5
               togo = cursor.items;
 #endif
               break;
-            }
+            } // i < j, start point tree[start] is in left subtree
             else
             {
               path[level++] = cursor;
@@ -2936,7 +2934,7 @@ namespace C5
 #endif
           }
         }
-        else
+        else // backwards
         {
           int i = start + length - 1;
 
@@ -2944,7 +2942,7 @@ namespace C5
           {
             int j = cursor.left == null ? 0 : cursor.left.size;
 
-            if (i > j)
+            if (i > j) 
             {
 #if BAG
               if (i - j < cursor.items)
@@ -2966,7 +2964,7 @@ namespace C5
 #endif
               break;
             }
-            else
+            else // i <= j, end point tree[start+count-1] is in left subtree
             {
               cursor = cursor.left;
             }
diff --git a/mcs/class/Mono.C5/RELEASE-NOTES.txt b/mcs/class/Mono.C5/RELEASE-NOTES.txt
new file mode 100644 (file)
index 0000000..9f68b62
--- /dev/null
@@ -0,0 +1,128 @@
+RELEASE NOTES FOR C5 GENERIC COLLECTION LIBRARY FOR C#/CLI
+------------------------------
+
+Release 1.1.1 of 2010-12-17
+
+ * Fixed 5 bugs found since the 1.1.0 release.  Only one of this is
+   likely to break code: the specification and implementation of the
+   range indexer this[i,n] on TreeSet was wrong.
+
+
+Release 1.1.0 of 2008-02-10
+
+New functionality:
+
+ * Interface C5.ICollection<T> now extends generic interface
+   System.Collections.Generic.ICollection<T>.  The C5.ICollection<T>
+   interface in some cases describe different exceptions than
+   specified by SCG.ICollection<T>, but we have not attempted to fix
+   this because the .NET collection implemented in some cases throw
+   other exceptions than those specified anyway.
+
+ * Interface C5.IList<T> now extends interface non-generic interface
+   System.Collections.IList, so C5 list collections can be passed to
+   .NET GUI components and other framework methods.
+
+ * Exception-free methods 
+
+       bool TryPredecessor(T x, out T res)
+       bool TrySuccessor(T x, out T res)
+       bool TryWeakPredecessor(T x, out T res)
+       bool TryWeakSuccessor(T x, out T res)
+
+   have been added to the ISorted<T> interface and the classes that
+   implement it.   
+
+ * Added methods analogous to the above to ISortedDictionary<K,V> and
+   the classes that implement it.
+
+ * Event raising on SortedDictionary<T> finally implemented, thanks to
+   Marcus Griep.  Hence all unit tests should now succeed.
+
+ * The missing custom comparers and equality comparers have been added
+   for all primitive types except bool.  
+
+ * The book "The C5 Generic Collection Library" has been updated
+   to reflect these changes.
+
+Bugs fixed:
+
+ * SortedArray<T>.UpdateOrAdd and SortedArray<T>.FindOrAdd did not
+   expand the underlying array correctly
+
+ * HashDictionary.UpdateOrAdd returned the new value, not the old one.
+
+ * CollectionBase.StaticEquals threw exception when exactly one
+   argument was null.  
+
+ * HashedLinkedList<T>.Remove could fail with NullReferenceException.
+
+ * HashSet<T>.UpdateOrAdd(item, out old) did not set old=default(T)
+   when item was not already in the set.
+
+ * HashBag<T>.CopyTo could throw when copying from empty collection.
+
+------------------------------
+
+Release 1.0.2 of 2007-06-01
+
+Bugs fixed:
+
+ * SortedDictionaryBase was not marked as [Serializable]
+ * ArrayList.expand did not update the array field of (other) views
+
+ * IntervalHeap::Replace would throw an exception on one-element heap
+
+------------------------------
+
+Release 1.0.1 of 2006-06-27
+
+Bugs fixed:
+
+ * CircularQueue<T> indexer was wrong
+
+ * Some equality comparers created by C5.EqualityComparer<T>.Default
+   were not marked serializable
+
+ * HashSet<T>.RetainAll could leave internal data inconsistent
+
+ * TreeDictionary<K,V> was not marked serializable
+
+ * HashedLinkedList<T> problem related to tag group implementation
+
+ * Dispose() could fail on newly created lists
+
+New features:
+
+ * A strong name (.snk) is included 
+
+ * C5.IList<T> now derives from System.Collections.Generic.IList<T>
+
+ * Added C5.build file for NAnt, due to Johan Warlander
+
+The technical report has been updated to reflect the above changes.
+
+------------------------------
+
+Release 1.00 of 2006-01-30
+
+First complete release.  There are lots of changes since the
+PreRelease:
+
+ * Interface design has been reorganized and simplified
+
+ * New functionality added (too much to describe here)
+
+ * Updated for Microsoft C#/CLI 2.0 release version
+
+ * Comprehensive documentation in ITU Technical Report ITU-TR-2006-76
+
+------------------------------
+
+PreRelease 0.5 of 2004-08-06
+
+First public release, essentially a preview of the library, for beta 1
+of Microsoft C#/CLI 2.0.
+
+------------------------------
index 2576a4f21bb3e5b192dfd69a2d436ed9cd69c8ce..49d07f92eeff05cdf371536dd72a45f467af1a7f 100644 (file)
@@ -564,6 +564,33 @@ namespace C5UnitTests.support
           Assert.IsFalse(CollectionBase<double>.StaticEquals(arr, null, eqc));
           Assert.IsFalse(CollectionBase<double>.StaticEquals(null, arr, eqc));
       }
+
+      private class EveryThingIsEqual : SCG.IEqualityComparer<Object>
+      {
+        public new bool Equals(Object o1, Object o2)
+        {
+          return true;
+        }
+
+        public new int GetHashCode(Object o)
+        {
+          return 1;
+        }
+      }
+
+      [Test]
+      public void UnsequencedCollectionComparerEquality()
+      {
+        // Repro for bug20101103
+        SCG.IEqualityComparer<Object> eqc = new EveryThingIsEqual();
+        Object o1 = new Object(), o2 = new Object();
+        C5.ICollection<Object> coll1 = new ArrayList<Object>(eqc),
+          coll2 = new ArrayList<Object>(eqc);
+        coll1.Add(o1);
+        coll2.Add(o2);
+        Assert.IsFalse(o1.Equals(o2));
+        Assert.IsTrue(coll1.UnsequencedEquals(coll2));
+      }
     }
   }
 }
index 3d118b37d8e5f6e850c341fbb7c99e657883c553..786c2327b7ef8863e490bdb3d229083a4169283f 100644 (file)
@@ -328,7 +328,7 @@ namespace C5UnitTests
             return a.Index == o.Index && itemequalityComparer.Equals(a.Item, o.Item);
           }
       }
-      throw new ApplicationException("Illegat Act: " + Act);
+      throw new ApplicationException("Illegal Act: " + Act);
     }
 
     public override string ToString()
index b8ff1ea81955146116bf026f1721684e9db5e619..4b1586989ed4f209159ceee038c8ebada28b4b0a 100644 (file)
@@ -797,7 +797,7 @@ namespace C5UnitTests.arrays.sorted
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void Empty()
                {
                        array.Clear();
@@ -806,7 +806,7 @@ namespace C5UnitTests.arrays.sorted
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void HighIndex()
                {
                        array.RemoveAt(array.Count);
@@ -814,7 +814,7 @@ namespace C5UnitTests.arrays.sorted
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void LowIndex()
                {
                        array.RemoveAt(-1);
@@ -1667,7 +1667,7 @@ namespace C5UnitTests.arrays.sorted
 
 
                        [Test]
-                       [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+                       [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
                        public void BadMap()
                        {
                                for (int i = 0; i < 11; i++)
@@ -1908,7 +1908,7 @@ namespace C5UnitTests.arrays.sorted
                        }
 
                        [Test]
-                       [ExpectedException(typeof(ArgumentException), "Argument not sorted")]
+                       [ExpectedException(typeof(ArgumentException), ExpectedMessage="Argument not sorted")]
                        public void EmptyBad()
                        {
                                array.AddSorted(new FunEnumerable(9, new Fun<int,int>(bad)));
index a898f0ba1b3e1f812351f22ee930d3e911768826..3e1ffe00abe0f619d96c36c353f24dc0e1644d0c 100644 (file)
@@ -156,7 +156,7 @@ namespace C5UnitTests.hashtable.dictionary
 
 
     [Test]
-    [ExpectedException(typeof(DuplicateNotAllowedException), "Key being added: 'A'")]
+    [ExpectedException(typeof(DuplicateNotAllowedException), ExpectedMessage="Key being added: 'A'")]
     public void IllegalAdd()
     {
       dict.Add("A", "B");
index 2bd058a4123e0a9ad3974606a849425f33da3027..8e816ad5cb9be8ba2ca34596772effa67cedbefb 100644 (file)
@@ -587,7 +587,6 @@ namespace C5UnitTests.hashtable.set
 
 
       [Test]
-      [Category("NotWorking")]
       public void RemoveAllCopies()
       {
         hashset.Add(5); hashset.Add(7); hashset.Add(5);
index 31fa3e66702fa8969b259ad59a9e5a5a331cda71..c11480c7b48d7c92f4efe1f767d555238cf83c88 100644 (file)
@@ -276,7 +276,7 @@ namespace C5UnitTests.heaps
     }
 
     /// <summary>
-    /// Bug by Viet Yen Nguyen <v.y.nguyen@alumnus.utwente.nl>
+    /// bug20070504.txt by Viet Yen Nguyen 
     /// </summary>
     [Test]
     public void Replace3()
@@ -287,6 +287,109 @@ namespace C5UnitTests.heaps
       Assert.IsTrue(queue.Check());
     }
 
+    /// <summary>
+    /// bug20080222.txt by Thomas Dufour
+    /// </summary>
+    [Test]
+    public void Replace4a()
+    {
+      IPriorityQueueHandle<int> handle1 = null;
+      queue.Add(ref handle1, 4);
+      Assert.AreEqual(4, queue.FindMin());
+      queue.Add(3);
+      Assert.AreEqual(3, queue.FindMin());
+      Assert.AreEqual(4, queue.Replace(handle1, 2));
+      Assert.AreEqual(2, queue.FindMin());
+    }
+
+    [Test]
+    public void Replace4b()
+    {
+      IPriorityQueueHandle<int> handle1 = null;
+      queue.Add(ref handle1, 2);
+      Assert.AreEqual(2, queue.FindMax());
+      queue.Add(3);
+      Assert.AreEqual(3, queue.FindMax());
+      Assert.AreEqual(2, queue.Replace(handle1, 4));
+      Assert.AreEqual(4, queue.FindMax());
+    }
+
+    [Test]
+    public void Replace5a()
+    {
+      for (int size = 0; size < 130; size++)
+      {
+        IPriorityQueue<double> q = new IntervalHeap<double>();
+        IPriorityQueueHandle<double> handle1 = null;
+        q.Add(ref handle1, 3.0);
+        Assert.AreEqual(3.0, q.FindMin());
+        for (int i = 1; i < size; i++)
+          q.Add(i + 3.0);
+        Assert.AreEqual(3.0, q.FindMin());
+        for (int min = 2; min >= -10; min--)
+        {
+          Assert.AreEqual(min + 1.0, q.Replace(handle1, min));
+          Assert.AreEqual(min, q.FindMin());
+        }
+        Assert.AreEqual(-10.0, q.DeleteMin());
+        for (int i = 1; i < size; i++)
+          Assert.AreEqual(i + 3.0, q.DeleteMin());
+        Assert.IsTrue(q.IsEmpty);
+      }
+    }
+
+    [Test]
+    public void Replace5b()
+    {
+      for (int size = 0; size < 130; size++)
+      {
+        IPriorityQueue<double> q = new IntervalHeap<double>();
+        IPriorityQueueHandle<double> handle1 = null;
+        q.Add(ref handle1, -3.0);
+        Assert.AreEqual(-3.0, q.FindMax());
+        for (int i = 1; i < size; i++)
+          q.Add(-i - 3.0);
+        Assert.AreEqual(-3.0, q.FindMax());
+        for (int max = -2; max <= 10; max++)
+        {
+          Assert.AreEqual(max - 1.0, q.Replace(handle1, max));
+          Assert.AreEqual(max, q.FindMax());
+        }
+        Assert.AreEqual(10.0, q.DeleteMax());
+        for (int i = 1; i < size; i++)
+          Assert.AreEqual(- i - 3.0, q.DeleteMax());
+        Assert.IsTrue(q.IsEmpty);
+      }
+    }
+
+    [Test]
+    public void Delete1a()
+    {
+      IPriorityQueueHandle<int> handle1 = null;
+      queue.Add(ref handle1, 4);
+      Assert.AreEqual(4, queue.FindMin());
+      queue.Add(3);
+      Assert.AreEqual(3, queue.FindMin());
+      queue.Add(2);
+      Assert.AreEqual(4, queue.Delete(handle1));
+      Assert.AreEqual(2, queue.FindMin());
+      Assert.AreEqual(3, queue.FindMax());
+    }
+
+    [Test]
+    public void Delete1b()
+    {
+      IPriorityQueueHandle<int> handle1 = null;
+      queue.Add(ref handle1, 2);
+      Assert.AreEqual(2, queue.FindMax());
+      queue.Add(3);
+      Assert.AreEqual(3, queue.FindMax());
+      queue.Add(4);
+      Assert.AreEqual(2, queue.Delete(handle1));
+      Assert.AreEqual(3, queue.FindMin());
+      Assert.AreEqual(4, queue.FindMax());
+    }
+
     [Test]
     public void ReuseHandle()
     {
index 7bd3a240b6abd2ddfb99f1055e387e797bc59278..131dd022ed6150b092e6712715fca8618169c2b3 100644 (file)
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <ProductVersion>9.0.21022</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <StartupObject>
-    </StartupObject>
-    <RootNamespace>nunit</RootNamespace>
-    <NoStandardLibraries>false</NoStandardLibraries>
-    <AssemblyName>nunit</AssemblyName>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <UpgradeBackupLocation>
-    </UpgradeBackupLocation>
-    <OldToolsVersion>2.0</OldToolsVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <DebugSymbols>true</DebugSymbols>
-    <Optimize>false</Optimize>
-    <OutputPath>.\bin\Debug\</OutputPath>
-    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <WarningLevel>4</WarningLevel>
-    <IncrementalBuild>false</IncrementalBuild>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <DebugSymbols>false</DebugSymbols>
-    <Optimize>true</Optimize>
-    <OutputPath>.\bin\Release\</OutputPath>
-    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
-    <DefineConstants>TRACE</DefineConstants>
-    <WarningLevel>4</WarningLevel>
-    <IncrementalBuild>false</IncrementalBuild>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'DebugSnk' ">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\DebugSnk\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseSnk' ">
-    <OutputPath>bin\ReleaseSnk\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\C5\C5.csproj">
-      <Project>{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}</Project>
-      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
-      <Name>C5</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="arrays\CircularQueueTest.cs" />
-    <Compile Include="AssemblyInfo.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="BasesTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="InterfacesTest.cs" />
-    <Compile Include="Records.cs" />
-    <Compile Include="Sorting.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="SupportClasses.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="arrays\ArrayListTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="arrays\HashedArrayListTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="arrays\SortedArrayTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="hashing\HashBagTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="hashing\HashDictionaryTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="hashing\HashTableTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="heaps\HeapTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="linkedlists\HashedLinkedListTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="linkedlists\LinkedListTest.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="templates\Clone.cs" />
-    <Compile Include="templates\Events.cs" />
-    <Compile Include="templates\GenericCollectionTester.cs" />
-    <Compile Include="templates\List.cs" />
-    <Compile Include="trees\Bag.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="trees\Dictionary.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="trees\RedBlackTreeSetTests.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="WrappersTest.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <AppDesigner Include="Properties\" />
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.2.9.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
-  <PropertyGroup>
-    <PreBuildEvent>
-    </PreBuildEvent>
-    <PostBuildEvent>
-    </PostBuildEvent>
-  </PropertyGroup>
-  <ProjectExtensions>
-    <VisualStudio>
-    </VisualStudio>
-  </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <ProductVersion>9.0.21022</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <StartupObject>\r
+    </StartupObject>\r
+    <RootNamespace>nunit</RootNamespace>\r
+    <NoStandardLibraries>false</NoStandardLibraries>\r
+    <AssemblyName>nunit</AssemblyName>\r
+    <FileUpgradeFlags>\r
+    </FileUpgradeFlags>\r
+    <UpgradeBackupLocation>\r
+    </UpgradeBackupLocation>\r
+    <OldToolsVersion>3.5</OldToolsVersion>\r
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>.\bin\Debug\</OutputPath>\r
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <WarningLevel>4</WarningLevel>\r
+    <IncrementalBuild>false</IncrementalBuild>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <DebugSymbols>false</DebugSymbols>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>.\bin\Release\</OutputPath>\r
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <WarningLevel>4</WarningLevel>\r
+    <IncrementalBuild>false</IncrementalBuild>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'DebugSnk' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\DebugSnk\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseSnk' ">\r
+    <OutputPath>bin\ReleaseSnk\</OutputPath>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <Optimize>true</Optimize>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\C5\C5.csproj">\r
+      <Project>{D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}</Project>\r
+      <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>\r
+      <Name>C5</Name>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="arrays\CircularQueueTest.cs" />\r
+    <Compile Include="AssemblyInfo.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="BasesTest.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="InterfacesTest.cs" />\r
+    <Compile Include="Records.cs" />\r
+    <Compile Include="Sorting.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="SupportClasses.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="arrays\ArrayListTest.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="arrays\HashedArrayListTest.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="arrays\SortedArrayTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="hashing\HashBagTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="hashing\HashDictionaryTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="hashing\HashTableTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="heaps\HeapTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="linkedlists\HashedLinkedListTest.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="linkedlists\LinkedListTest.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="templates\Clone.cs" />\r
+    <Compile Include="templates\Events.cs" />\r
+    <Compile Include="templates\GenericCollectionTester.cs" />\r
+    <Compile Include="templates\List.cs" />\r
+    <Compile Include="trees\Bag.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="trees\Dictionary.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="trees\RedBlackTreeSetTests.cs">\r
+      <SubType>Code</SubType>\r
+    </Compile>\r
+    <Compile Include="WrappersTest.cs" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <AppDesigner Include="Properties\" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Reference Include="nunit.framework, Version=2.5.9.10348, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">\r
+      <SpecificVersion>False</SpecificVersion>\r
+      <HintPath>C:\Program Files\NUnit 2.5.9\bin\net-2.0\framework\nunit.framework.dll</HintPath>\r
+    </Reference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Folder Include="Properties\" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />\r
+  <PropertyGroup>\r
+    <PreBuildEvent>\r
+    </PreBuildEvent>\r
+    <PostBuildEvent>\r
+    </PostBuildEvent>\r
+  </PropertyGroup>\r
+  <ProjectExtensions>\r
+    <VisualStudio>\r
+    </VisualStudio>\r
+  </ProjectExtensions>\r
 </Project>
\ No newline at end of file
index 071208873e9c946cf175740cb406646561a6b641..b808f17021bdc62f742fb98aa6859d21b3a15777 100644 (file)
@@ -29,6 +29,50 @@ namespace C5UnitTests.trees.TreeBag
 {
   using CollectionOfInt = TreeBag<int>;
 
+
+  [TestFixture]
+  public class NewTest
+  {
+    // Repro for bug20091113:
+    [Test]
+    public void A()
+    {
+      var list = new TreeBag<long>();
+      // Sequence generated in FindNodeRandomTest
+      // Manually pruned by sestoft 2009-11-14
+      list.Add(553284);
+      list.Add(155203);
+      list.Add(316201);
+      list.Add(263469);
+      list.Add(263469);
+
+      //list.dump();   // OK
+      list.Remove(316201);
+      //list.dump();   // Not OK
+      Assert.IsTrue(list.Check());
+    }
+    [Test]
+    public void B()
+    {
+      var l = 100;
+      for (int r = 0; r < l; r++)
+      {
+        var list = new TreeBag<int>();
+        for (int i = 0; i < l; i++)
+        {
+          list.Add(l - i);
+          list.Add(l - i);
+          list.Add(l - i);
+        }
+        list.Remove(r);
+        list.Remove(r);
+        //list.dump();
+        list.Remove(r);
+        Assert.IsTrue(list.Check("removing" + r));
+      }
+    }
+  }
+
   [TestFixture]
   public class GenericTesters
   {
@@ -949,7 +993,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
     [Test]
-    [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+    [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
     public void Empty()
     {
       tree.Clear();
@@ -958,7 +1002,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
     [Test]
-    [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+    [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
     public void HighIndex()
     {
       tree.RemoveAt(tree.Count);
@@ -966,7 +1010,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
     [Test]
-    [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+    [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
     public void LowIndex()
     {
       tree.RemoveAt(-1);
@@ -1691,7 +1735,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+      [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
       public void CountTo()
       {
         int j = snap.CountTo(15);
@@ -1699,7 +1743,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+      [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
       public void Indexing()
       {
         int j = snap[4];
@@ -1707,7 +1751,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+      [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
       public void Indexing2()
       {
         int j = snap.IndexOf(5);
@@ -1947,7 +1991,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(InvalidOperationException), "Cannot snapshot a snapshot")]
+      [ExpectedException(typeof(InvalidOperationException), ExpectedMessage="Cannot snapshot a snapshot")]
       public void SnapSnap()
       {
         TreeBag<int> snap = (TreeBag<int>)tree.Snapshot();
@@ -2255,7 +2299,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+      [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
       public void BadMap()
       {
         for (int i = 0; i < 11; i++)
@@ -2512,7 +2556,7 @@ namespace C5UnitTests.trees.TreeBag
 
 
       [Test]
-      [ExpectedException(typeof(ArgumentException), "Argument not sorted")]
+      [ExpectedException(typeof(ArgumentException), ExpectedMessage="Argument not sorted")]
       public void EmptyBad()
       {
         tree.AddSorted(new FunEnumerable(9, new Fun<int, int>(bad)));
@@ -2676,46 +2720,70 @@ namespace C5UnitTests.trees.TreeBag
       [Test]
       public void GetRange()
       {
-        Assert.IsTrue(IC.eq(tree[3, 3]));
-        Assert.IsTrue(IC.eq(tree[3, 4], 3));
-        Assert.IsTrue(IC.eq(tree[3, 5], 3, 4));
-        Assert.IsTrue(IC.eq(tree[3, 6], 3, 4, 4));
-        Assert.IsTrue(IC.eq(tree[3, 7], 3, 4, 4, 5));
-        Assert.IsTrue(IC.eq(tree[4, 4]));
-        Assert.IsTrue(IC.eq(tree[4, 5], 4));
-        Assert.IsTrue(IC.eq(tree[4, 6], 4, 4));
-        Assert.IsTrue(IC.eq(tree[4, 7], 4, 4, 5));
-        Assert.IsTrue(IC.eq(tree[4, 8], 4, 4, 5, 6));
-        Assert.IsTrue(IC.eq(tree[5, 5]));
-        Assert.IsTrue(IC.eq(tree[5, 6], 4));
-        Assert.IsTrue(IC.eq(tree[5, 7], 4, 5));
-        Assert.IsTrue(IC.eq(tree[5, 8], 4, 5, 6));
-        Assert.IsTrue(IC.eq(tree[5, 9], 4, 5, 6, 7));
-        Assert.IsTrue(IC.eq(tree[5, 11], 4, 5, 6, 7, 8, 9));
+        Assert.IsTrue(IC.eq(tree[3, 0]));
+        Assert.IsTrue(IC.eq(tree[3, 1], 3));
+        Assert.IsTrue(IC.eq(tree[3, 2], 3, 4));
+        Assert.IsTrue(IC.eq(tree[3, 3], 3, 4, 4));
+        Assert.IsTrue(IC.eq(tree[3, 4], 3, 4, 4, 5));
+        Assert.IsTrue(IC.eq(tree[4, 0]));
+        Assert.IsTrue(IC.eq(tree[4, 1], 4));
+        Assert.IsTrue(IC.eq(tree[4, 2], 4, 4));
+        Assert.IsTrue(IC.eq(tree[4, 3], 4, 4, 5));
+        Assert.IsTrue(IC.eq(tree[4, 4], 4, 4, 5, 6));
+        Assert.IsTrue(IC.eq(tree[5, 0]));
+        Assert.IsTrue(IC.eq(tree[5, 1], 4));
+        Assert.IsTrue(IC.eq(tree[5, 2], 4, 5));
+        Assert.IsTrue(IC.eq(tree[5, 3], 4, 5, 6));
+        Assert.IsTrue(IC.eq(tree[5, 4], 4, 5, 6, 7));
+        Assert.IsTrue(IC.eq(tree[5, 6], 4, 5, 6, 7, 8, 9));
+      }
+
+      [Test]
+      public void GetRangeBug20090616()
+      {
+        C5.TreeBag<double> tree = new C5.TreeBag<double>() { 
+          0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 3.0, 4.0 };
+        for (int start = 0; start <= tree.Count - 2; start++)
+        {
+          double[] range = tree[start, 2].ToArray();
+          Assert.AreEqual(range[0], tree[start]);
+          Assert.AreEqual(range[1], tree[start+1]);
+        }
       }
 
-
       [Test]
       public void GetRangeBackwards()
       {
-        Assert.IsTrue(IC.eq(tree[3, 3].Backwards()));
-        Assert.IsTrue(IC.eq(tree[3, 4].Backwards(), 3));
-        Assert.IsTrue(IC.eq(tree[3, 5].Backwards(), 4, 3));
-        Assert.IsTrue(IC.eq(tree[3, 6].Backwards(), 4, 4, 3));
-        Assert.IsTrue(IC.eq(tree[3, 7].Backwards(), 5, 4, 4, 3));
-        Assert.IsTrue(IC.eq(tree[4, 4].Backwards()));
-        Assert.IsTrue(IC.eq(tree[4, 5].Backwards(), 4));
-        Assert.IsTrue(IC.eq(tree[4, 6].Backwards(), 4, 4));
-        Assert.IsTrue(IC.eq(tree[4, 7].Backwards(), 5, 4, 4));
-        Assert.IsTrue(IC.eq(tree[4, 8].Backwards(), 6, 5, 4, 4));
-        Assert.IsTrue(IC.eq(tree[5, 5].Backwards()));
-        Assert.IsTrue(IC.eq(tree[5, 6].Backwards(), 4));
-        Assert.IsTrue(IC.eq(tree[5, 7].Backwards(), 5, 4));
-        Assert.IsTrue(IC.eq(tree[5, 8].Backwards(), 6, 5, 4));
-        Assert.IsTrue(IC.eq(tree[5, 9].Backwards(), 7, 6, 5, 4));
+        Assert.IsTrue(IC.eq(tree[3, 0].Backwards()));
+        Assert.IsTrue(IC.eq(tree[3, 1].Backwards(), 3));
+        Assert.IsTrue(IC.eq(tree[3, 2].Backwards(), 4, 3));
+        Assert.IsTrue(IC.eq(tree[3, 3].Backwards(), 4, 4, 3));
+        Assert.IsTrue(IC.eq(tree[3, 4].Backwards(), 5, 4, 4, 3));
+        Assert.IsTrue(IC.eq(tree[4, 0].Backwards()));
+        Assert.IsTrue(IC.eq(tree[4, 1].Backwards(), 4));
+        Assert.IsTrue(IC.eq(tree[4, 2].Backwards(), 4, 4));
+        Assert.IsTrue(IC.eq(tree[4, 3].Backwards(), 5, 4, 4));
+        Assert.IsTrue(IC.eq(tree[4, 4].Backwards(), 6, 5, 4, 4));
+        Assert.IsTrue(IC.eq(tree[5, 0].Backwards()));
+        Assert.IsTrue(IC.eq(tree[5, 1].Backwards(), 4));
+        Assert.IsTrue(IC.eq(tree[5, 2].Backwards(), 5, 4));
+        Assert.IsTrue(IC.eq(tree[5, 3].Backwards(), 6, 5, 4));
+        Assert.IsTrue(IC.eq(tree[5, 4].Backwards(), 7, 6, 5, 4));
+      }
+
+      [Test]
+      public void GetRangeBackwardsBug20090616()
+      {
+        C5.TreeBag<double> tree = new C5.TreeBag<double>() { 
+          0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 3.0, 4.0 };
+        for (int start = 0; start <= tree.Count - 2; start++)
+        {
+          double[] range = tree[start, 2].Backwards().ToArray();
+          Assert.AreEqual(range[1], tree[start]);
+          Assert.AreEqual(range[0], tree[start + 1]);
+        }
       }
 
-
       [Test]
       [ExpectedException(typeof(ArgumentOutOfRangeException))]
       public void GetRangeBad1()
@@ -2728,7 +2796,7 @@ namespace C5UnitTests.trees.TreeBag
       [ExpectedException(typeof(ArgumentOutOfRangeException))]
       public void GetRangeBad2()
       {
-        object foo = tree[3, 2];
+        object foo = tree[3, -1];
       }
 
 
@@ -2736,7 +2804,7 @@ namespace C5UnitTests.trees.TreeBag
       [ExpectedException(typeof(ArgumentOutOfRangeException))]
       public void GetRangeBad3()
       {
-        object foo = tree[3, 12];
+        object foo = tree[3, 9];
       }
 
 
index 83dfd29153430cf0b9bdb7e270c07e2ad6aa1443..c38c9011b2f29732b412f318b70c73a385ef0599 100644 (file)
@@ -193,7 +193,7 @@ namespace C5UnitTests.trees.RBDictionary
 
 
                [Test]
-               [ExpectedException(typeof(DuplicateNotAllowedException), "Key being added: 'A'")]
+               [ExpectedException(typeof(DuplicateNotAllowedException), ExpectedMessage="Key being added: 'A'")]
                public void IllegalAdd()
                {
                        dict.Add("A", "B");
index d10b3d01c59185e509512e67df3fecdb7917d6c6..b1af00e2d36c704b1c2f2d688001da46ce0e650b 100644 (file)
@@ -767,7 +767,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void Empty()
                {
                        tree.Clear();
@@ -776,7 +776,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void HighIndex()
                {
                        tree.RemoveAt(tree.Count);
@@ -784,7 +784,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                [Test]
-               [ExpectedException(typeof(IndexOutOfRangeException), "Index out of range for sequenced collectionvalue")]
+               [ExpectedException(typeof(IndexOutOfRangeException), ExpectedMessage="Index out of range for sequenced collectionvalue")]
                public void LowIndex()
                {
                        tree.RemoveAt(-1);
@@ -1662,7 +1662,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                        [Test]
-                       [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+                       [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
                        public void CountTo()
                        {
                                int j = snap.CountTo(15);
@@ -1670,7 +1670,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                        [Test]
-                       [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+                       [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
                        public void Indexing()
                        {
                                int j = snap[4];
@@ -1678,7 +1678,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                        [Test]
-                       [ExpectedException(typeof(NotSupportedException), "Indexing not supported for snapshots")]
+                       [ExpectedException(typeof(NotSupportedException), ExpectedMessage="Indexing not supported for snapshots")]
                        public void Indexing2()
                        {
                                int j = snap.IndexOf(5);
@@ -1904,7 +1904,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                        [Test]
-                       [ExpectedException(typeof(InvalidOperationException), "Cannot snapshot a snapshot")]
+                       [ExpectedException(typeof(InvalidOperationException), ExpectedMessage="Cannot snapshot a snapshot")]
                        public void SnapSnap()
                        {
                                TreeSet<int> snap = (TreeSet<int>)tree.Snapshot();
@@ -2206,7 +2206,7 @@ namespace C5UnitTests.trees.TreeSet
 
 
                        [Test]
-                       [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+                       [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
                        public void BadMap()
                        {
                                for (int i = 0; i < 11; i++)
@@ -2447,7 +2447,7 @@ namespace C5UnitTests.trees.TreeSet
                        }
 
                        [Test]
-                       [ExpectedException(typeof(ArgumentException), "Argument not sorted")]
+                       [ExpectedException(typeof(ArgumentException), ExpectedMessage="Argument not sorted")]
                        public void EmptyBad()
                        {
                                tree.AddSorted(new FunEnumerable(9, new Fun<int,int>(bad)));
@@ -2598,10 +2598,9 @@ namespace C5UnitTests.trees.TreeSet
                        [Test]
                        public void GetRange()
                        {
-                               SCG.IEnumerable<int> e = tree[3, 6];
-
+                               SCG.IEnumerable<int> e = tree[3, 3];
                                Assert.IsTrue(IC.eq(e, 3, 4, 5));
-                               e = tree[3, 3];
+                               e = tree[3, 0];
                                Assert.IsTrue(IC.eq(e));
                        }
 
@@ -2618,7 +2617,7 @@ namespace C5UnitTests.trees.TreeSet
                        [ExpectedException(typeof(ArgumentOutOfRangeException))]
                        public void GetRangeBad2()
                        {
-                               object foo = tree[3, 2];
+                               object foo = tree[3, -1];
                        }
 
 
@@ -2626,7 +2625,7 @@ namespace C5UnitTests.trees.TreeSet
       [ExpectedException(typeof(ArgumentOutOfRangeException))]
       public void GetRangeBad3()
                        {
-                               object foo = tree[3, 11];
+                               object foo = tree[3, 8];
                        }