diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-01-23 22:10:41 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-01-24 16:58:10 +0300 |
commit | f88963b09d85a6e3e92c7a78619277a18f63ed3f (patch) | |
tree | 631e236d8e01194009f625703299d279976ecdd0 /mcs/class/Mono.C5 | |
parent | 2c12dad9b13e96aeaf1e44194010b45f12e527a8 (diff) |
Update C5 to version 1.1.1
Diffstat (limited to 'mcs/class/Mono.C5')
22 files changed, 857 insertions, 425 deletions
diff --git a/mcs/class/Mono.C5/C5.sln b/mcs/class/Mono.C5/C5.sln index e94773d6ffa..f6add3c878a 100644 --- a/mcs/class/Mono.C5/C5.sln +++ b/mcs/class/Mono.C5/C5.sln @@ -1,47 +1,150 @@ -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
+# Visual Studio 2010
+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}") = "nunit", "nunit\nunit.csproj", "{08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docNet", "docNet\docNet.csproj", "{42811A81-6A99-4C7A-A6DA-DF104C767B72}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserGuideExamples", "UserGuideExamples\UserGuideExamples.csproj", "{B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PreProcess", "PreProcess\PreProcess.csproj", "{6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed platforms = Debug|Mixed platforms
+ Debug|Win32 = Debug|Win32
+ DebugSnk|Any CPU = DebugSnk|Any CPU
+ DebugSnk|Mixed platforms = DebugSnk|Mixed platforms
+ DebugSnk|Win32 = DebugSnk|Win32
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed platforms = Release|Mixed platforms
+ Release|Win32 = Release|Win32
+ ReleaseSnk|Any CPU = ReleaseSnk|Any CPU
+ ReleaseSnk|Mixed platforms = ReleaseSnk|Mixed platforms
+ ReleaseSnk|Win32 = ReleaseSnk|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Debug|Win32.Build.0 = Debug|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Mixed platforms.ActiveCfg = Release|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Mixed platforms.Build.0 = Release|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.Release|Win32.ActiveCfg = Release|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU
+ {D70489CD-ABDA-48FF-BD1E-BE3F7495BE71}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU
+ {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}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.DebugSnk|Win32.Build.0 = DebugSnk|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
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU
+ {08CBFDEB-A2E2-4F0E-A4E1-B996B05569DE}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Debug|Win32.Build.0 = Debug|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Mixed platforms.ActiveCfg = Release|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Mixed platforms.Build.0 = Release|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.Release|Win32.ActiveCfg = Release|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU
+ {42811A81-6A99-4C7A-A6DA-DF104C767B72}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|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}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.DebugSnk|Win32.Build.0 = DebugSnk|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
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU
+ {B2A29FF2-A5C5-4F07-8CE7-FF5D744D7562}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Mixed platforms.ActiveCfg = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Mixed platforms.Build.0 = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Debug|Win32.Build.0 = Debug|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Any CPU.ActiveCfg = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Any CPU.Build.0 = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Mixed platforms.ActiveCfg = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Mixed platforms.Build.0 = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Win32.ActiveCfg = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.DebugSnk|Win32.Build.0 = DebugSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Mixed platforms.ActiveCfg = Release|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Mixed platforms.Build.0 = Release|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.Release|Win32.ActiveCfg = Release|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Any CPU.ActiveCfg = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Any CPU.Build.0 = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Mixed platforms.ActiveCfg = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Mixed platforms.Build.0 = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Win32.ActiveCfg = ReleaseSnk|Any CPU
+ {6222CA51-7D1A-4D42-B6A7-B5CE9608C18F}.ReleaseSnk|Win32.Build.0 = ReleaseSnk|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/mcs/class/Mono.C5/C5/.gitattributes b/mcs/class/Mono.C5/C5/.gitattributes new file mode 100644 index 00000000000..aedb6007a13 --- /dev/null +++ b/mcs/class/Mono.C5/C5/.gitattributes @@ -0,0 +1 @@ +C5.csproj -crlf diff --git a/mcs/class/Mono.C5/C5/AssemblyInfo.cs b/mcs/class/Mono.C5/C5/AssemblyInfo.cs index 7ffe0d36eb2..b9e028c4332 100644 --- a/mcs/class/Mono.C5/C5/AssemblyInfo.cs +++ b/mcs/class/Mono.C5/C5/AssemblyInfo.cs @@ -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 diff --git a/mcs/class/Mono.C5/C5/C5.csproj b/mcs/class/Mono.C5/C5/C5.csproj index e01de642ecf..f1a4feef209 100644 --- a/mcs/class/Mono.C5/C5/C5.csproj +++ b/mcs/class/Mono.C5/C5/C5.csproj @@ -1,121 +1,123 @@ -<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"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <ProductVersion>9.0.30729</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>3.5</OldToolsVersion>
+ <StartupObject>
+ </StartupObject>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ </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>
</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 Binary files differdeleted file mode 100644 index 9a1866653a8..00000000000 --- a/mcs/class/Mono.C5/C5/ClsdiagWork.png +++ /dev/null diff --git a/mcs/class/Mono.C5/C5/Collections.cs b/mcs/class/Mono.C5/C5/Collections.cs index 2fc7c55475a..a4164e9ffcd 100644 --- a/mcs/class/Mono.C5/C5/Collections.cs +++ b/mcs/class/Mono.C5/C5/Collections.cs @@ -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; diff --git a/mcs/class/Mono.C5/C5/hashing/HashTable.cs b/mcs/class/Mono.C5/C5/hashing/HashTable.cs index 7dbab93a0b7..1b6ece3b450 100644 --- a/mcs/class/Mono.C5/C5/hashing/HashTable.cs +++ b/mcs/class/Mono.C5/C5/hashing/HashTable.cs @@ -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 diff --git a/mcs/class/Mono.C5/C5/heaps/IntervalHeap.cs b/mcs/class/Mono.C5/C5/heaps/IntervalHeap.cs index 4d59c9547f5..8f3256747db 100644 --- a/mcs/class/Mono.C5/C5/heaps/IntervalHeap.cs +++ b/mcs/class/Mono.C5/C5/heaps/IntervalHeap.cs @@ -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 index 9577892f5d4..00000000000 --- a/mcs/class/Mono.C5/C5/trees/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -RedBlackTreeBag.cs
\ No newline at end of file diff --git a/mcs/class/Mono.C5/C5/trees/RedBlackTreeBag.cs b/mcs/class/Mono.C5/C5/trees/RedBlackTreeBag.cs index 033ca99824a..5003bf104a7 100644 --- a/mcs/class/Mono.C5/C5/trees/RedBlackTreeBag.cs +++ b/mcs/class/Mono.C5/C5/trees/RedBlackTreeBag.cs @@ -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; } diff --git a/mcs/class/Mono.C5/C5/trees/RedBlackTreeSet.cs b/mcs/class/Mono.C5/C5/trees/RedBlackTreeSet.cs index b137061f7ff..da19a754df7 100644 --- a/mcs/class/Mono.C5/C5/trees/RedBlackTreeSet.cs +++ b/mcs/class/Mono.C5/C5/trees/RedBlackTreeSet.cs @@ -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 index 00000000000..9f68b6228cb --- /dev/null +++ b/mcs/class/Mono.C5/RELEASE-NOTES.txt @@ -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. + +------------------------------ diff --git a/mcs/class/Mono.C5/Test/BasesTest.cs b/mcs/class/Mono.C5/Test/BasesTest.cs index 2576a4f21bb..49d07f92eef 100644 --- a/mcs/class/Mono.C5/Test/BasesTest.cs +++ b/mcs/class/Mono.C5/Test/BasesTest.cs @@ -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)); + } } } } diff --git a/mcs/class/Mono.C5/Test/SupportClasses.cs b/mcs/class/Mono.C5/Test/SupportClasses.cs index 3d118b37d8e..786c2327b7e 100644 --- a/mcs/class/Mono.C5/Test/SupportClasses.cs +++ b/mcs/class/Mono.C5/Test/SupportClasses.cs @@ -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() diff --git a/mcs/class/Mono.C5/Test/arrays/SortedArrayTests.cs b/mcs/class/Mono.C5/Test/arrays/SortedArrayTests.cs index b8ff1ea8195..4b1586989ed 100644 --- a/mcs/class/Mono.C5/Test/arrays/SortedArrayTests.cs +++ b/mcs/class/Mono.C5/Test/arrays/SortedArrayTests.cs @@ -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))); diff --git a/mcs/class/Mono.C5/Test/hashing/HashDictionaryTests.cs b/mcs/class/Mono.C5/Test/hashing/HashDictionaryTests.cs index a898f0ba1b3..3e1ffe00abe 100644 --- a/mcs/class/Mono.C5/Test/hashing/HashDictionaryTests.cs +++ b/mcs/class/Mono.C5/Test/hashing/HashDictionaryTests.cs @@ -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"); diff --git a/mcs/class/Mono.C5/Test/hashing/HashTableTests.cs b/mcs/class/Mono.C5/Test/hashing/HashTableTests.cs index 2bd058a4123..8e816ad5cb9 100644 --- a/mcs/class/Mono.C5/Test/hashing/HashTableTests.cs +++ b/mcs/class/Mono.C5/Test/hashing/HashTableTests.cs @@ -587,7 +587,6 @@ namespace C5UnitTests.hashtable.set [Test] - [Category("NotWorking")] public void RemoveAllCopies() { hashset.Add(5); hashset.Add(7); hashset.Add(5); diff --git a/mcs/class/Mono.C5/Test/heaps/HeapTests.cs b/mcs/class/Mono.C5/Test/heaps/HeapTests.cs index 31fa3e66702..c11480c7b48 100644 --- a/mcs/class/Mono.C5/Test/heaps/HeapTests.cs +++ b/mcs/class/Mono.C5/Test/heaps/HeapTests.cs @@ -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() { diff --git a/mcs/class/Mono.C5/Test/nunit.csproj b/mcs/class/Mono.C5/Test/nunit.csproj index 7bd3a240b6a..131dd022ed6 100644 --- a/mcs/class/Mono.C5/Test/nunit.csproj +++ b/mcs/class/Mono.C5/Test/nunit.csproj @@ -1,134 +1,139 @@ -<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"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <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>3.5</OldToolsVersion>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ </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.5.9.10348, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Program Files\NUnit 2.5.9\bin\net-2.0\framework\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ </VisualStudio>
+ </ProjectExtensions>
</Project>
\ No newline at end of file diff --git a/mcs/class/Mono.C5/Test/trees/Bag.cs b/mcs/class/Mono.C5/Test/trees/Bag.cs index 071208873e9..b808f17021b 100644 --- a/mcs/class/Mono.C5/Test/trees/Bag.cs +++ b/mcs/class/Mono.C5/Test/trees/Bag.cs @@ -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]; } diff --git a/mcs/class/Mono.C5/Test/trees/Dictionary.cs b/mcs/class/Mono.C5/Test/trees/Dictionary.cs index 83dfd291534..c38c9011b2f 100644 --- a/mcs/class/Mono.C5/Test/trees/Dictionary.cs +++ b/mcs/class/Mono.C5/Test/trees/Dictionary.cs @@ -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"); diff --git a/mcs/class/Mono.C5/Test/trees/RedBlackTreeSetTests.cs b/mcs/class/Mono.C5/Test/trees/RedBlackTreeSetTests.cs index d10b3d01c59..b1af00e2d36 100644 --- a/mcs/class/Mono.C5/Test/trees/RedBlackTreeSetTests.cs +++ b/mcs/class/Mono.C5/Test/trees/RedBlackTreeSetTests.cs @@ -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]; } |