-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
--- /dev/null
+C5.csproj -crlf
/*
- 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
// 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("")]
// 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
-<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
}
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;
#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
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)
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;
+++ /dev/null
-RedBlackTreeBag.cs
\ No newline at end of file
}
- private bool removeIterativePhase2(Node cursor, int level)
+private bool removeIterativePhase2(Node cursor, int level)
{
if (size == 1)
{
}
#if BAG
- int removedcount = cursor.items;
- size -= removedcount;
+ size -= cursor.items;
#else
//We are certain to remove one node:
size--;
#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
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
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
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
/// <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)
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
togo = cursor.items;
#endif
break;
- }
+ } // i < j, start point tree[start] is in left subtree
else
{
path[level++] = cursor;
#endif
}
}
- else
+ else // backwards
{
int i = start + length - 1;
{
int j = cursor.left == null ? 0 : cursor.left.size;
- if (i > j)
+ if (i > j)
{
#if BAG
if (i - j < cursor.items)
#endif
break;
}
- else
+ else // i <= j, end point tree[start+count-1] is in left subtree
{
cursor = cursor.left;
}
}
- private bool removeIterativePhase2(Node cursor, int level)
+private bool removeIterativePhase2(Node cursor, int level)
{
if (size == 1)
{
}
#if BAG
- int removedcount = cursor.items;
- size -= removedcount;
+ size -= cursor.items;
#else
//We are certain to remove one node:
size--;
#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
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
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
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
/// <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)
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
togo = cursor.items;
#endif
break;
- }
+ } // i < j, start point tree[start] is in left subtree
else
{
path[level++] = cursor;
#endif
}
}
- else
+ else // backwards
{
int i = start + length - 1;
{
int j = cursor.left == null ? 0 : cursor.left.size;
- if (i > j)
+ if (i > j)
{
#if BAG
if (i - j < cursor.items)
#endif
break;
}
- else
+ else // i <= j, end point tree[start+count-1] is in left subtree
{
cursor = cursor.left;
}
--- /dev/null
+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.
+
+------------------------------
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));
+ }
}
}
}
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()
[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();
[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);
[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);
[Test]
- [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+ [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
public void BadMap()
{
for (int i = 0; i < 11; i++)
}
[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)));
[Test]
- [ExpectedException(typeof(DuplicateNotAllowedException), "Key being added: 'A'")]
+ [ExpectedException(typeof(DuplicateNotAllowedException), ExpectedMessage="Key being added: 'A'")]
public void IllegalAdd()
{
dict.Add("A", "B");
[Test]
- [Category("NotWorking")]
public void RemoveAllCopies()
{
hashset.Add(5); hashset.Add(7); hashset.Add(5);
}
/// <summary>
- /// Bug by Viet Yen Nguyen <v.y.nguyen@alumnus.utwente.nl>
+ /// bug20070504.txt by Viet Yen Nguyen
/// </summary>
[Test]
public void Replace3()
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()
{
-<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
{
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
{
[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();
[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);
[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);
[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);
[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];
[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);
[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();
[Test]
- [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+ [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
public void BadMap()
{
for (int i = 0; i < 11; i++)
[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)));
[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()
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void GetRangeBad2()
{
- object foo = tree[3, 2];
+ object foo = tree[3, -1];
}
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void GetRangeBad3()
{
- object foo = tree[3, 12];
+ object foo = tree[3, 9];
}
[Test]
- [ExpectedException(typeof(DuplicateNotAllowedException), "Key being added: 'A'")]
+ [ExpectedException(typeof(DuplicateNotAllowedException), ExpectedMessage="Key being added: 'A'")]
public void IllegalAdd()
{
dict.Add("A", "B");
[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();
[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);
[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);
[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);
[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];
[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);
[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();
[Test]
- [ExpectedException(typeof(ArgumentException), "mapper not monotonic")]
+ [ExpectedException(typeof(ArgumentException), ExpectedMessage="mapper not monotonic")]
public void BadMap()
{
for (int i = 0; i < 11; i++)
}
[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)));
[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));
}
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void GetRangeBad2()
{
- object foo = tree[3, 2];
+ object foo = tree[3, -1];
}
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void GetRangeBad3()
{
- object foo = tree[3, 11];
+ object foo = tree[3, 8];
}