jedidotnet-commits Mailing List for JEDI.NET (Page 8)
Status: Pre-Alpha
Brought to you by:
jedi_mbe
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(81) |
Jul
(7) |
Aug
(8) |
Sep
(2) |
Oct
|
Nov
(47) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(32) |
Feb
|
Mar
(86) |
Apr
|
May
(1) |
Jun
(24) |
Jul
(4) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
|
Dec
(9) |
From: Andreas H. <ah...@us...> - 2004-12-10 11:58:32
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13457/run Modified Files: Jedi.IO.FileOfRec.pas Log Message: Changed header Index: Jedi.IO.FileOfRec.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.IO.FileOfRec.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.IO.FileOfRec.pas 5 Dec 2004 15:04:02 -0000 1.1 --- Jedi.IO.FileOfRec.pas 10 Dec 2004 11:58:23 -0000 1.2 *************** *** 11,15 **** The Initial Developer of the Original Code is Andreas Hausladen ! Portions created by Marcel Bestebroer are Copyright (C) 2004 Andreas Hausladen All Rights Reserved. --- 11,15 ---- The Initial Developer of the Original Code is Andreas Hausladen ! Portions created by Andreas Hausladen are Copyright (C) 2004 Andreas Hausladen All Rights Reserved. |
From: Marcel B. <jed...@us...> - 2004-12-06 11:44:21
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22823/nunit Modified Files: Nunit.Jedi.IO.bdsproj Nunit.Jedi.IO.dpk Nunit.Jedi.System.bdsproj Nunit.Jedi.System.dpk Log Message: Units renamed for better readability in the NUnit application. Index: Nunit.Jedi.System.dpk =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.System.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.System.dpk 5 Dec 2004 14:44:35 -0000 1.1 --- Nunit.Jedi.System.dpk 6 Dec 2004 11:44:09 -0000 1.2 *************** *** 31,36 **** contains ! Jedi.System.AttributesNUnit in 'source\Jedi.System.AttributesNUnit.pas', ! Jedi.System.StringsNUnit in 'source\Jedi.System.StringsNUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.System')] --- 31,36 ---- contains ! Jedi.System.Attributes.NUnit in 'source\Jedi.System.Attributes.NUnit.pas', ! Jedi.System.Strings.NUnit in 'source\Jedi.System.Strings.NUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.System')] Index: Nunit.Jedi.System.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.System.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.System.bdsproj 5 Dec 2004 14:44:35 -0000 1.1 --- Nunit.Jedi.System.bdsproj 6 Dec 2004 11:44:09 -0000 1.2 *************** *** 174,179 **** <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> ! <File FileName="source\Jedi.System.AttributesNUnit.pas" ContainerId="" ModuleName="Jedi.System.AttributesNUnit"/> ! <File FileName="source\Jedi.System.StringsNUnit.pas" ContainerId="" ModuleName="Jedi.System.StringsNUnit"/> </FileList> </DelphiDotNet.Personality> --- 174,179 ---- <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> ! <File FileName="source\Jedi.System.Attributes.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Attributes.NUnit"/> ! <File FileName="source\Jedi.System.Strings.NUnit.pas" ContainerId="" ModuleName="Jedi.System.Strings.NUnit"/> </FileList> </DelphiDotNet.Personality> Index: Nunit.Jedi.IO.dpk =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.IO.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.IO.dpk 5 Dec 2004 14:44:35 -0000 1.1 --- Nunit.Jedi.IO.dpk 6 Dec 2004 11:44:09 -0000 1.2 *************** *** 31,36 **** contains ! Jedi.IO.PathNunit in 'source\Jedi.IO.PathNunit.pas', ! Jedi.IO.BaseNUnit in 'source\Jedi.IO.BaseNUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.IO')] --- 31,36 ---- contains ! Jedi.IO.Paths.Nunit in 'source\Jedi.IO.Paths.Nunit.pas', ! Jedi.IO.NUnit in 'source\Jedi.IO.NUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.IO')] Index: Nunit.Jedi.IO.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/nunit/Nunit.Jedi.IO.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.IO.bdsproj 5 Dec 2004 14:44:35 -0000 1.1 --- Nunit.Jedi.IO.bdsproj 6 Dec 2004 11:44:09 -0000 1.2 *************** *** 1,166 **** <?xml version="1.0" encoding="utf-8"?> <BorlandProject> ! <PersonalityInfo> ! <Option> ! <Option Name="Personality">DelphiDotNet.Personality</Option> ! <Option Name="ProjectType"></Option> ! <Option Name="Version">1.0</Option> ! <Option Name="GUID">{303B5E5A-87A4-460C-ADF6-D64202C8DF84}</Option> ! </Option> ! </PersonalityInfo> ! <DelphiDotNet.Personality> ! <Source> ! <Source Name="MainSource">Nunit.Jedi.IO.dpk</Source> ! </Source> ! <FileVersion> ! <FileVersion Name="Version">7.0</FileVersion> ! </FileVersion> ! <Compiler> ! <Compiler Name="A">0</Compiler> ! <Compiler Name="B">0</Compiler> ! <Compiler Name="C">1</Compiler> ! <Compiler Name="D">1</Compiler> ! <Compiler Name="E">0</Compiler> ! <Compiler Name="F">0</Compiler> ! <Compiler Name="G">1</Compiler> ! <Compiler Name="H">1</Compiler> ! <Compiler Name="I">1</Compiler> ! <Compiler Name="J">0</Compiler> ! <Compiler Name="K">0</Compiler> ! <Compiler Name="L">1</Compiler> ! <Compiler Name="M">0</Compiler> ! <Compiler Name="N">1</Compiler> ! <Compiler Name="O">1</Compiler> ! <Compiler Name="P">1</Compiler> ! <Compiler Name="Q">0</Compiler> ! <Compiler Name="R">0</Compiler> ! <Compiler Name="S">0</Compiler> ! <Compiler Name="T">0</Compiler> ! <Compiler Name="U">0</Compiler> ! <Compiler Name="V">1</Compiler> ! <Compiler Name="W">0</Compiler> ! <Compiler Name="X">1</Compiler> ! <Compiler Name="Y">1</Compiler> ! <Compiler Name="Z">1</Compiler> ! <Compiler Name="ShowHints">True</Compiler> ! <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;Jedi.System=Jedi.System.Attributes, Jedi.System.Strings;Jedi.Collections=Jedi.Collections.InlineEditable;Jedi.IO=Jedi.IO.Paths</Compiler> ! <Compiler Name="NamespacePrefix"></Compiler> ! <Compiler Name="GenerateDocumentation">False</Compiler> ! <Compiler Name="DefaultNamespace"></Compiler> ! <Compiler Name="SymbolDeprecated">True</Compiler> ! <Compiler Name="SymbolLibrary">True</Compiler> ! <Compiler Name="SymbolPlatform">True</Compiler> ! <Compiler Name="SymbolExperimental">True</Compiler> ! <Compiler Name="UnitLibrary">True</Compiler> ! <Compiler Name="UnitPlatform">True</Compiler> ! <Compiler Name="UnitDeprecated">True</Compiler> ! <Compiler Name="UnitExperimental">True</Compiler> ! <Compiler Name="HResultCompat">True</Compiler> ! <Compiler Name="HidingMember">True</Compiler> ! <Compiler Name="HiddenVirtual">True</Compiler> ! <Compiler Name="Garbage">True</Compiler> ! <Compiler Name="BoundsError">True</Compiler> ! <Compiler Name="ZeroNilCompat">True</Compiler> ! <Compiler Name="StringConstTruncated">True</Compiler> ! <Compiler Name="ForLoopVarVarPar">True</Compiler> ! <Compiler Name="TypedConstVarPar">True</Compiler> ! <Compiler Name="AsgToTypedConst">True</Compiler> ! <Compiler Name="CaseLabelRange">True</Compiler> ! <Compiler Name="ForVariable">True</Compiler> ! <Compiler Name="ConstructingAbstract">True</Compiler> ! <Compiler Name="ComparisonFalse">True</Compiler> ! <Compiler Name="ComparisonTrue">True</Compiler> ! <Compiler Name="ComparingSignedUnsigned">True</Compiler> ! <Compiler Name="CombiningSignedUnsigned">True</Compiler> ! <Compiler Name="UnsupportedConstruct">True</Compiler> ! <Compiler Name="FileOpen">True</Compiler> ! <Compiler Name="FileOpenUnitSrc">True</Compiler> ! <Compiler Name="BadGlobalSymbol">True</Compiler> ! <Compiler Name="DuplicateConstructorDestructor">True</Compiler> ! <Compiler Name="InvalidDirective">True</Compiler> ! <Compiler Name="PackageNoLink">True</Compiler> ! <Compiler Name="PackageThreadVar">True</Compiler> ! <Compiler Name="ImplicitImport">True</Compiler> ! <Compiler Name="HPPEMITIgnored">True</Compiler> ! <Compiler Name="NoRetVal">True</Compiler> ! <Compiler Name="UseBeforeDef">True</Compiler> ! <Compiler Name="ForLoopVarUndef">True</Compiler> ! <Compiler Name="UnitNameMismatch">True</Compiler> ! <Compiler Name="NoCFGFileFound">True</Compiler> ! <Compiler Name="MessageDirective">True</Compiler> ! <Compiler Name="ImplicitVariants">True</Compiler> ! <Compiler Name="UnicodeToLocale">True</Compiler> ! <Compiler Name="LocaleToUnicode">True</Compiler> ! <Compiler Name="ImagebaseMultiple">True</Compiler> ! <Compiler Name="SuspiciousTypecast">True</Compiler> ! <Compiler Name="PrivatePropAccessor">True</Compiler> ! <Compiler Name="UnsafeType">True</Compiler> ! <Compiler Name="UnsafeCode">True</Compiler> ! <Compiler Name="UnsafeCast">True</Compiler> ! <Compiler Name="OptionTruncated">True</Compiler> ! <Compiler Name="WideCharReduced">True</Compiler> ! <Compiler Name="DuplicatesIgnored">True</Compiler> ! </Compiler> ! <Linker> ! <Linker Name="MapFile">0</Linker> ! <Linker Name="OutputObjs">0</Linker> ! <Linker Name="ConsoleApp">1</Linker> ! <Linker Name="DebugInfo">True</Linker> ! <Linker Name="RemoteSymbols">False</Linker> ! <Linker Name="GenerateDRC">False</Linker> ! <Linker Name="MinStackSize">4096</Linker> ! <Linker Name="MaxStackSize">1048576</Linker> ! <Linker Name="ImageBase">4194304</Linker> ! <Linker Name="ExeDescription"></Linker> ! </Linker> ! <Directories> ! <Directories Name="OutputDir"></Directories> ! <Directories Name="UnitOutputDir">lib</Directories> ! <Directories Name="PackageDLLOutputDir">bin</Directories> ! <Directories Name="PackageDCPOutputDir">bin</Directories> ! <Directories Name="SearchPath">$(BDS)\Lib;..\main\bin</Directories> ! <Directories Name="Packages">nunit.framework.dll;Jedi.IO;Borland.Delphi</Directories> ! <Directories Name="Conditionals"></Directories> ! <Directories Name="DebugSourceDirs"></Directories> ! <Directories Name="UsePackages">False</Directories> ! </Directories> ! <Parameters> ! <Parameters Name="RunParams"></Parameters> ! <Parameters Name="HostApplication"></Parameters> ! <Parameters Name="Launcher"></Parameters> ! <Parameters Name="UseLauncher">False</Parameters> ! <Parameters Name="DebugCWD"></Parameters> ! <Parameters Name="RemoteHost"></Parameters> ! <Parameters Name="RemotePath"></Parameters> ! <Parameters Name="RemoteLauncher"></Parameters> ! <Parameters Name="RemoteCWD"></Parameters> ! <Parameters Name="RemoteDebug">False</Parameters> ! </Parameters> ! <VersionInfo> ! <VersionInfo Name="IncludeVerInfo">True</VersionInfo> ! <VersionInfo Name="AutoIncBuild">False</VersionInfo> ! <VersionInfo Name="MajorVer">1</VersionInfo> ! <VersionInfo Name="MinorVer">0</VersionInfo> ! <VersionInfo Name="Release">0</VersionInfo> ! <VersionInfo Name="Build">0</VersionInfo> ! <VersionInfo Name="Debug">False</VersionInfo> ! <VersionInfo Name="PreRelease">False</VersionInfo> ! <VersionInfo Name="Special">False</VersionInfo> ! <VersionInfo Name="Private">False</VersionInfo> ! <VersionInfo Name="DLL">False</VersionInfo> ! <VersionInfo Name="Locale">1043</VersionInfo> ! <VersionInfo Name="CodePage">1252</VersionInfo> ! </VersionInfo> ! <VersionInfoKeys> ! <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> ! <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> ! </VersionInfoKeys> <FileList> <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> ! <File FileName="source\Jedi.IO.PathNunit.pas" ContainerId="" ModuleName="Jedi.IO.PathNunit"/> ! <File FileName="source\Jedi.IO.BaseNUnit.pas" ContainerId="" ModuleName="Jedi.IO.BaseNUnit"/> </FileList> </DelphiDotNet.Personality> --- 1,166 ---- <?xml version="1.0" encoding="utf-8"?> <BorlandProject> ! <PersonalityInfo> ! <Option> ! <Option Name="Personality">DelphiDotNet.Personality</Option> ! <Option Name="ProjectType"></Option> ! <Option Name="Version">1.0</Option> ! <Option Name="GUID">{303B5E5A-87A4-460C-ADF6-D64202C8DF84}</Option> ! </Option> ! </PersonalityInfo> ! <DelphiDotNet.Personality> ! <Source> ! <Source Name="MainSource">Nunit.Jedi.IO.dpk</Source> ! </Source> ! <FileVersion> ! <FileVersion Name="Version">7.0</FileVersion> ! </FileVersion> ! <Compiler> ! <Compiler Name="A">0</Compiler> ! <Compiler Name="B">0</Compiler> ! <Compiler Name="C">1</Compiler> ! <Compiler Name="D">1</Compiler> ! <Compiler Name="E">0</Compiler> ! <Compiler Name="F">0</Compiler> ! <Compiler Name="G">1</Compiler> ! <Compiler Name="H">1</Compiler> ! <Compiler Name="I">1</Compiler> ! <Compiler Name="J">0</Compiler> ! <Compiler Name="K">0</Compiler> ! <Compiler Name="L">1</Compiler> ! <Compiler Name="M">0</Compiler> ! <Compiler Name="N">1</Compiler> ! <Compiler Name="O">1</Compiler> ! <Compiler Name="P">1</Compiler> ! <Compiler Name="Q">0</Compiler> ! <Compiler Name="R">0</Compiler> ! <Compiler Name="S">0</Compiler> ! <Compiler Name="T">0</Compiler> ! <Compiler Name="U">0</Compiler> ! <Compiler Name="V">1</Compiler> ! <Compiler Name="W">0</Compiler> ! <Compiler Name="X">1</Compiler> ! <Compiler Name="Y">1</Compiler> ! <Compiler Name="Z">1</Compiler> ! <Compiler Name="ShowHints">True</Compiler> ! <Compiler Name="ShowWarnings">True</Compiler> ! <Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;Jedi.System=Jedi.System.Attributes, Jedi.System.Strings;Jedi.Collections=Jedi.Collections.InlineEditable;Jedi.IO=Jedi.IO.Paths</Compiler> ! <Compiler Name="NamespacePrefix"></Compiler> ! <Compiler Name="GenerateDocumentation">False</Compiler> ! <Compiler Name="DefaultNamespace"></Compiler> ! <Compiler Name="SymbolDeprecated">True</Compiler> ! <Compiler Name="SymbolLibrary">True</Compiler> ! <Compiler Name="SymbolPlatform">True</Compiler> ! <Compiler Name="SymbolExperimental">True</Compiler> ! <Compiler Name="UnitLibrary">True</Compiler> ! <Compiler Name="UnitPlatform">True</Compiler> ! <Compiler Name="UnitDeprecated">True</Compiler> ! <Compiler Name="UnitExperimental">True</Compiler> ! <Compiler Name="HResultCompat">True</Compiler> ! <Compiler Name="HidingMember">True</Compiler> ! <Compiler Name="HiddenVirtual">True</Compiler> ! <Compiler Name="Garbage">True</Compiler> ! <Compiler Name="BoundsError">True</Compiler> ! <Compiler Name="ZeroNilCompat">True</Compiler> ! <Compiler Name="StringConstTruncated">True</Compiler> ! <Compiler Name="ForLoopVarVarPar">True</Compiler> ! <Compiler Name="TypedConstVarPar">True</Compiler> ! <Compiler Name="AsgToTypedConst">True</Compiler> ! <Compiler Name="CaseLabelRange">True</Compiler> ! <Compiler Name="ForVariable">True</Compiler> ! <Compiler Name="ConstructingAbstract">True</Compiler> ! <Compiler Name="ComparisonFalse">True</Compiler> ! <Compiler Name="ComparisonTrue">True</Compiler> ! <Compiler Name="ComparingSignedUnsigned">True</Compiler> ! <Compiler Name="CombiningSignedUnsigned">True</Compiler> ! <Compiler Name="UnsupportedConstruct">True</Compiler> ! <Compiler Name="FileOpen">True</Compiler> ! <Compiler Name="FileOpenUnitSrc">True</Compiler> ! <Compiler Name="BadGlobalSymbol">True</Compiler> ! <Compiler Name="DuplicateConstructorDestructor">True</Compiler> ! <Compiler Name="InvalidDirective">True</Compiler> ! <Compiler Name="PackageNoLink">True</Compiler> ! <Compiler Name="PackageThreadVar">True</Compiler> ! <Compiler Name="ImplicitImport">True</Compiler> ! <Compiler Name="HPPEMITIgnored">True</Compiler> ! <Compiler Name="NoRetVal">True</Compiler> ! <Compiler Name="UseBeforeDef">True</Compiler> ! <Compiler Name="ForLoopVarUndef">True</Compiler> ! <Compiler Name="UnitNameMismatch">True</Compiler> ! <Compiler Name="NoCFGFileFound">True</Compiler> ! <Compiler Name="MessageDirective">True</Compiler> ! <Compiler Name="ImplicitVariants">True</Compiler> ! <Compiler Name="UnicodeToLocale">True</Compiler> ! <Compiler Name="LocaleToUnicode">True</Compiler> ! <Compiler Name="ImagebaseMultiple">True</Compiler> ! <Compiler Name="SuspiciousTypecast">True</Compiler> ! <Compiler Name="PrivatePropAccessor">True</Compiler> ! <Compiler Name="UnsafeType">True</Compiler> ! <Compiler Name="UnsafeCode">True</Compiler> ! <Compiler Name="UnsafeCast">True</Compiler> ! <Compiler Name="OptionTruncated">True</Compiler> ! <Compiler Name="WideCharReduced">True</Compiler> ! <Compiler Name="DuplicatesIgnored">True</Compiler> ! </Compiler> ! <Linker> ! <Linker Name="MapFile">0</Linker> ! <Linker Name="OutputObjs">0</Linker> ! <Linker Name="ConsoleApp">1</Linker> ! <Linker Name="DebugInfo">True</Linker> ! <Linker Name="RemoteSymbols">False</Linker> ! <Linker Name="GenerateDRC">False</Linker> ! <Linker Name="MinStackSize">4096</Linker> ! <Linker Name="MaxStackSize">1048576</Linker> ! <Linker Name="ImageBase">4194304</Linker> ! <Linker Name="ExeDescription"></Linker> ! </Linker> ! <Directories> ! <Directories Name="OutputDir"></Directories> ! <Directories Name="UnitOutputDir">lib</Directories> ! <Directories Name="PackageDLLOutputDir">bin</Directories> ! <Directories Name="PackageDCPOutputDir">bin</Directories> ! <Directories Name="SearchPath">$(BDS)\Lib;..\main\bin</Directories> ! <Directories Name="Packages">nunit.framework.dll;Jedi.IO;Borland.Delphi</Directories> ! <Directories Name="Conditionals"></Directories> ! <Directories Name="DebugSourceDirs"></Directories> ! <Directories Name="UsePackages">False</Directories> ! </Directories> ! <Parameters> ! <Parameters Name="RunParams"></Parameters> ! <Parameters Name="HostApplication"></Parameters> ! <Parameters Name="Launcher"></Parameters> ! <Parameters Name="UseLauncher">False</Parameters> ! <Parameters Name="DebugCWD"></Parameters> ! <Parameters Name="RemoteHost"></Parameters> ! <Parameters Name="RemotePath"></Parameters> ! <Parameters Name="RemoteLauncher"></Parameters> ! <Parameters Name="RemoteCWD"></Parameters> ! <Parameters Name="RemoteDebug">False</Parameters> ! </Parameters> ! <VersionInfo> ! <VersionInfo Name="IncludeVerInfo">True</VersionInfo> ! <VersionInfo Name="AutoIncBuild">False</VersionInfo> ! <VersionInfo Name="MajorVer">1</VersionInfo> ! <VersionInfo Name="MinorVer">0</VersionInfo> ! <VersionInfo Name="Release">0</VersionInfo> ! <VersionInfo Name="Build">0</VersionInfo> ! <VersionInfo Name="Debug">False</VersionInfo> ! <VersionInfo Name="PreRelease">False</VersionInfo> ! <VersionInfo Name="Special">False</VersionInfo> ! <VersionInfo Name="Private">False</VersionInfo> ! <VersionInfo Name="DLL">False</VersionInfo> ! <VersionInfo Name="Locale">1043</VersionInfo> ! <VersionInfo Name="CodePage">1252</VersionInfo> ! </VersionInfo> ! <VersionInfoKeys> ! <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> ! <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> ! </VersionInfoKeys> <FileList> <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="..\main\bin\Jedi.IO.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.IO" AssemblyName="Jedi.IO" Version="1.0.0.0" LinkUnits="False"/> <File FileName="nunit.framework.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="nunit.framework" AssemblyName="nunit.framework" Version="2.2.1.0" LinkUnits="False"/> ! <File FileName="source\Jedi.IO.Paths.Nunit.pas" ContainerId="" ModuleName="Jedi.IO.Paths.Nunit"/> ! <File FileName="source\Jedi.IO.NUnit.pas" ContainerId="" ModuleName="Jedi.IO.NUnit"/> </FileList> </DelphiDotNet.Personality> |
From: Marcel B. <jed...@us...> - 2004-12-06 11:44:21
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22823/nunit/source Added Files: Jedi.IO.NUnit.pas Jedi.IO.Paths.Nunit.pas Jedi.System.Attributes.NUnit.pas Jedi.System.Strings.NUnit.pas Removed Files: Jedi.IO.BaseNUnit.pas Jedi.IO.PathNunit.pas Jedi.System.AttributesNUnit.pas Jedi.System.StringsNUnit.pas Log Message: Units renamed for better readability in the NUnit application. --- NEW FILE: Jedi.System.Attributes.NUnit.pas --- unit Jedi.System.Attributes.NUnit; interface uses System.ComponentModel, NUnit.Framework, Jedi.System.Attributes; type AttrTestsBase =class strict protected List1: array of Attribute; List2: AttributeCollection; ListAfterAdd: array of Attribute; ListAfterAddAndReplace: array of Attribute; ListAfterDelete: array of Attribute; ListAfterReplace: array of Attribute; public [TestFixtureSetup] procedure TestSetup; end; [TestFixture] Combining = class (AttrTestsBase) public [Test] procedure Add; [Test] procedure AddAndReplace; [Test] procedure Delete; [Test] procedure Replace; end; [TestFixture] Retrieval = class (AttrTestsBase) public [Test] procedure ByType; [Test] procedure ByInstance; end; implementation {$REGION 'Test attributes'} type TestAttributeBase = class (Attribute) public constructor Create(value: &Object); public Value: &Object; end; TestAttribute1 = class (TestAttributeBase); TestAttribute2 = class (TestAttributeBase); TestAttribute3 = class (TestAttributeBase); TestAttribute4 = class (TestAttributeBase); TestAttribute5 = class (TestAttributeBase); TestAttribute6 = class (TestAttributeBase); TestAttribute7 = class (TestAttributeBase); TestAttribute8 = class (TestAttributeBase); TestAttribute9 = class (TestAttributeBase); TestAttribute11 = class (TestAttribute1); TestAttribute12 = class (TestAttribute1); TestAttribute111 = class (TestAttribute11); TestAttribute112 = class (TestAttribute11); TestAttribute121 = class (TestAttribute12); TestAttribute122 = class (TestAttribute12); TestAttribute21 = class (TestAttribute2); TestAttribute22 = class (TestAttribute2); TestAttribute211 = class (TestAttribute21); TestAttribute212 = class (TestAttribute21); TestAttribute221 = class (TestAttribute22); TestAttribute222 = class (TestAttribute22); {$REGION 'TestAttributeBase'} constructor TestAttributeBase.Create(value: &Object); begin inherited Create; Self.Value := value; end; {$ENDREGION} {$ENDREGION} {$REGION 'AttrTestsBase'} procedure AttrTestsBase.TestSetup; begin List1 := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); List2 := AttributeCollection.Create(AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') )); ListAfterAdd := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterAddAndReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterDelete := AttributeArray.Create( TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); ListAfterReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); end; {$ENDREGION} {$REGION 'Combining'} procedure Combining.Add; var newList: array of Attribute; begin newList := AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Add); Assert.AreEqual(ListAfterAdd, newList); end; procedure Combining.AddAndReplace; var newList: array of Attribute; begin newList := AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.AddAndReplace); Assert.AreEqual(ListAfterAddAndReplace, newList); end; procedure Combining.Delete; var newList: array of Attribute; begin newList := AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Delete); Assert.AreEqual(ListAfterDelete, newList); end; procedure Combining.Replace; var newList: array of Attribute; begin newList := AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Replace); Assert.AreEqual(ListAfterReplace, newList); end; {$ENDREGION} {$REGION 'Retrieval'} procedure Retrieval.ByType; var attr: Attribute; begin attr := AttributeUtils.GetAttribute(List1, TypeOf(TestAttribute1)); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := AttributeUtils.GetAttribute(List2, TypeOf(TestAttribute1)); Assert.AreSame(List2[0], attr, 'List2[0]'); end; procedure Retrieval.ByInstance; var attr: Attribute; begin attr := TestAttribute1.Create('Attribute 1, list 1.'); attr := AttributeUtils.GetAttribute(List1, attr); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := TestAttribute1.Create('Attribute 1, list 2.'); attr := AttributeUtils.GetAttribute(List2, attr); Assert.AreSame(List2[0], attr, 'List2[0]'); attr := TestAttribute1.Create('Attribute x, list 1.'); attr := AttributeUtils.GetAttribute(List1, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list1.'')'); attr := TestAttribute1.Create('Attribute x, list 2.'); attr := AttributeUtils.GetAttribute(List2, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list2.'')'); end; {$ENDREGION} end. --- Jedi.System.AttributesNUnit.pas DELETED --- --- NEW FILE: Jedi.System.Strings.NUnit.pas --- unit Jedi.System.Strings.NUnit; interface uses Jedi.System, NUnit.Framework; type [TestFixture] TabSet = class strict protected TabSet1: StringUtils.TabSet; TabSet2: StringUtils.TabSet; TabSet3: StringUtils.TabSet; public [TestFixtureSetUp] procedure Init; [Test] procedure SimpleTabulation; [Test] procedure SpecifiedTabsWithAutoDefault; [Test] procedure SpecifiedTabsWithDefault; [Test] procedure CloneAndEqual; [Test] procedure RemovingTabs; [Test] procedure AddingTabs; [Test] procedure ConvertToString; end; [TestFixture] QuotedStrings = class strict protected const sSimpleTest = 'This is a simple test string.'; const sSimpleTestQuoted = '''This is a simple test string.'''; const sSimpleTestWithQuotes = 'This is a ''simple'' test string.'; const sSimpleTestWithQuotesQuoted = '''This is a ''''simple'''' test string.'''; const sSimpleTestWithOtherQuotes = 'This is a "simple" test string.'; const sSimpleTestWithOtherQuotesQuoted = '''This is a "simple" test string.'''; const sSimpleTestWithGarbageQuoted = '''This is a simple test string.'' With garbage.'; const sSimpleTestMissingEndQuote = '''This is a simple test string.'; const sComplexTest = 'Assuming single quotation ('') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used '+ 'quotation charachter. Scary combinations: ''''abc'''' and ""def""'; const sComplexTestQuoted = '''Assuming single quotation ('''') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''''''abc'''''''' and '+ '""def""'''; const sComplexTestAlternateQuoted = '"Assuming single quotation ('') or double quotation ("") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''abc'''' and """"def"""""'; public [Test] procedure QuoteComplexString; [Test] procedure QuoteComplexStringWithAlternateQuoting; [Test] procedure QuoteSimpleString; [Test] procedure QuoteStringWithQuotes; [Test] procedure QuoteStringWithOtherQuotes; [Test] procedure RoundtripSimpleString; [Test] procedure RoundtripStringWithQuotes; [Test] procedure RoundtripStringWithOtherQuotes; [Test] procedure RoundtripComplexString; [Test] procedure RoundtripComplexStringWithAlternateQuoting; [ExpectedException(TypeOf(FormatException), 'String ends in garbage.')] [Test] procedure DequoteStringWithGarbage; [ExpectedException(TypeOf(FormatException), 'End quote missing.')] [Test] procedure DequoteStringWithoutEndQuote; [Test] procedure DequoteStringWithAllowedGarbage; [Test] procedure DequoteStringAllowedMissingEndQuote; [Test] procedure DequoteStringCheckGarbage; [Test] procedure DequoteStringCheckEndQuote; [Test] procedure DequoteNonQuotedString; end; [TestFixture] Substrings = class strict protected const sDelimTest = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestBeforeParenthesis = '|Abc'; const sDelimTestBeforeBrace = '|Abc(def)'; const sDelimTestBeforeDot = '|Abc(def){ghi}.'; const sDelimTestBeforeSemiColon = '|Abc(def){ghi}.jkl'; const sDelimTestBeforeEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastParenthesis = '|Abc(def){ghi}.jkl;mno='; const sDelimTestBeforeLastBrace = '|Abc(def){ghi}.jkl;mno=(pqr)'; const sDelimTestBeforeLastDot = '|Abc(def){ghi}.jkl;mno=(pqr){stu}'; const sDelimTestBeforeLastSemiColon = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx'; const sDelimTestBeforeLastPipe = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz'; const sDelimTestAfterFirstPipe = 'Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstParenthesis = 'def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstBrace = 'ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstDot = 'jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstSemiColon = 'mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterParenthesis = 'pqr){stu}.vwx;yz|'; const sDelimTestAfterBrace = 'stu}.vwx;yz|'; const sDelimTestAfterDot = 'vwx;yz|'; const sDelimTestAfterSemiColon = 'yz|'; const sSliceTest = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; public [Test] procedure AfterSingleDelimiter; [Test] procedure AfterMultipleDelimiters; [Test] procedure AfterLastSingleDelimiter; [Test] procedure AfterLastMultipleDelimiters; [Test] procedure BeforeSingleDelimiter; [Test] procedure BeforeMultipleDelimiters; [Test] procedure BeforeLastSingleDelimiter; [Test] procedure BeforeLastMultipleDelimiters; [Test] procedure Left; [Test] procedure Mid; [Test] procedure Right; end; [TestFixture] Manipulations = class strict protected const sTabTest1 = 'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; const sTabTest2 = #9'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; // 1 2 3 4 5 6 7 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789 const sTabTest1Output1 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output2 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output3 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output1 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output2 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output3 = ' Abc Def Ghi Jkl Mno Pqr'; strict protected const sTest1 = '***abc***def***ghi***'; const sTest1Output = '*abc*def*ghi*'; strict protected const sRepeatInput = 'ab(cd)ef'; const sRepeatOutput0 = ''; const sRepeatOutput1 = 'ab(cd)ef'; const sRepeatOutput10 = 'ab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)ef'; public [Test] procedure ExpandTabs; [Test] procedure RemoveDuplicates; [Test] procedure &Repeat; end; implementation {$REGION 'TabSet'} procedure TabSet.ConvertToString; begin Assert.AreEqual('[] and every 2', TabSet1.ToString, 'TabSet1.ToString'); Assert.AreEqual('[15,20,40,44] and every 4 (automatic)', TabSet2.ToString, 'TabSet2.ToString'); Assert.AreEqual('[15,20,40,44] and every 2', TabSet3.ToString, 'TabSet3.ToString'); Assert.AreEqual('[] and every 2 (automatic)', StringUtils.TabSet.Create.ToString, 'StringUtils.TabSet.Create.ToString'); Assert.AreEqual('every 2 (automatic)', StringUtils.TabSet.Create.ToString(True, False, True), 'StringUtils.TabSet.Create.ToString(true, false, true)'); Assert.AreEqual('15,20,40,44', TabSet2.ToString(False, False, False), 'TabSet2.ToString(false, false, false)'); end; procedure TabSet.Init; begin TabSet1 := StringUtils.TabSet.Create(2); TabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); TabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); end; procedure TabSet.SimpleTabulation; begin // TabSet1 should always tabulate to even positions Assert.AreEqual(TabSet1.TabFrom(1), 2); Assert.AreEqual(TabSet1.TabFrom(2), 4); Assert.AreEqual(TabSet1.TabFrom(3), 4); Assert.AreEqual(TabSet1.TabFrom(51), 52); Assert.AreEqual(TabSet1.TabFrom(52), 54); end; procedure TabSet.SpecifiedTabsWithAutoDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 4 (44-40) for i := 0 to 14 do Assert.AreEqual(TabSet2.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet2.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet2.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet2.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(TabSet2.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(TabSet2.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.SpecifiedTabsWithDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 2 for i := 0 to 14 do Assert.AreEqual(TabSet3.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet3.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet3.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet3.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(TabSet3.TabFrom(i), 46, 'Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(TabSet3.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(TabSet3.TabFrom(i), 50, 'Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(TabSet3.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.CloneAndEqual; var tempSet: StringUtils.TabSet; begin tempSet := StringUtils.TabSet(TabSet1.Clone); Assert.AreNotSame(TabSet1, tempSet); Assert.AreEqual(TabSet1, tempSet, 'Cloned'); tempSet.Add(2); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=2'); tempSet.DefaultWidth := 0; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=0 (automatic)'); tempSet.Add(4); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2,4], DefaultWidth=0 (automatic)'); tempSet.Clear; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[], DefaultWidth=0 (automatic)'); end; procedure TabSet.RemovingTabs; var tempSet: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(20); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 20; Tabulate from {0}', [i]); for i := 15 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 20; Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 20; Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Removed 20; Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Removed 20; Tabulate from {0}', [i]); for i := 52 to 55 do Assert.AreEqual(tempSet.TabFrom(i), 56, 'Removed 20; Tabulate from {0}', [i]); for i := 56 to 59 do Assert.AreEqual(tempSet.TabFrom(i), 60, 'Removed 20; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40; Tabulate from {0}', [i]); for i := 20 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 40; Tabulate from {0}', [i]); for i := 44 to 67 do Assert.AreEqual(tempSet.TabFrom(i), 68, 'Removed 40; Tabulate from {0}', [i]); for i := 68 to 91 do Assert.AreEqual(tempSet.TabFrom(i), 92, 'Removed 40; Tabulate from {0}', [i]); for i := 92 to 115 do Assert.AreEqual(tempSet.TabFrom(i), 116, 'Removed 40; Tabulate from {0}', [i]); for i := 116 to 139 do Assert.AreEqual(tempSet.TabFrom(i), 140, 'Removed 40; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40, True); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40+; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40+; Tabulate from {0}', [i]); for i := 20 to 24 do Assert.AreEqual(tempSet.TabFrom(i), 25, 'Removed 40+; Tabulate from {0}', [i]); for i := 25 to 29 do Assert.AreEqual(tempSet.TabFrom(i), 30, 'Removed 40+; Tabulate from {0}', [i]); for i := 30 to 34 do Assert.AreEqual(tempSet.TabFrom(i), 35, 'Removed 40+; Tabulate from {0}', [i]); for i := 35 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 40+; Tabulate from {0}', [i]); for i := 40 to 44 do Assert.AreEqual(tempSet.TabFrom(i), 45, 'Removed 40+; Tabulate from {0}', [i]); end; procedure TabSet.AddingTabs; var tempSet: StringUtils.TabSet; tempSet2: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Add(42); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Added 42; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Added 42; Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Added 42; Tabulate from {0}', [i]); for i := 40 to 41 do Assert.AreEqual(tempSet.TabFrom(i), 42, 'Added 42; Tabulate from {0}', [i]); for i := 42 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Added 42; Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(tempSet.TabFrom(i), 46, 'Added 42; Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Added 42; Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(tempSet.TabFrom(i), 50, 'Added 42; Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Added 42; Tabulate from {0}', [i]); tempSet2 := StringUtils.TabSet.Create([40, 20, 15], 2); Assert.AreEqual(tempSet2, tempSet); end; {$ENDREGION} {$REGION 'QuotedStrings'} procedure QuotedStrings.QuoteComplexString; var s: string; begin s := StringUtils.QuoteString(sComplexTest, ''''); Assert.AreEqual(s, sComplexTestQuoted); end; procedure QuotedStrings.QuoteComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.QuoteString(sComplexTest, '"'); Assert.AreEqual(s, sComplexTestAlternateQuoted); end; procedure QuotedStrings.QuoteSimpleString; var s: string; begin s := StringUtils.QuoteString(sSimpleTest); Assert.AreEqual(sSimpleTestQuoted, s); end; procedure QuotedStrings.QuoteStringWithQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotesQuoted, s); end; procedure QuotedStrings.QuoteStringWithOtherQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithOtherQuotes); Assert.AreEqual(sSimpleTestWithOtherQuotesQuoted, s); end; procedure QuotedStrings.RoundtripSimpleString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTest)); Assert.AreEqual(sSimpleTest, s); end; procedure QuotedStrings.RoundtripStringWithOtherQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithOtherQuotes)); Assert.AreEqual(sSimpleTestWithOtherQuotes, s); end; procedure QuotedStrings.RoundtripStringWithQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithQuotes)); Assert.AreEqual(sSimpleTestWithQuotes, s); end; procedure QuotedStrings.RoundtripComplexString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '''')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.RoundtripComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '"')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.DequoteStringWithGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithoutEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithAllowedGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'actual garbage'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'no actual garbage'); end; procedure QuotedStrings.DequoteStringAllowedMissingEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote actually missing'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote provided'); end; procedure QuotedStrings.DequoteStringCheckGarbage; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(sSimpleTestWithGarbageQuoted.LastIndexOf(''''), i); end; procedure QuotedStrings.DequoteStringCheckEndQuote; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(not sSimpleTestMissingEndQuote.Length, i); end; procedure QuotedStrings.DequoteNonQuotedString; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTest); Assert.AreEqual(sSimpleTest, s); s := StringUtils.ExtractQuotedString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotes, s); end; {$ENDREGION} {$REGION 'Substrings'} procedure Substrings.AfterSingleDelimiter; var s: string; begin s := StringUtils.After(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterFirstEquals, s); s := StringUtils.After(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.After(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.After(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.After(sDelimTest, '|'); Assert.AreEqual(sDelimTestAfterFirstPipe, s); end; procedure Substrings.AfterMultipleDelimiters; var s: string; begin s := StringUtils.AfterAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.AfterAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstSemiColon, s); s := StringUtils.AfterAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.AfterAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.AfterLastSingleDelimiter; var s: string; begin s := StringUtils.AfterLast(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterEquals, s); s := StringUtils.AfterLast(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterParenthesis, s); s := StringUtils.AfterLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLast(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.AfterLast(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.AfterLastMultipleDelimiters; var s: string; begin s := StringUtils.AfterLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' =.'.ToCharArray); Assert.AreEqual(sDelimTestAfterDot, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterSemiColon, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.BeforeSingleDelimiter; var s: string; begin s := StringUtils.Before(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeEquals, s); s := StringUtils.Before(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.Before(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.Before(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.Before(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.BeforeMultipleDelimiters; var s: string; begin s := StringUtils.BeforeAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeSemiColon, s); s := StringUtils.BeforeAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.BeforeLastSingleDelimiter; var s: string; begin s := StringUtils.BeforeLast(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeLastEquals, s); s := StringUtils.BeforeLast(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeLastParenthesis, s); s := StringUtils.BeforeLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLast(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.BeforeLast(sDelimTest, '|'); Assert.AreEqual(sDelimTestBeforeLastPipe, s); end; procedure Substrings.BeforeLastMultipleDelimiters; var s: string; begin s := StringUtils.BeforeLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.Left; var s: string; begin s := StringUtils.Left(sSliceTest, 10); Assert.AreEqual('0123456789', s); end; procedure Substrings.Mid; var s: string; begin s := StringUtils.Mid(sSliceTest, 10, 14); Assert.AreEqual('ABCDE', s); end; procedure Substrings.Right; var s: string; begin s := StringUtils.Right(sSliceTest, 10); Assert.AreEqual('qrstuvwxyz', s); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.ExpandTabs; var tabSet1: StringUtils.TabSet; tabSet2: StringUtils.TabSet; tabSet3: StringUtils.TabSet; begin tabSet1 := StringUtils.TabSet.Create(2); tabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); tabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); Assert.AreEqual(sTabTest1Output1, StringUtils.ExpandTabs(sTabTest1, tabSet1), 'sTabTest1Output1'); Assert.AreEqual(sTabTest2Output1, StringUtils.ExpandTabs(sTabTest2, tabSet1), 'sTabTest2Output1'); Assert.AreEqual(sTabTest1Output2, StringUtils.ExpandTabs(sTabTest1, tabSet2), 'sTabTest1Output2'); Assert.AreEqual(sTabTest2Output2, StringUtils.ExpandTabs(sTabTest2, tabSet2), 'sTabTest2Output2'); Assert.AreEqual(sTabTest1Output3, StringUtils.ExpandTabs(sTabTest1, tabSet3), 'sTabTest1Output3'); Assert.AreEqual(sTabTest2Output3, StringUtils.ExpandTabs(sTabTest2, tabSet3), 'sTabTest2Output3'); end; procedure Manipulations.RemoveDuplicates; begin Assert.AreEqual(sTest1Output, StringUtils.RemoveDuplicateChars(sTest1, '*'), 'sTest1'); end; procedure Manipulations.&Repeat; begin Assert.AreEqual(sRepeatOutput0, StringUtils.&Repeat(sRepeatInput, 0), 'Count=0'); Assert.AreEqual(sRepeatOutput1, StringUtils.&Repeat(sRepeatInput, 1), 'Count=1'); Assert.AreEqual(sRepeatOutput10, StringUtils.&Repeat(sRepeatInput, 10), 'Count=10'); end; {$ENDREGION} end. --- Jedi.System.StringsNUnit.pas DELETED --- --- Jedi.IO.BaseNUnit.pas DELETED --- --- NEW FILE: Jedi.IO.NUnit.pas --- unit Jedi.IO.NUnit; interface type PathTestCases = class strict private class constructor Create; strict protected const sNormVolumeRoot = 'volume{0}{1}'; const sNormVolumeRoot2 = 'secondvolume{0}'; const sNormVolumeRootNoSlash = 'volume{0}'; const sNormInvalidVolumeRoot = '{1}path{1}volume{0}{1}'; const sNormInvalidRelativePathUpLevel = '..SubFolder2.2'; const sNormDeepVolumeRootedPath = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormVolumePath = 'primary{0}{1}PrimaryRoot{1}My Folder'; const sNormDeepRootedPath = '{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormRelativePath = 'SubFolder2{1}SubFolder2.1'; const sNormRelativePathUpLevel = '..{1}SubFolder2.2'; const sNormRelativePathUpTwoLevels = '..{1}..{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormRelativePathUpTwoLevelsSep = '..{1}..{1}SubFolder4{1}SubFolder4.1{1}SubFolder4.1.1{1}SubFolder4.1.4'; const sNormStartWithThisPath = 'My Folder'; const sNormHasDottedFolderName = 'SubFolder5{1}.HiddenStuff'; const sNormWildcardedFile = '*.txt'; const sNormCombinedVolRootAndRelativePath = 'volume{0}{1}SubFolder2{1}SubFolder2.1'; const sNormCombinedDeepVolRootAndRelPathUpTwo = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormCombinedVolRoot2AndDeepRooted = 'secondvolume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedVolPathAndDeepRooted = 'primary{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedRelAndRelPathUp = 'SubFolder2{1}SubFolder2.2'; public const sVolumeRoot = 'volume:\'; const sVolumeRoot2 = 'secondvolume:'; const sVolumeRootNoSlash = 'volume:'; const sInvalidVolumeRoot = '\path\volume:\'; const sInvalidRelativePathUpLevel = '..SubFolder2.2'; const sDeepVolumeRootedPath = 'volume:\MyRootFolder/SubFolder1\SubFolder1.1/SubFolder1.1.1\'; const sVolumePath = 'primary:/PrimaryRoot\My Folder'; const sDeepRootedPath = '\MyRootFolder/SubFolder1/\SubFolder1.1//SubFolder1.1.1\'; const sRelativePath = 'SubFolder2\SubFolder2.1'; const sRelativePathUpLevel = '..\SubFolder2.2'; const sRelativePathUpTwoLevels = '...\SubFolder3\SubFolder3.1\SubFolder3.1.1\SubFolder3.1.4'; const sRelativePathUpTwoLevelsSep = '..\..\SubFolder4\SubFolder4.1\SubFolder4.1.1\SubFolder4.1.4'; const sStartWithThisPath = '.\My Folder'; const sHasDottedFolderName = 'SubFolder5\.HiddenStuff'; const sWildcardedFile = '*.txt'; class var sVolumeRootNormalized: string; sVolumeRoot2Normalized: string; sVolumeRootNoSlashNormalized: string; sInvalidVolumeRootNormalized: string; sInvalidRelativePathUpLevelNormalized: string; sDeepVolumeRootedPathNormalized: string; sDeepRootedPathNormalized: string; sVolumePathNormalized: string; sRelativePathNormalized: string; sRelativePathUpLevelNormalized: string; sRelativePathUpTwoLevelsNormalized: string; sRelativePathUpTwoLevelsSepNormalized: string; sStartWithThisPathNormalized: string; sHasDottedFolderNameNormalized: string; sWildcardedFileNormalized: string; sCombinedVolRootAndRelativePath: string; sCombinedDeepVolRootAndRelPathUpTwo: string; sCombinedVolRoot2AndDeepRooted: string; sCombinedVolPathAndDeepRooted: string; sCombinedRelAndRelPathUp: string; end; implementation uses System.IO; class constructor PathTestCases.Create; begin sVolumeRootNormalized := System.String.Format(sNormVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRoot2Normalized := System.String.Format(sNormVolumeRoot2, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRootNoSlashNormalized := System.String.Format(sNormVolumeRootNoSlash, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidVolumeRootNormalized := System.String.Format(sNormInvalidVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidRelativePathUpLevelNormalized := System.String.Format(sNormInvalidRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepVolumeRootedPathNormalized := System.String.Format(sNormDeepVolumeRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepRootedPathNormalized := System.String.Format(sNormDeepRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumePathNormalized := System.String.Format(sNormVolumePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathNormalized := System.String.Format(sNormRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpLevelNormalized := System.String.Format(sNormRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsNormalized := System.String.Format(sNormRelativePathUpTwoLevels, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsSepNormalized := System.String.Format(sNormRelativePathUpTwoLevelsSep, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sStartWithThisPathNormalized := System.String.Format(sNormStartWithThisPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sHasDottedFolderNameNormalized := System.String.Format(sNormHasDottedFolderName, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sWildcardedFileNormalized := System.String.Format(sNormWildcardedFile, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRootAndRelativePath := System.String.Format(sNormCombinedVolRootAndRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedDeepVolRootAndRelPathUpTwo := System.String.Format(sNormCombinedDeepVolRootAndRelPathUpTwo, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRoot2AndDeepRooted := System.String.Format(sNormCombinedVolRoot2AndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolPathAndDeepRooted := System.String.Format(sNormCombinedVolPathAndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedRelAndRelPathUp := System.String.Format(sNormCombinedRelAndRelPathUp, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); end; end. --- Jedi.IO.PathNunit.pas DELETED --- --- NEW FILE: Jedi.IO.Paths.Nunit.pas --- unit Jedi.IO.Paths.Nunit; interface uses System.IO, NUnit.Framework, Jedi.IO.Paths, Jedi.IO.NUnit; type [TestFixture] Normalize = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] ValidityChecks = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] Manipulations = class public [Test] procedure CombineTenPaths; [Test] procedure CombineTwo; [Test] procedure CombineTwoAbsolutePaths; end; [TestFixture] PathConfigurations = class public [Test] procedure TestConfiguration; end; implementation {$REGION 'Normalize'} procedure Normalize.DeepVolumeRootedPath; begin Assert.AreEqual(PathTestCases.sDeepVolumeRootedPathNormalized, Path.Normalize(PathTestCases.sDeepVolumeRootedPath)); end; procedure Normalize.DeepRootedPath; begin Assert.AreEqual(PathTestCases.sDeepRootedPathNormalized, Path.Normalize(PathTestCases.sDeepRootedPath)); end; procedure Normalize.RelativePath; begin Assert.AreEqual(PathTestCases.sRelativePathNormalized, Path.Normalize(PathTestCases.sRelativePath)); end; procedure Normalize.RelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sRelativePathUpLevel)); end; procedure Normalize.RelativePathUpTwoLevels; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevels)); end; procedure Normalize.RelativePathUpTwoLevelsSep; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsSepNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevelsSep)); end; procedure Normalize.InvalidVolumeRoot; begin Assert.AreEqual(PathTestCases.sInvalidVolumeRootNormalized, Path.Normalize(PathTestCases.sInvalidVolumeRoot)); end; procedure Normalize.InvalidRelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sInvalidRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sInvalidRelativePathUpLevel)); end; procedure Normalize.VolumeRoot; begin Assert.AreEqual(PathTestCases.sVolumeRootNormalized, Path.Normalize(PathTestCases.sVolumeRoot)); end; procedure Normalize.StartWithThisPath; begin Assert.AreEqual(PathTestCases.sStartWithThisPathNormalized, Path.Normalize(PathTestCases.sStartWithThisPath)); end; procedure Normalize.HasDottedFolderName; begin Assert.AreEqual(PathTestCases.sHasDottedFolderNameNormalized, Path.Normalize(PathTestCases.sHasDottedFolderName)); end; procedure Normalize.WildcardedFile; begin Assert.AreEqual(PathTestCases.sWildcardedFileNormalized, Path.Normalize(PathTestCases.sWildcardedFile)); end; {$ENDREGION} {$REGION 'ValidityChecks'} procedure ValidityChecks.DeepVolumeRootedPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sDeepVolumeRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepVolumeRootedPath', PathTestCases.sDeepVolumeRootedPath]); end; procedure ValidityChecks.DeepRootedPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sDeepRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepRootedPath', PathTestCases.sDeepRootedPath]); end; procedure ValidityChecks.RelativePath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePath), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePath', PathTestCases.sRelativePath]); end; procedure ValidityChecks.RelativePathUpLevel; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpLevel', PathTestCases.sRelativePathUpLevel]); end; procedure ValidityChecks.RelativePathUpTwoLevels; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpTwoLevels), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevels', PathTestCases.sRelativePathUpTwoLevels]); end; procedure ValidityChecks.RelativePathUpTwoLevelsSep; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpTwoLevelsSep), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevelsSep', PathTestCases.sRelativePathUpTwoLevelsSep]); end; procedure ValidityChecks.InvalidVolumeRoot; begin Assert.IsFalse(Path.IsValid(PathTestCases.sInvalidVolumeRoot), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidVolumeRoot', PathTestCases.sInvalidVolumeRoot]); end; procedure ValidityChecks.InvalidRelativePathUpLevel; begin Assert.IsFalse(Path.IsValid(PathTestCases.sInvalidRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidRelativePathUpLevel', PathTestCases.sInvalidRelativePathUpLevel]); end; procedure ValidityChecks.VolumeRoot; begin Assert.IsTrue(Path.IsValid(PathTestCases.sVolumeRoot), 'IsValid({0}{{''{1}''}}) should be True', ['sVolumeRoot', PathTestCases.sVolumeRoot]); end; procedure ValidityChecks.StartWithThisPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sStartWithThisPath), 'IsValid({0}{{''{1}''}}) should be True', ['sStartWithThisPath', PathTestCases.sStartWithThisPath]); end; procedure ValidityChecks.HasDottedFolderName; begin Assert.IsTrue(Path.IsValid(PathTestCases.sHasDottedFolderName), 'IsValid({0}{{''{1}''}}) should be True', ['sHasDottedFolderName', PathTestCases.sHasDottedFolderName]); end; procedure ValidityChecks.WildcardedFile; begin Assert.IsFalse(Path.IsValid(PathTestCases.sWildcardedFile), 'IsValid({0}{{''{1}''}}) should be False', ['sWildcardedFile', PathTestCases.sWildcardedFile]); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.CombineTenPaths; begin Assert.AreEqual( System.String.Format('myvolume{0}{1}Root{1}Folder1{1}Folder1.1{1}Folder1.1.2{1}Folder1.1.2.1', System.IO.Path.VolumeSeparatorChar, System.IO.Path.DirectorySeparatorChar), Path.Combine(['dummy:NotAvailable\SubNotAvailable', '..\NotUsedEither', 'myvolume:\ignore', '\RootNotUsed\Ignore\Ignore2', '..\NotUsed', '\Root\Folder1\', '.\Folder1.1', 'Folder1.1.1\Folder1.1.1.1\Folder1.1.1.1.1\Folder1.1.1.1.1.1', '.....\Folder1.1.2', '.\Folder1.1.2.1'])); end; procedure Manipulations.CombineTwo; begin Assert.AreEqual( PathTestCases.sCombinedVolRootAndRelativePath, Path.Combine(PathTestCases.sVolumeRoot, PathTestCases.sRelativePath), 'Combine(sVolumeRoot, sRelativePath)'); Assert.AreEqual( PathTestCases.sCombinedDeepVolRootAndRelPathUpTwo, Path.Combine(PathTestCases.sDeepVolumeRootedPath, PathTestCases.sRelativePathUpTwoLevels), 'Combine(sDeepVolumeRootedPath, sRelativePathUpTwoLevels)'); Assert.AreEqual( PathTestCases.sCombinedRelAndRelPathUp, Path.Combine(PathTestCases.sRelativePath, PathTestCases.sRelativePathUpLevel), 'Combine(sRelativePath, sRelativePathUpLevel)'); end; procedure Manipulations.CombineTwoAbsolutePaths; begin Assert.AreEqual( PathTestCases.sCombinedVolRoot2AndDeepRooted, Path.Combine(PathTestCases.sVolumeRoot2, PathTestCases.sDeepRootedPath), 'Combine(sVolumeRoot2, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sCombinedVolPathAndDeepRooted, Path.Combine(PathTestCases.sVolumePath, PathTestCases.sDeepRootedPath), 'Combine(sVolumePath, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sDeepRootedPathNormalized, Path.Combine(PathTestCases.sRelativePath, PathTestCases.sDeepRootedPath), 'Combine(sRelativePath, sDeepRootedPath)'); end; {$ENDREGION} {$REGION 'PathConfigurations'} procedure PathConfigurations.TestConfiguration; begin Assert.AreEqual('myvolume#:folder1:folder2:folder3', Path.Normalize('myvolume#:folder1:folder2;folder3', Path.PathConfig.Create(':', ';', '#', ['$']))); end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2004-12-06 10:51:58
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12509/nunit/source Modified Files: Jedi.System.StringsNUnit.pas Log Message: Overloaded StringUtils.TabSet.ToString to allow more control over the output string. The default format has been changed a little as well for improved readability. Index: Jedi.System.StringsNUnit.pas =================================================================== RCS file: /cvsroot/jedidotnet/nunit/source/Jedi.System.StringsNUnit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.System.StringsNUnit.pas 5 Dec 2004 14:44:36 -0000 1.1 --- Jedi.System.StringsNUnit.pas 6 Dec 2004 10:51:45 -0000 1.2 *************** *** 147,154 **** procedure TabSet.ConvertToString; begin ! Assert.AreEqual('[]+2', TabSet1.ToString, 'TabSet1.ToString'); ! Assert.AreEqual('[15,20,40,44]+4 (automatic)', TabSet2.ToString, 'TabSet2.ToString'); ! Assert.AreEqual('[15,20,40,44]+2', TabSet3.ToString, 'TabSet3.ToString'); ! Assert.AreEqual('[]+2 (automatic)', StringUtils.TabSet.Create.ToString, 'StringUtils.TabSet.Create.ToString'); end; --- 147,158 ---- procedure TabSet.ConvertToString; begin ! Assert.AreEqual('[] and every 2', TabSet1.ToString, 'TabSet1.ToString'); ! Assert.AreEqual('[15,20,40,44] and every 4 (automatic)', TabSet2.ToString, 'TabSet2.ToString'); ! Assert.AreEqual('[15,20,40,44] and every 2', TabSet3.ToString, 'TabSet3.ToString'); ! Assert.AreEqual('[] and every 2 (automatic)', StringUtils.TabSet.Create.ToString, ! 'StringUtils.TabSet.Create.ToString'); ! Assert.AreEqual('every 2 (automatic)', StringUtils.TabSet.Create.ToString(True, False, True), ! 'StringUtils.TabSet.Create.ToString(true, false, true)'); ! Assert.AreEqual('15,20,40,44', TabSet2.ToString(False, False, False), 'TabSet2.ToString(false, false, false)'); end; |
From: Marcel B. <jed...@us...> - 2004-12-06 10:51:57
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12509/main/run Modified Files: Jedi.System.Strings.pas Log Message: Overloaded StringUtils.TabSet.ToString to allow more control over the output string. The default format has been changed a little as well for improved readability. Index: Jedi.System.Strings.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.Strings.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.System.Strings.pas 5 Dec 2004 13:19:48 -0000 1.1 --- Jedi.System.Strings.pas 6 Dec 2004 10:51:44 -0000 1.2 *************** *** 70,74 **** procedure set_Tabs(index: Integer; value: Integer); procedure set_DefaultWidth(value: Integer); ! function ToString: string; override; property Count: Integer read get_Count; --- 70,77 ---- procedure set_Tabs(index: Integer; value: Integer); procedure set_DefaultWidth(value: Integer); ! function ToString: string; overload; override; ! function ToString(wantBrackets: Boolean): string; overload; ! function ToString(wantBrackets, emptyBrackets: Boolean): string; overload; ! function ToString(wantBrackets, emptyBrackets, includeDefaultWidth: Boolean): string; overload; property Count: Integer read get_Count; *************** *** 670,673 **** --- 673,691 ---- function StringUtils.TabSet.ToString: string; + begin + Result := ToString(True, True, True); + end; + + function StringUtils.TabSet.ToString(wantBrackets: Boolean): string; + begin + Result := ToString(wantBrackets, wantBrackets, True); + end; + + function StringUtils.TabSet.ToString(wantBrackets, emptyBrackets: Boolean): string; + begin + Result := ToString(wantBrackets, emptyBrackets, True); + end; + + function StringUtils.TabSet.ToString(wantBrackets, emptyBrackets, includeDefaultWidth: Boolean): string; var sb: StringBuilder; *************** *** 675,693 **** begin sb := StringBuilder.Create; - sb.Append('['); enum := FTabs.GetEnumerator; ! if FTabs.Count > 0 then begin ! while enum.MoveNext do ! begin ! sb.Append(Integer(enum.Current)); ! sb.Append(','); ! end; sb.Remove(sb.Length - 1, 1); end; - sb.Append(']+'); - sb.Append(RealDefaultWidth); - if RealDefaultWidth <> DefaultWidth then - sb.Append(' (automatic)'); Result := sb.ToString; end; --- 693,718 ---- begin sb := StringBuilder.Create; enum := FTabs.GetEnumerator; ! while enum.MoveNext do begin ! sb.Append(Integer(enum.Current)); ! sb.Append(','); ! end; ! if sb.Length <> 0 then sb.Remove(sb.Length - 1, 1); + if wantBrackets and (emptyBrackets or (sb.Length > 0)) then + begin + sb.Insert(0, '['); + sb.Append(']'); + end; + if includeDefaultWidth then + begin + if sb.Length > 0 then + sb.Append(' and '); + sb.Append('every '); + sb.Append(RealDefaultWidth); + if RealDefaultWidth <> DefaultWidth then + sb.Append(' (automatic)'); end; Result := sb.ToString; end; |
From: Marcel B. <jed...@us...> - 2004-12-05 15:04:14
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27896/main/assemblies Modified Files: Jedi.IO.bdsproj Jedi.IO.dpk Log Message: Renamed Jedi.System.IO to Jedi.IO.FileOfRec and added to the Jedi.IO assembly Index: Jedi.IO.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.IO.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.IO.bdsproj 5 Dec 2004 13:19:48 -0000 1.1 --- Jedi.IO.bdsproj 5 Dec 2004 15:04:01 -0000 1.2 *************** *** 170,177 **** --- 170,183 ---- <VersionInfoKeys Name="Comments"></VersionInfoKeys> </VersionInfoKeys> + + + + + <FileList> <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="9.0.1761.24408" LinkUnits="False"/> <File FileName="..\bin\Jedi.System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.System" AssemblyName="Jedi.System" Version="1.0.0.0" LinkUnits="False"/> <File FileName="..\run\Jedi.IO.Paths.pas" ContainerId="" ModuleName="Jedi.IO.Paths"/> + <File FileName="..\run\Jedi.IO.FileOfRec.pas" ContainerId="" ModuleName="Jedi.IO.FileOfRec"/> </FileList> </DelphiDotNet.Personality> Index: Jedi.IO.dpk =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.IO.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.IO.dpk 5 Dec 2004 13:19:48 -0000 1.1 --- Jedi.IO.dpk 5 Dec 2004 15:04:01 -0000 1.2 *************** *** 30,34 **** contains ! Jedi.IO.Paths in '..\run\Jedi.IO.Paths.pas'; [assembly: AssemblyTitle('Jedi.IO')] --- 30,35 ---- contains ! Jedi.IO.Paths in '..\run\Jedi.IO.Paths.pas', ! Jedi.IO.FileOfRec in '..\run\Jedi.IO.FileOfRec.pas'; [assembly: AssemblyTitle('Jedi.IO')] |
From: Marcel B. <jed...@us...> - 2004-12-05 15:04:12
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27896/main/run Added Files: Jedi.IO.FileOfRec.pas Removed Files: Jedi.System.IO.pas Log Message: Renamed Jedi.System.IO to Jedi.IO.FileOfRec and added to the Jedi.IO assembly --- NEW FILE: Jedi.IO.FileOfRec.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.System.IO.pas, released on 2004-07-23. The Initial Developer of the Original Code is Andreas Hausladen Portions created by Marcel Bestebroer are Copyright (C) 2004 Andreas Hausladen All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.IO.FileOfRec.pas,v 1.1 2004/12/05 15:04:02 jedi_mbe Exp $ unit Jedi.IO.FileOfRec; interface {$REGION 'Interface uses'} uses System.IO, System.Reflection; {$ENDREGION} type {$REGION 'StoredExtended = record'} /// <summary> /// StoredExtended is a binary compatible type for the Delphi Win32 Extended /// type. It is only for storage usage. So use it only in records that should /// be written to disk. /// </summary> StoredExtended = record private Data: array[0..9] of Byte; public function ToString: string; override; class operator Implicit(const Value: StoredExtended): Extended; class operator Implicit(const Value: Extended): StoredExtended; class operator Add(const A: StoredExtended; const B: Extended): StoredExtended; class operator Subtract(const A: StoredExtended; const B: Extended): StoredExtended; class operator Multiply(const A: StoredExtended; const B: Extended): StoredExtended; class operator Divide(const A: StoredExtended; const B: Extended): StoredExtended; class operator Trunc(const Value: StoredExtended): StoredExtended; class operator Round(const Value: StoredExtended): StoredExtended; class operator Equal(const A: StoredExtended; const B: Extended): Boolean; class operator Equal(const A: StoredExtended; const B: StoredExtended): Boolean; class operator GreaterThan(const A: StoredExtended; const B: Extended): Boolean; class operator GreaterThan(const A: StoredExtended; const B: StoredExtended): Boolean; class operator GreaterThanOrEqual(const A: StoredExtended; const B: Extended): Boolean; class operator GreaterThanOrEqual(const A: StoredExtended; const B: StoredExtended): Boolean; class operator LessThan(const A: StoredExtended; const B: Extended): Boolean; class operator LessThan(const A: StoredExtended; const B: StoredExtended): Boolean; class operator LessThanOrEqual(const A: StoredExtended; const B: Extended): Boolean; class operator LessThanOrEqual(const A: StoredExtended; const B: StoredExtended): Boolean; end; {$ENDREGION} {$REGION 'FileOfRecord = class(System.Object)'} EFileOfRecordError = class(Exception); /// <summary> /// FileOfRecord implements the "file of type" for .NET. /// </summary> /// <limitation> /// Because Extended is declared as a Double under Delphi.NET the Extended /// type must be changed into StoredExtended. /// </limitation> FileOfRecord = class(System.Object) strict private FType: System.Type; FRecordSize: Cardinal; FStream: System.IO.Stream; FAutoClose: Boolean; FStartPosition: Int64; FRecInstance: System.ValueType; function get_FilePos: Int64; function get_FileSize: Int64; class function CreateRecInstance(AType: System.Type): System.ValueType; static; class procedure CheckValidField(FieldType: System.Type; Typ: System.Type); static; class function SizeOfObject(Obj: System.Object): Cardinal; static; class function SizeOfArray(A: System.Array; Obj: System.Object; const FieldName: string): Cardinal; static; function ProcessType(Obj: System.Object; DoWrite: Boolean): System.Object; procedure ProcessArrayType(A: System.Array; Obj: System.Object; DoWrite: Boolean); procedure WriteByte(const Value: Byte); function ReadByte: Byte; procedure WriteUInt16(const Value: UInt16); function ReadUInt16: UInt16; procedure WriteUInt32(const Value: UInt32); function ReadUInt32: UInt32; procedure WriteUInt64(const Value: UInt64); function ReadUInt64: UInt64; procedure WriteSingle(const Value: Single); function ReadSingle: Single; procedure WriteDouble(const Value: Double); function ReadDouble: Double; procedure WriteStoredExtended(const Value: StoredExtended); function ReadStoredExtended: StoredExtended; strict protected const STypeNotAllowed = 'Type {0} is not allowed in a FileOfRecord record type.'; STypeNotAllowedInRecord = 'Type {0} is not allowed in FileOfRecord record {1}.'; SUninitializedField = 'Field {0} is not initialized. It is null.'; SEmptyArrayNotAllowed = 'Empty array type is not allowed.'; SWrongRecordType = '{0} is a wrong record type for {1}'; public /// <summary> /// </summary> /// @AType is the record type that should be used. /// @AStream is the stream where the data is stored or should be written to. /// @AAutoClose specifies if the FileOfRecord instance should close the /// given stream when the instance is disposed. /// @AStartPosition specifies the zero position for the FileOfRecord in the /// stream. This could be used to offset the first record in the file. constructor Create(AType: System.Type; AStream: System.IO.Stream; AAutoClose: Boolean = True); overload; constructor Create(AType: System.Type; AStream: System.IO.Stream; AAutoClose: Boolean; AStartPosition: Int64); overload; /// <summary> /// Dispose() closes the stream if AutoClose is True. /// </summary> destructor Destroy; override; /// <summary> /// SizeOf() returns the record size in Bytes of the given record ValueType /// instance or ValueType type. /// </summary> class function SizeOf(AType: System.Type): Cardinal; overload; static; class function SizeOf(const Rec: System.ValueType): Cardinal; overload; static; /// <summary> /// Seek() sets the file pointer to the record with the number @RecNo. 0 is /// the first record. /// </summary> function Seek(RecNo: Int64): Int64; /// <summary> /// FilePos() returns the current record number. /// </summary> function FilePos: Int64; /// <summary> /// FileSize() returns the number of records in the stream. /// </summary> function FileSize: Int64; /// <summary> /// EoF() return True when the end of the stream is reached. /// </summary> function Eof: Boolean; /// <summary> /// Truncate() sets the stream size to the current record position. /// </summary> procedure Truncate; /// <summary> /// Write() stores one or more record in the stream and moves the file /// pointer to the next record. /// </summary> procedure Write(const Rec: System.ValueType); overload; procedure Write(const RecArray: array of System.ValueType); overload; procedure Write(const RecArray: array of System.ValueType; StartIndex, Len: Integer); overload; /// <summary> /// Read() reads one record from the stream and moves the file /// pointer to the next record. /// </summary> /// <example> /// C# : MyStruct st = MyFileOfRecord.Read() as MyStruct; /// Delphi: st := MyFileOfRecord.Read as MyStruct; /// </example> function Read: System.Object; overload; procedure Read(var Obj); overload; // not CLR compatible /// <summary> /// property Position, see FilePos() /// </summary> property Position: Int64 read get_FilePos; /// <summary> /// property RecordCount, see FileSize() /// </summary> property RecordCount: Int64 read get_FileSize; /// <summary> /// property RecordSize returns the size of the type of the FileOfRecord in /// Bytes. /// </summary> property RecordSize: Cardinal read FRecordSize; /// <summary> /// property AutoClose controls if the FileOfRecord instance should close /// the stream when it is disposed. /// </summary> property AutoClose: Boolean read FAutoClose write FAutoClose; end; {$ENDREGION} implementation {$REGION 'record StoredExtended operators'} { StoredExtended } function StoredExtended.ToString: string; begin Result := ExtendedAsBytesToDouble(Data).ToString; end; class operator StoredExtended.Implicit(const Value: StoredExtended): Extended; begin Result := ExtendedAsBytesToDouble(Value.Data); end; class operator StoredExtended.Implicit(const Value: Extended): StoredExtended; begin Result.Data := DoubleToExtendedAsBytes(Value); end; class operator StoredExtended.Add(const A: StoredExtended; const B: Extended): StoredExtended; begin Result := Extended(A) + B; end; class operator StoredExtended.Subtract(const A: StoredExtended; const B: Extended): StoredExtended; begin Result := Extended(A) - B; end; class operator StoredExtended.Multiply(const A: StoredExtended; const B: Extended): StoredExtended; begin Result := Extended(A) * B; end; class operator StoredExtended.Divide(const A: StoredExtended; const B: Extended): StoredExtended; begin Result := Extended(A) / B; end; class operator StoredExtended.Trunc(const Value: StoredExtended): StoredExtended; begin Result := Trunc(Extended(Value)); end; class operator StoredExtended.Round(const Value: StoredExtended): StoredExtended; begin Result := Round(Extended(Value)); end; class operator StoredExtended.Equal(const A: StoredExtended; const B: Extended): Boolean; begin Result := Extended(A) = B; end; class operator StoredExtended.Equal(const A: StoredExtended; const B: StoredExtended): Boolean; begin Result := Extended(A) = Extended(B); end; class operator StoredExtended.GreaterThan(const A: StoredExtended; const B: Extended): Boolean; begin Result := Extended(A) > B; end; class operator StoredExtended.GreaterThan(const A: StoredExtended; const B: StoredExtended): Boolean; begin Result := Extended(A) > Extended(B); end; class operator StoredExtended.GreaterThanOrEqual(const A: StoredExtended; const B: Extended): Boolean; begin Result := Extended(A) >= B; end; class operator StoredExtended.GreaterThanOrEqual(const A: StoredExtended; const B: StoredExtended): Boolean; begin Result := Extended(A) >= Extended(B); end; class operator StoredExtended.LessThan(const A: StoredExtended; const B: Extended): Boolean; begin Result := Extended(A) < B; end; class operator StoredExtended.LessThan(const A: StoredExtended; const B: StoredExtended): Boolean; begin Result := Extended(A) < Extended(B); end; class operator StoredExtended.LessThanOrEqual(const A: StoredExtended; const B: Extended): Boolean; begin Result := Extended(A) <= B; end; class operator StoredExtended.LessThanOrEqual(const A: StoredExtended; const B: StoredExtended): Boolean; begin Result := Extended(A) <= Extended(B); end; {$ENDREGION 'StoredExtended'} {$REGION 'FileOfRecord implementation'} { FileOfRecord } constructor FileOfRecord.Create(AType: System.Type; AStream: System.IO.Stream; AAutoClose: Boolean); begin Create(AType, AStream, AAutoClose, 0); end; constructor FileOfRecord.Create(AType: System.Type; AStream: System.IO.Stream; AAutoClose: Boolean; AStartPosition: Int64); begin inherited Create; FType := AType; FStream := AStream; FAutoClose := AAutoClose; FRecordSize := SizeOf(AType); FStartPosition := AStartPosition; FStream.Position := AStartPosition; end; destructor FileOfRecord.Destroy; begin FRecInstance := nil; if FAutoClose then FStream.Close; inherited Destroy; end; function FileOfRecord.FilePos: Int64; begin Result := (FStream.Position - FStartPosition) div FRecordSize; end; function FileOfRecord.FileSize: Int64; begin Result := (FStream.Length - FStartPosition) div FRecordSize; end; function FileOfRecord.Eof: Boolean; begin Result := FStream.Position >= FStream.Length; end; function FileOfRecord.Seek(RecNo: Int64): Int64; begin Result := FStream.Seek(FStartPosition + RecNo * FRecordSize, SeekOrigin.Begin); end; procedure FileOfRecord.Truncate; begin FStream.SetLength(FStream.Position); end; function FileOfRecord.Read: System.Object; begin if FRecInstance = nil then FRecInstance := CreateRecInstance(FType); Result := ProcessType(FRecInstance, False); end; procedure FileOfRecord.Write(const Rec: System.ValueType); begin if Rec.GetType <> FType then raise EFileOfRecordError.Create(System.String.Format(SWrongRecordType, Rec.GetType.Namespace + '.' + Rec.GetType.Name, FType.Namespace + '.' + FType.Name)); ProcessType(Rec, True); end; procedure FileOfRecord.Write(const RecArray: array of System.ValueType; StartIndex, Len: Integer); var i: Integer; begin for i := StartIndex to StartIndex + Len - 1 do Write(RecArray[i]); end; procedure FileOfRecord.Write(const RecArray: array of System.ValueType); begin Write(RecArray, 0, Length(RecArray)); end; procedure FileOfRecord.Read(var Obj); begin if System.Object(Obj).GetType <> FType then raise EFileOfRecordError.Create(System.String.Format(SWrongRecordType, System.Object(Obj).GetType.Namespace + '.' + System.Object(Obj).GetType.Name, FType.Namespace + '.' + FType.Name)); Obj := Read; end; function FileOfRecord.get_FilePos: Int64; begin Result := FilePos; end; function FileOfRecord.get_FileSize: Int64; begin Result := FileSize; end; class function FileOfRecord.CreateRecInstance(AType: System.Type): System.ValueType; var Method: MethodInfo; begin Result := System.ValueType(Activator.CreateInstance(AType)); { Execute Delphi record initialization code if available. } Method := AType.GetMethod('__Initialize__'); if Method <> nil then Method.Invoke(Result, BindingFlags.Instance or BindingFlags.Public or BindingFlags.InvokeMethod, nil, [], nil); end; class procedure FileOfRecord.CheckValidField(FieldType: System.Type; Typ: System.Type); begin if (FieldType.IsClass or FieldType.IsInterface or FieldType.IsPointer) and not FieldType.IsArray then raise EFileOfRecordError.Create(System.String.Format(STypeNotAllowedInRecord, FieldType.Namespace + '.' + FieldType.Name, Typ.Namespace + '.' + Typ.Name)); end; class function FileOfRecord.SizeOf(const Rec: System.ValueType): Cardinal; begin Result := SizeOfObject(Rec); end; class function FileOfRecord.SizeOf(AType: System.Type): Cardinal; begin Result := SizeOf(CreateRecInstance(AType)); end; class function FileOfRecord.SizeOfObject(Obj: System.Object): Cardinal; var Fields: array of FieldInfo; FieldIndex: Integer; Typ, FieldType: System.Type; Value: System.Object; begin Result := 0; Typ := Obj.GetType; if (Typ = TypeOf(SByte)) or (Typ = TypeOf(Byte)) or (Typ = TypeOf(ByteBool)) or (Typ = TypeOf(Boolean)) or (Typ = TypeOf(AnsiChar)) then Inc(Result, 1) else if (Typ = TypeOf(Int16)) or (Typ = TypeOf(UInt16)) or (Typ = TypeOf(WordBool)) or (Typ = TypeOf(WideChar)) then Inc(Result, 2) else if (Typ = TypeOf(Int32)) or (Typ = TypeOf(UInt32)) or (Typ = TypeOf(LongBool)) then Inc(Result, 4) else if (Typ = TypeOf(Int64)) or (Typ = TypeOf(UInt64)) then Inc(Result, 8) else if Typ = TypeOf(Single) then Inc(Result, 4) else if Typ = TypeOf(Double) then Inc(Result, 8) else if Typ = TypeOf(Currency) then Inc(Result, 8) { Extended is declared as Double. The StoredExtended record is processed by the TypeValue code. } else if Typ.IsArray then Inc(Result, SizeOfArray(System.Array(Obj), Obj, '')) else if Typ.IsValueType and (Typ.Namespace <> 'System') then begin Fields := Typ.GetFields(BindingFlags.Instance or BindingFlags.Public or BindingFlags.NonPublic); for FieldIndex := 0 to High(Fields) do begin FieldType := Fields[FieldIndex].FieldType; CheckValidField(FieldType, Typ); Value := Fields[FieldIndex].GetValue(Obj); if Value = nil then raise EFileOfRecordError.Create(System.String.Format(SUninitializedField, Fields[FieldIndex].Name)); if FieldType.IsArray then Inc(Result, SizeOfArray(System.Array(Value), Obj, Fields[FieldIndex].Name)) else Inc(Result, SizeOfObject(Value)); end; end else raise EFileOfRecordError.Create(System.String.Format(STypeNotAllowed, Typ.Namespace + '.' + Typ.Name, '')) end; class function FileOfRecord.SizeOfArray(A: System.Array; Obj: System.Object; const FieldName: string): Cardinal; var Value: System.Object; r: Integer; Indices: array of Integer; begin CheckValidField(A.GetType.GetElementType, Obj.GetType); SetLength(Indices, A.Rank); Value := A.GetValue(Indices); if Value = nil then raise EFileOfRecordError.Create(System.String.Format(SUninitializedField, FieldName)); Result := 0; for r := 0 to A.Rank - 1 do Inc(Result, Cardinal(A.GetLength(r))); Result := Result * SizeOfObject(Value); end; function FileOfRecord.ProcessType(Obj: System.Object; DoWrite: Boolean): System.Object; var Fields: array of FieldInfo; FieldIndex: Integer; Typ, FieldType: System.Type; Value: System.Object; begin Result := Obj; Typ := Obj.GetType; {$REGION 'R/W SByte, Byte, ByteBool, Boolean, AnsiChar'} if Typ = TypeOf(SByte) then begin if DoWrite then WriteByte(Byte(SByte(Obj))) else Result := System.Object(SByte(ReadByte)); end else if Typ = TypeOf(Byte) then begin if DoWrite then WriteByte(Byte(Obj)) else Result := System.Object(ReadByte); end else if Typ = TypeOf(ByteBool) then begin if DoWrite then WriteByte(Byte(ByteBool(Obj))) else Result := System.Object(ByteBool(ReadByte)); end else if Typ = TypeOf(Boolean) then begin if DoWrite then WriteByte(Byte(Boolean(Obj))) else Result := System.Object(Boolean(ReadByte)); end else if Typ = TypeOf(AnsiChar) then begin if DoWrite then WriteByte(Byte(AnsiChar(Obj))) else Result := System.Object(AnsiChar(ReadByte)); end else {$ENDREGION} {$REGION 'R/W Int16, UInt16, WordBool, WideChar'} if Typ = TypeOf(Int16) then begin if DoWrite then WriteUInt16(UInt16(Int16(Obj))) else Result := System.Object(Int16(ReadUInt16)); end else if Typ = TypeOf(UInt16) then begin if DoWrite then WriteUInt16(UInt16(Obj)) else Result := System.Object(ReadUInt16); end else if Typ = TypeOf(WordBool) then begin if DoWrite then WriteUInt16(UInt16(WordBool(Obj))) else Result := System.Object(WordBool(ReadUInt16)); end else if Typ = TypeOf(WideChar) then begin if DoWrite then WriteUInt16(UInt16(WideChar(Obj))) else Result := System.Object(WideChar(ReadUInt16)); end else {$ENDREGION} {$REGION 'R/W Int32, UInt32, LongBool'} if Typ = TypeOf(Int32) then begin if DoWrite then WriteUInt32(UInt32(Int32(Obj))) else Result := System.Object(Int32(ReadUInt32)); end else if Typ = TypeOf(UInt32) then begin if DoWrite then WriteUInt32(UInt32(Obj)) else Result := System.Object(ReadUInt32); end else if Typ = TypeOf(LongBool) then begin if DoWrite then WriteUInt32(UInt32(LongBool(Obj))) else Result := System.Object(LongBool(ReadUInt32)); end else {$ENDREGION} {$REGION 'R/W Int64, UInt64'} if Typ = TypeOf(Int64) then begin if DoWrite then WriteUInt64(UInt64(Int64(Obj))) else Result := System.Object(Int64(ReadUInt64)); end else if Typ = TypeOf(UInt64) then begin if DoWrite then WriteUInt64(UInt64(Obj)) else Result := System.Object(ReadUInt64); end else {$ENDREGION} {$REGION 'R/W Single, Double, StoredExtended, Currency'} if Typ = TypeOf(Single) then begin if DoWrite then WriteSingle(Single(Obj)) else Result := System.Object(Single(ReadSingle)); end else if Typ = TypeOf(Double) then begin if DoWrite then WriteDouble(Double(Obj)) else Result := System.Object(Double(ReadDouble)); end else if Typ = TypeOf(StoredExtended) then begin if DoWrite then WriteStoredExtended(StoredExtended(Obj)) else Result := System.Object(StoredExtended(ReadStoredExtended)); end else if Typ = TypeOf(Currency) then begin if DoWrite then WriteUInt64(Currency(Obj).ToOACurrency) else Result := System.Object(Currency.FromOACurrency(ReadUInt64)); end else {$ENDREGION} if Typ.IsArray then ProcessArrayType(System.Array(Obj), Obj, DoWrite) else if Typ.IsValueType and (Typ.Namespace <> 'System') then begin Fields := Typ.GetFields; for FieldIndex := 0 to High(Fields) do begin FieldType := Fields[FieldIndex].FieldType; Value := Fields[FieldIndex].GetValue(Obj); if FieldType.IsArray then ProcessArrayType(System.Array(Value), Obj, DoWrite) else begin Value := ProcessType(Value, DoWrite); if not DoWrite then Fields[FieldIndex].SetValue(Obj, Value); end; end; end end; procedure FileOfRecord.ProcessArrayType(A: System.Array; Obj: System.Object; DoWrite: Boolean); var Value: System.Object; r, FlatIndex, FlatIndexCount, Idx: Integer; Indices, ItemsCount: array of Integer; begin SetLength(Indices, A.Rank); SetLength(ItemsCount, A.Rank); FlatIndexCount := 0; for r := A.Rank - 1 downto 0 do begin FlatIndexCount := FlatIndexCount + A.GetLength(r); ItemsCount[r] := FlatIndexCount; end; for FlatIndex := 0 to FlatIndexCount - 1 do begin Idx := FlatIndex; for r := 0 to A.Rank - 2 do begin Indices[r] := A.GetLowerBound(r) + (Idx div ItemsCount[r + 1]); Idx := Idx mod ItemsCount[r + 1]; end; Indices[A.Rank - 1] := A.GetLowerBound(A.Rank - 1) + Idx; Value := A.GetValue(Indices); Value := ProcessType(Value, DoWrite); if not DoWrite then A.SetValue(Value, Indices); end; end; {$REGION 'Write/Read Datatype'} procedure FileOfRecord.WriteByte(const Value: Byte); begin FStream.WriteByte(Value); end; function FileOfRecord.ReadByte: Byte; var Data: array[0..0] of Byte; begin FStream.Read(Data, 0, Length(Data)); Result := Data[0]; end; procedure FileOfRecord.WriteUInt16(const Value: UInt16); var Data: array[0..1] of Byte; begin Data[0] := Value and $FF; Data[1] := Value shr 8; FStream.Write(Data, 0, Length(Data)); end; function FileOfRecord.ReadUInt16: UInt16; var Data: array[0..1] of Byte; begin FStream.Read(Data, 0, Length(Data)); Result := (UInt16(Data[1]) shl 8) or Data[0]; end; procedure FileOfRecord.WriteUInt32(const Value: UInt32); var Data: array[0..3] of Byte; begin Data[0] := Value and $FF; Data[1] := (Value shr 8) and $FF; Data[2] := (Value shr 16) and $FF; Data[3] := (Value shr 24) and $FF; FStream.Write(Data, 0, Length(Data)); end; function FileOfRecord.ReadUInt32: UInt32; var Data: array[0..3] of Byte; begin FStream.Read(Data, 0, Length(Data)); Result := (UInt32(Data[3]) shl 24) or (UInt32(Data[2]) shl 16) or (UInt32(Data[1]) shl 8) or Data[0]; end; procedure FileOfRecord.WriteUInt64(const Value: UInt64); var Data: array[0..7] of Byte; begin Data[0] := Value and $FF; Data[1] := (Value shr 8) and $FF; Data[2] := (Value shr 16) and $FF; Data[3] := (Value shr 24) and $FF; Data[4] := (Value shr 32) and $FF; Data[5] := (Value shr 40) and $FF; Data[6] := (Value shr 48) and $FF; Data[7] := (Value shr 56) and $FF; FStream.Write(Data, 0, Length(Data)); end; function FileOfRecord.ReadUInt64: UInt64; var Data: array[0..7] of Byte; begin Result := (UInt64(Data[7]) shl 56) or (UInt64(Data[6]) shl 48) or (UInt64(Data[5]) shl 40) or (UInt64(Data[4]) shl 32) or (UInt64(Data[3]) shl 24) or (UInt64(Data[2]) shl 16) or (UInt64(Data[1]) shl 8) or Data[0]; end; procedure FileOfRecord.WriteSingle(const Value: Single); begin FStream.Write(BitConverter.GetBytes(Value), 0, 4); end; function FileOfRecord.ReadSingle: Single; var Data: array[0..3] of Byte; begin FStream.Read(Data, 0, Length(Data)); Result := BitConverter.ToSingle(Data, 0); end; procedure FileOfRecord.WriteDouble(const Value: Double); begin FStream.Write(BitConverter.GetBytes(Value), 0, 8); end; function FileOfRecord.ReadDouble: Double; var Data: array[0..7] of Byte; begin FStream.Read(Data, 0, Length(Data)); Result := BitConverter.ToDouble(Data, 0); end; procedure FileOfRecord.WriteStoredExtended(const Value: StoredExtended); begin FStream.Write(Value.Data, 0, 10); end; function FileOfRecord.ReadStoredExtended: StoredExtended; begin FStream.Read(Result.Data, 0, 10); end; {$ENDREGION} {$ENDREGION 'FileOfRecord Implemenation'} end. --- Jedi.System.IO.pas DELETED --- |
From: Marcel B. <jed...@us...> - 2004-12-05 14:52:25
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25755/nunit Added Files: Nunit.Jedi.Results.xml Log Message: And the results are stored as well --- NEW FILE: Nunit.Jedi.Results.xml --- (This appears to be a binary file; contents omitted.) |
From: Marcel B. <jed...@us...> - 2004-12-05 14:44:46
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24318/nunit/source Added Files: Jedi.IO.BaseNUnit.pas Jedi.IO.PathNunit.pas Jedi.System.AttributesNUnit.pas Jedi.System.StringsNUnit.pas Log Message: Moved test sets; adapted to Delphi 2005 --- NEW FILE: Jedi.System.StringsNUnit.pas --- unit Jedi.System.StringsNUnit; interface uses Jedi.System, NUnit.Framework; type [TestFixture] TabSet = class strict protected TabSet1: StringUtils.TabSet; TabSet2: StringUtils.TabSet; TabSet3: StringUtils.TabSet; public [TestFixtureSetUp] procedure Init; [Test] procedure SimpleTabulation; [Test] procedure SpecifiedTabsWithAutoDefault; [Test] procedure SpecifiedTabsWithDefault; [Test] procedure CloneAndEqual; [Test] procedure RemovingTabs; [Test] procedure AddingTabs; [Test] procedure ConvertToString; end; [TestFixture] QuotedStrings = class strict protected const sSimpleTest = 'This is a simple test string.'; const sSimpleTestQuoted = '''This is a simple test string.'''; const sSimpleTestWithQuotes = 'This is a ''simple'' test string.'; const sSimpleTestWithQuotesQuoted = '''This is a ''''simple'''' test string.'''; const sSimpleTestWithOtherQuotes = 'This is a "simple" test string.'; const sSimpleTestWithOtherQuotesQuoted = '''This is a "simple" test string.'''; const sSimpleTestWithGarbageQuoted = '''This is a simple test string.'' With garbage.'; const sSimpleTestMissingEndQuote = '''This is a simple test string.'; const sComplexTest = 'Assuming single quotation ('') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used '+ 'quotation charachter. Scary combinations: ''''abc'''' and ""def""'; const sComplexTestQuoted = '''Assuming single quotation ('''') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''''''abc'''''''' and '+ '""def""'''; const sComplexTestAlternateQuoted = '"Assuming single quotation ('') or double quotation ("") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''abc'''' and """"def"""""'; public [Test] procedure QuoteComplexString; [Test] procedure QuoteComplexStringWithAlternateQuoting; [Test] procedure QuoteSimpleString; [Test] procedure QuoteStringWithQuotes; [Test] procedure QuoteStringWithOtherQuotes; [Test] procedure RoundtripSimpleString; [Test] procedure RoundtripStringWithQuotes; [Test] procedure RoundtripStringWithOtherQuotes; [Test] procedure RoundtripComplexString; [Test] procedure RoundtripComplexStringWithAlternateQuoting; [ExpectedException(TypeOf(FormatException), 'String ends in garbage.')] [Test] procedure DequoteStringWithGarbage; [ExpectedException(TypeOf(FormatException), 'End quote missing.')] [Test] procedure DequoteStringWithoutEndQuote; [Test] procedure DequoteStringWithAllowedGarbage; [Test] procedure DequoteStringAllowedMissingEndQuote; [Test] procedure DequoteStringCheckGarbage; [Test] procedure DequoteStringCheckEndQuote; [Test] procedure DequoteNonQuotedString; end; [TestFixture] Substrings = class strict protected const sDelimTest = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestBeforeParenthesis = '|Abc'; const sDelimTestBeforeBrace = '|Abc(def)'; const sDelimTestBeforeDot = '|Abc(def){ghi}.'; const sDelimTestBeforeSemiColon = '|Abc(def){ghi}.jkl'; const sDelimTestBeforeEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastParenthesis = '|Abc(def){ghi}.jkl;mno='; const sDelimTestBeforeLastBrace = '|Abc(def){ghi}.jkl;mno=(pqr)'; const sDelimTestBeforeLastDot = '|Abc(def){ghi}.jkl;mno=(pqr){stu}'; const sDelimTestBeforeLastSemiColon = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx'; const sDelimTestBeforeLastPipe = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz'; const sDelimTestAfterFirstPipe = 'Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstParenthesis = 'def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstBrace = 'ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstDot = 'jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstSemiColon = 'mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterParenthesis = 'pqr){stu}.vwx;yz|'; const sDelimTestAfterBrace = 'stu}.vwx;yz|'; const sDelimTestAfterDot = 'vwx;yz|'; const sDelimTestAfterSemiColon = 'yz|'; const sSliceTest = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; public [Test] procedure AfterSingleDelimiter; [Test] procedure AfterMultipleDelimiters; [Test] procedure AfterLastSingleDelimiter; [Test] procedure AfterLastMultipleDelimiters; [Test] procedure BeforeSingleDelimiter; [Test] procedure BeforeMultipleDelimiters; [Test] procedure BeforeLastSingleDelimiter; [Test] procedure BeforeLastMultipleDelimiters; [Test] procedure Left; [Test] procedure Mid; [Test] procedure Right; end; [TestFixture] Manipulations = class strict protected const sTabTest1 = 'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; const sTabTest2 = #9'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; // 1 2 3 4 5 6 7 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789 const sTabTest1Output1 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output2 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output3 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output1 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output2 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output3 = ' Abc Def Ghi Jkl Mno Pqr'; strict protected const sTest1 = '***abc***def***ghi***'; const sTest1Output = '*abc*def*ghi*'; strict protected const sRepeatInput = 'ab(cd)ef'; const sRepeatOutput0 = ''; const sRepeatOutput1 = 'ab(cd)ef'; const sRepeatOutput10 = 'ab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)ef'; public [Test] procedure ExpandTabs; [Test] procedure RemoveDuplicates; [Test] procedure &Repeat; end; implementation {$REGION 'TabSet'} procedure TabSet.ConvertToString; begin Assert.AreEqual('[]+2', TabSet1.ToString, 'TabSet1.ToString'); Assert.AreEqual('[15,20,40,44]+4 (automatic)', TabSet2.ToString, 'TabSet2.ToString'); Assert.AreEqual('[15,20,40,44]+2', TabSet3.ToString, 'TabSet3.ToString'); Assert.AreEqual('[]+2 (automatic)', StringUtils.TabSet.Create.ToString, 'StringUtils.TabSet.Create.ToString'); end; procedure TabSet.Init; begin TabSet1 := StringUtils.TabSet.Create(2); TabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); TabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); end; procedure TabSet.SimpleTabulation; begin // TabSet1 should always tabulate to even positions Assert.AreEqual(TabSet1.TabFrom(1), 2); Assert.AreEqual(TabSet1.TabFrom(2), 4); Assert.AreEqual(TabSet1.TabFrom(3), 4); Assert.AreEqual(TabSet1.TabFrom(51), 52); Assert.AreEqual(TabSet1.TabFrom(52), 54); end; procedure TabSet.SpecifiedTabsWithAutoDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 4 (44-40) for i := 0 to 14 do Assert.AreEqual(TabSet2.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet2.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet2.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet2.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(TabSet2.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(TabSet2.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.SpecifiedTabsWithDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 2 for i := 0 to 14 do Assert.AreEqual(TabSet3.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet3.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet3.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet3.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(TabSet3.TabFrom(i), 46, 'Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(TabSet3.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(TabSet3.TabFrom(i), 50, 'Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(TabSet3.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.CloneAndEqual; var tempSet: StringUtils.TabSet; begin tempSet := StringUtils.TabSet(TabSet1.Clone); Assert.AreNotSame(TabSet1, tempSet); Assert.AreEqual(TabSet1, tempSet, 'Cloned'); tempSet.Add(2); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=2'); tempSet.DefaultWidth := 0; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=0 (automatic)'); tempSet.Add(4); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2,4], DefaultWidth=0 (automatic)'); tempSet.Clear; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[], DefaultWidth=0 (automatic)'); end; procedure TabSet.RemovingTabs; var tempSet: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(20); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 20; Tabulate from {0}', [i]); for i := 15 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 20; Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 20; Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Removed 20; Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Removed 20; Tabulate from {0}', [i]); for i := 52 to 55 do Assert.AreEqual(tempSet.TabFrom(i), 56, 'Removed 20; Tabulate from {0}', [i]); for i := 56 to 59 do Assert.AreEqual(tempSet.TabFrom(i), 60, 'Removed 20; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40; Tabulate from {0}', [i]); for i := 20 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 40; Tabulate from {0}', [i]); for i := 44 to 67 do Assert.AreEqual(tempSet.TabFrom(i), 68, 'Removed 40; Tabulate from {0}', [i]); for i := 68 to 91 do Assert.AreEqual(tempSet.TabFrom(i), 92, 'Removed 40; Tabulate from {0}', [i]); for i := 92 to 115 do Assert.AreEqual(tempSet.TabFrom(i), 116, 'Removed 40; Tabulate from {0}', [i]); for i := 116 to 139 do Assert.AreEqual(tempSet.TabFrom(i), 140, 'Removed 40; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40, True); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40+; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40+; Tabulate from {0}', [i]); for i := 20 to 24 do Assert.AreEqual(tempSet.TabFrom(i), 25, 'Removed 40+; Tabulate from {0}', [i]); for i := 25 to 29 do Assert.AreEqual(tempSet.TabFrom(i), 30, 'Removed 40+; Tabulate from {0}', [i]); for i := 30 to 34 do Assert.AreEqual(tempSet.TabFrom(i), 35, 'Removed 40+; Tabulate from {0}', [i]); for i := 35 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 40+; Tabulate from {0}', [i]); for i := 40 to 44 do Assert.AreEqual(tempSet.TabFrom(i), 45, 'Removed 40+; Tabulate from {0}', [i]); end; procedure TabSet.AddingTabs; var tempSet: StringUtils.TabSet; tempSet2: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Add(42); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Added 42; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Added 42; Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Added 42; Tabulate from {0}', [i]); for i := 40 to 41 do Assert.AreEqual(tempSet.TabFrom(i), 42, 'Added 42; Tabulate from {0}', [i]); for i := 42 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Added 42; Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(tempSet.TabFrom(i), 46, 'Added 42; Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Added 42; Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(tempSet.TabFrom(i), 50, 'Added 42; Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Added 42; Tabulate from {0}', [i]); tempSet2 := StringUtils.TabSet.Create([40, 20, 15], 2); Assert.AreEqual(tempSet2, tempSet); end; {$ENDREGION} {$REGION 'QuotedStrings'} procedure QuotedStrings.QuoteComplexString; var s: string; begin s := StringUtils.QuoteString(sComplexTest, ''''); Assert.AreEqual(s, sComplexTestQuoted); end; procedure QuotedStrings.QuoteComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.QuoteString(sComplexTest, '"'); Assert.AreEqual(s, sComplexTestAlternateQuoted); end; procedure QuotedStrings.QuoteSimpleString; var s: string; begin s := StringUtils.QuoteString(sSimpleTest); Assert.AreEqual(sSimpleTestQuoted, s); end; procedure QuotedStrings.QuoteStringWithQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotesQuoted, s); end; procedure QuotedStrings.QuoteStringWithOtherQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithOtherQuotes); Assert.AreEqual(sSimpleTestWithOtherQuotesQuoted, s); end; procedure QuotedStrings.RoundtripSimpleString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTest)); Assert.AreEqual(sSimpleTest, s); end; procedure QuotedStrings.RoundtripStringWithOtherQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithOtherQuotes)); Assert.AreEqual(sSimpleTestWithOtherQuotes, s); end; procedure QuotedStrings.RoundtripStringWithQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithQuotes)); Assert.AreEqual(sSimpleTestWithQuotes, s); end; procedure QuotedStrings.RoundtripComplexString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '''')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.RoundtripComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '"')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.DequoteStringWithGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithoutEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithAllowedGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'actual garbage'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'no actual garbage'); end; procedure QuotedStrings.DequoteStringAllowedMissingEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote actually missing'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote provided'); end; procedure QuotedStrings.DequoteStringCheckGarbage; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(sSimpleTestWithGarbageQuoted.LastIndexOf(''''), i); end; procedure QuotedStrings.DequoteStringCheckEndQuote; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(not sSimpleTestMissingEndQuote.Length, i); end; procedure QuotedStrings.DequoteNonQuotedString; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTest); Assert.AreEqual(sSimpleTest, s); s := StringUtils.ExtractQuotedString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotes, s); end; {$ENDREGION} {$REGION 'Substrings'} procedure Substrings.AfterSingleDelimiter; var s: string; begin s := StringUtils.After(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterFirstEquals, s); s := StringUtils.After(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.After(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.After(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.After(sDelimTest, '|'); Assert.AreEqual(sDelimTestAfterFirstPipe, s); end; procedure Substrings.AfterMultipleDelimiters; var s: string; begin s := StringUtils.AfterAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.AfterAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstSemiColon, s); s := StringUtils.AfterAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.AfterAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.AfterLastSingleDelimiter; var s: string; begin s := StringUtils.AfterLast(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterEquals, s); s := StringUtils.AfterLast(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterParenthesis, s); s := StringUtils.AfterLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLast(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.AfterLast(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.AfterLastMultipleDelimiters; var s: string; begin s := StringUtils.AfterLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' =.'.ToCharArray); Assert.AreEqual(sDelimTestAfterDot, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterSemiColon, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.BeforeSingleDelimiter; var s: string; begin s := StringUtils.Before(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeEquals, s); s := StringUtils.Before(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.Before(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.Before(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.Before(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.BeforeMultipleDelimiters; var s: string; begin s := StringUtils.BeforeAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeSemiColon, s); s := StringUtils.BeforeAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.BeforeLastSingleDelimiter; var s: string; begin s := StringUtils.BeforeLast(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeLastEquals, s); s := StringUtils.BeforeLast(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeLastParenthesis, s); s := StringUtils.BeforeLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLast(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.BeforeLast(sDelimTest, '|'); Assert.AreEqual(sDelimTestBeforeLastPipe, s); end; procedure Substrings.BeforeLastMultipleDelimiters; var s: string; begin s := StringUtils.BeforeLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.Left; var s: string; begin s := StringUtils.Left(sSliceTest, 10); Assert.AreEqual('0123456789', s); end; procedure Substrings.Mid; var s: string; begin s := StringUtils.Mid(sSliceTest, 10, 14); Assert.AreEqual('ABCDE', s); end; procedure Substrings.Right; var s: string; begin s := StringUtils.Right(sSliceTest, 10); Assert.AreEqual('qrstuvwxyz', s); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.ExpandTabs; var tabSet1: StringUtils.TabSet; tabSet2: StringUtils.TabSet; tabSet3: StringUtils.TabSet; begin tabSet1 := StringUtils.TabSet.Create(2); tabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); tabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); Assert.AreEqual(sTabTest1Output1, StringUtils.ExpandTabs(sTabTest1, tabSet1), 'sTabTest1Output1'); Assert.AreEqual(sTabTest2Output1, StringUtils.ExpandTabs(sTabTest2, tabSet1), 'sTabTest2Output1'); Assert.AreEqual(sTabTest1Output2, StringUtils.ExpandTabs(sTabTest1, tabSet2), 'sTabTest1Output2'); Assert.AreEqual(sTabTest2Output2, StringUtils.ExpandTabs(sTabTest2, tabSet2), 'sTabTest2Output2'); Assert.AreEqual(sTabTest1Output3, StringUtils.ExpandTabs(sTabTest1, tabSet3), 'sTabTest1Output3'); Assert.AreEqual(sTabTest2Output3, StringUtils.ExpandTabs(sTabTest2, tabSet3), 'sTabTest2Output3'); end; procedure Manipulations.RemoveDuplicates; begin Assert.AreEqual(sTest1Output, StringUtils.RemoveDuplicateChars(sTest1, '*'), 'sTest1'); end; procedure Manipulations.&Repeat; begin Assert.AreEqual(sRepeatOutput0, StringUtils.&Repeat(sRepeatInput, 0), 'Count=0'); Assert.AreEqual(sRepeatOutput1, StringUtils.&Repeat(sRepeatInput, 1), 'Count=1'); Assert.AreEqual(sRepeatOutput10, StringUtils.&Repeat(sRepeatInput, 10), 'Count=10'); end; {$ENDREGION} end. --- NEW FILE: Jedi.IO.BaseNUnit.pas --- unit Jedi.IO.BaseNUnit; interface type PathTestCases = class strict private class constructor Create; strict protected const sNormVolumeRoot = 'volume{0}{1}'; const sNormVolumeRoot2 = 'secondvolume{0}'; const sNormVolumeRootNoSlash = 'volume{0}'; const sNormInvalidVolumeRoot = '{1}path{1}volume{0}{1}'; const sNormInvalidRelativePathUpLevel = '..SubFolder2.2'; const sNormDeepVolumeRootedPath = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormVolumePath = 'primary{0}{1}PrimaryRoot{1}My Folder'; const sNormDeepRootedPath = '{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormRelativePath = 'SubFolder2{1}SubFolder2.1'; const sNormRelativePathUpLevel = '..{1}SubFolder2.2'; const sNormRelativePathUpTwoLevels = '..{1}..{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormRelativePathUpTwoLevelsSep = '..{1}..{1}SubFolder4{1}SubFolder4.1{1}SubFolder4.1.1{1}SubFolder4.1.4'; const sNormStartWithThisPath = 'My Folder'; const sNormHasDottedFolderName = 'SubFolder5{1}.HiddenStuff'; const sNormWildcardedFile = '*.txt'; const sNormCombinedVolRootAndRelativePath = 'volume{0}{1}SubFolder2{1}SubFolder2.1'; const sNormCombinedDeepVolRootAndRelPathUpTwo = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormCombinedVolRoot2AndDeepRooted = 'secondvolume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedVolPathAndDeepRooted = 'primary{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedRelAndRelPathUp = 'SubFolder2{1}SubFolder2.2'; public const sVolumeRoot = 'volume:\'; const sVolumeRoot2 = 'secondvolume:'; const sVolumeRootNoSlash = 'volume:'; const sInvalidVolumeRoot = '\path\volume:\'; const sInvalidRelativePathUpLevel = '..SubFolder2.2'; const sDeepVolumeRootedPath = 'volume:\MyRootFolder/SubFolder1\SubFolder1.1/SubFolder1.1.1\'; const sVolumePath = 'primary:/PrimaryRoot\My Folder'; const sDeepRootedPath = '\MyRootFolder/SubFolder1/\SubFolder1.1//SubFolder1.1.1\'; const sRelativePath = 'SubFolder2\SubFolder2.1'; const sRelativePathUpLevel = '..\SubFolder2.2'; const sRelativePathUpTwoLevels = '...\SubFolder3\SubFolder3.1\SubFolder3.1.1\SubFolder3.1.4'; const sRelativePathUpTwoLevelsSep = '..\..\SubFolder4\SubFolder4.1\SubFolder4.1.1\SubFolder4.1.4'; const sStartWithThisPath = '.\My Folder'; const sHasDottedFolderName = 'SubFolder5\.HiddenStuff'; const sWildcardedFile = '*.txt'; class var sVolumeRootNormalized: string; sVolumeRoot2Normalized: string; sVolumeRootNoSlashNormalized: string; sInvalidVolumeRootNormalized: string; sInvalidRelativePathUpLevelNormalized: string; sDeepVolumeRootedPathNormalized: string; sDeepRootedPathNormalized: string; sVolumePathNormalized: string; sRelativePathNormalized: string; sRelativePathUpLevelNormalized: string; sRelativePathUpTwoLevelsNormalized: string; sRelativePathUpTwoLevelsSepNormalized: string; sStartWithThisPathNormalized: string; sHasDottedFolderNameNormalized: string; sWildcardedFileNormalized: string; sCombinedVolRootAndRelativePath: string; sCombinedDeepVolRootAndRelPathUpTwo: string; sCombinedVolRoot2AndDeepRooted: string; sCombinedVolPathAndDeepRooted: string; sCombinedRelAndRelPathUp: string; end; implementation uses System.IO; class constructor PathTestCases.Create; begin sVolumeRootNormalized := System.String.Format(sNormVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRoot2Normalized := System.String.Format(sNormVolumeRoot2, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRootNoSlashNormalized := System.String.Format(sNormVolumeRootNoSlash, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidVolumeRootNormalized := System.String.Format(sNormInvalidVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidRelativePathUpLevelNormalized := System.String.Format(sNormInvalidRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepVolumeRootedPathNormalized := System.String.Format(sNormDeepVolumeRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepRootedPathNormalized := System.String.Format(sNormDeepRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumePathNormalized := System.String.Format(sNormVolumePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathNormalized := System.String.Format(sNormRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpLevelNormalized := System.String.Format(sNormRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsNormalized := System.String.Format(sNormRelativePathUpTwoLevels, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsSepNormalized := System.String.Format(sNormRelativePathUpTwoLevelsSep, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sStartWithThisPathNormalized := System.String.Format(sNormStartWithThisPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sHasDottedFolderNameNormalized := System.String.Format(sNormHasDottedFolderName, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sWildcardedFileNormalized := System.String.Format(sNormWildcardedFile, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRootAndRelativePath := System.String.Format(sNormCombinedVolRootAndRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedDeepVolRootAndRelPathUpTwo := System.String.Format(sNormCombinedDeepVolRootAndRelPathUpTwo, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRoot2AndDeepRooted := System.String.Format(sNormCombinedVolRoot2AndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolPathAndDeepRooted := System.String.Format(sNormCombinedVolPathAndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedRelAndRelPathUp := System.String.Format(sNormCombinedRelAndRelPathUp, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); end; end. --- NEW FILE: Jedi.System.AttributesNUnit.pas --- unit Jedi.System.AttributesNUnit; interface uses System.ComponentModel, NUnit.Framework, Jedi.System.Attributes; type [TestFixture] AttributeUtils = class strict protected List1: array of Attribute; List2: AttributeCollection; ListAfterAdd: array of Attribute; ListAfterAddAndReplace: array of Attribute; ListAfterDelete: array of Attribute; ListAfterReplace: array of Attribute; public [TestFixtureSetup] procedure TestSetup; [Test] procedure Combine_Add; [Test] procedure Combine_AddAndReplace; [Test] procedure Combine_Delete; [Test] procedure Combine_Replace; [Test] procedure RetrieveAttributeByType; [Test] procedure RetrieveAttributeByInstance; end; implementation {$REGION 'Test attributes'} type TestAttributeBase = class (Attribute) public constructor Create(value: &Object); public Value: &Object; end; TestAttribute1 = class (TestAttributeBase); TestAttribute2 = class (TestAttributeBase); TestAttribute3 = class (TestAttributeBase); TestAttribute4 = class (TestAttributeBase); TestAttribute5 = class (TestAttributeBase); TestAttribute6 = class (TestAttributeBase); TestAttribute7 = class (TestAttributeBase); TestAttribute8 = class (TestAttributeBase); TestAttribute9 = class (TestAttributeBase); TestAttribute11 = class (TestAttribute1); TestAttribute12 = class (TestAttribute1); TestAttribute111 = class (TestAttribute11); TestAttribute112 = class (TestAttribute11); TestAttribute121 = class (TestAttribute12); TestAttribute122 = class (TestAttribute12); TestAttribute21 = class (TestAttribute2); TestAttribute22 = class (TestAttribute2); TestAttribute211 = class (TestAttribute21); TestAttribute212 = class (TestAttribute21); TestAttribute221 = class (TestAttribute22); TestAttribute222 = class (TestAttribute22); {$REGION 'TestAttributeBase'} constructor TestAttributeBase.Create(value: &Object); begin inherited Create; Self.Value := value; end; {$ENDREGION} {$ENDREGION} {$REGION 'AttributeUtils'} procedure AttributeUtils.Combine_Add; var newList: array of Attribute; begin newList := Jedi.System.Attributes.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Add); Assert.AreEqual(ListAfterAdd, newList); end; procedure AttributeUtils.Combine_AddAndReplace; var newList: array of Attribute; begin newList := Jedi.System.Attributes.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.AddAndReplace); Assert.AreEqual(ListAfterAddAndReplace, newList); end; procedure AttributeUtils.Combine_Delete; var newList: array of Attribute; begin newList := Jedi.System.Attributes.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Delete); Assert.AreEqual(ListAfterDelete, newList); end; procedure AttributeUtils.Combine_Replace; var newList: array of Attribute; begin newList := Jedi.System.Attributes.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Replace); Assert.AreEqual(ListAfterReplace, newList); end; procedure AttributeUtils.RetrieveAttributeByType; var attr: Attribute; begin attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List1, TypeOf(TestAttribute1)); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List2, TypeOf(TestAttribute1)); Assert.AreSame(List2[0], attr, 'List2[0]'); end; procedure AttributeUtils.RetrieveAttributeByInstance; var attr: Attribute; begin attr := TestAttribute1.Create('Attribute 1, list 1.'); attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List1, attr); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := TestAttribute1.Create('Attribute 1, list 2.'); attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List2, attr); Assert.AreSame(List2[0], attr, 'List2[0]'); attr := TestAttribute1.Create('Attribute x, list 1.'); attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List1, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list1.'')'); attr := TestAttribute1.Create('Attribute x, list 2.'); attr := Jedi.System.Attributes.AttributeUtils.GetAttribute(List2, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list2.'')'); end; procedure AttributeUtils.TestSetup; begin List1 := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); List2 := AttributeCollection.Create(AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') )); ListAfterAdd := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterAddAndReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterDelete := AttributeArray.Create( TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); ListAfterReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); end; {$ENDREGION} end. --- NEW FILE: Jedi.IO.PathNunit.pas --- unit Jedi.IO.PathNunit; interface uses System.IO, NUnit.Framework, Jedi.IO.Paths, Jedi.IO.BaseNUnit; type [TestFixture] Normalize = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] ValidityChecks = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] Manipulations = class public [Test] procedure CombineTenPaths; [Test] procedure CombineTwo; [Test] procedure CombineTwoAbsolutePaths; end; [TestFixture] PathConfigurations = class public [Test] procedure TestConfiguration; end; implementation {$REGION 'Normalize'} procedure Normalize.DeepVolumeRootedPath; begin Assert.AreEqual(PathTestCases.sDeepVolumeRootedPathNormalized, Path.Normalize(PathTestCases.sDeepVolumeRootedPath)); end; procedure Normalize.DeepRootedPath; begin Assert.AreEqual(PathTestCases.sDeepRootedPathNormalized, Path.Normalize(PathTestCases.sDeepRootedPath)); end; procedure Normalize.RelativePath; begin Assert.AreEqual(PathTestCases.sRelativePathNormalized, Path.Normalize(PathTestCases.sRelativePath)); end; procedure Normalize.RelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sRelativePathUpLevel)); end; procedure Normalize.RelativePathUpTwoLevels; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevels)); end; procedure Normalize.RelativePathUpTwoLevelsSep; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsSepNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevelsSep)); end; procedure Normalize.InvalidVolumeRoot; begin Assert.AreEqual(PathTestCases.sInvalidVolumeRootNormalized, Path.Normalize(PathTestCases.sInvalidVolumeRoot)); end; procedure Normalize.InvalidRelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sInvalidRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sInvalidRelativePathUpLevel)); end; procedure Normalize.VolumeRoot; begin Assert.AreEqual(PathTestCases.sVolumeRootNormalized, Path.Normalize(PathTestCases.sVolumeRoot)); end; procedure Normalize.StartWithThisPath; begin Assert.AreEqual(PathTestCases.sStartWithThisPathNormalized, Path.Normalize(PathTestCases.sStartWithThisPath)); end; procedure Normalize.HasDottedFolderName; begin Assert.AreEqual(PathTestCases.sHasDottedFolderNameNormalized, Path.Normalize(PathTestCases.sHasDottedFolderName)); end; procedure Normalize.WildcardedFile; begin Assert.AreEqual(PathTestCases.sWildcardedFileNormalized, Path.Normalize(PathTestCases.sWildcardedFile)); end; {$ENDREGION} {$REGION 'ValidityChecks'} procedure ValidityChecks.DeepVolumeRootedPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sDeepVolumeRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepVolumeRootedPath', PathTestCases.sDeepVolumeRootedPath]); end; procedure ValidityChecks.DeepRootedPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sDeepRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepRootedPath', PathTestCases.sDeepRootedPath]); end; procedure ValidityChecks.RelativePath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePath), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePath', PathTestCases.sRelativePath]); end; procedure ValidityChecks.RelativePathUpLevel; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpLevel', PathTestCases.sRelativePathUpLevel]); end; procedure ValidityChecks.RelativePathUpTwoLevels; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpTwoLevels), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevels', PathTestCases.sRelativePathUpTwoLevels]); end; procedure ValidityChecks.RelativePathUpTwoLevelsSep; begin Assert.IsTrue(Path.IsValid(PathTestCases.sRelativePathUpTwoLevelsSep), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevelsSep', PathTestCases.sRelativePathUpTwoLevelsSep]); end; procedure ValidityChecks.InvalidVolumeRoot; begin Assert.IsFalse(Path.IsValid(PathTestCases.sInvalidVolumeRoot), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidVolumeRoot', PathTestCases.sInvalidVolumeRoot]); end; procedure ValidityChecks.InvalidRelativePathUpLevel; begin Assert.IsFalse(Path.IsValid(PathTestCases.sInvalidRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidRelativePathUpLevel', PathTestCases.sInvalidRelativePathUpLevel]); end; procedure ValidityChecks.VolumeRoot; begin Assert.IsTrue(Path.IsValid(PathTestCases.sVolumeRoot), 'IsValid({0}{{''{1}''}}) should be True', ['sVolumeRoot', PathTestCases.sVolumeRoot]); end; procedure ValidityChecks.StartWithThisPath; begin Assert.IsTrue(Path.IsValid(PathTestCases.sStartWithThisPath), 'IsValid({0}{{''{1}''}}) should be True', ['sStartWithThisPath', PathTestCases.sStartWithThisPath]); end; procedure ValidityChecks.HasDottedFolderName; begin Assert.IsTrue(Path.IsValid(PathTestCases.sHasDottedFolderName), 'IsValid({0}{{''{1}''}}) should be True', ['sHasDottedFolderName', PathTestCases.sHasDottedFolderName]); end; procedure ValidityChecks.WildcardedFile; begin Assert.IsFalse(Path.IsValid(PathTestCases.sWildcardedFile), 'IsValid({0}{{''{1}''}}) should be False', ['sWildcardedFile', PathTestCases.sWildcardedFile]); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.CombineTenPaths; begin Assert.AreEqual( System.String.Format('myvolume{0}{1}Root{1}Folder1{1}Folder1.1{1}Folder1.1.2{1}Folder1.1.2.1', System.IO.Path.VolumeSeparatorChar, System.IO.Path.DirectorySeparatorChar), Path.Combine(['dummy:NotAvailable\SubNotAvailable', '..\NotUsedEither', 'myvolume:\ignore', '\RootNotUsed\Ignore\Ignore2', '..\NotUsed', '\Root\Folder1\', '.\Folder1.1', 'Folder1.1.1\Folder1.1.1.1\Folder1.1.1.1.1\Folder1.1.1.1.1.1', '.....\Folder1.1.2', '.\Folder1.1.2.1'])); end; procedure Manipulations.CombineTwo; begin Assert.AreEqual( PathTestCases.sCombinedVolRootAndRelativePath, Path.Combine(PathTestCases.sVolumeRoot, PathTestCases.sRelativePath), 'Combine(sVolumeRoot, sRelativePath)'); Assert.AreEqual( PathTestCases.sCombinedDeepVolRootAndRelPathUpTwo, Path.Combine(PathTestCases.sDeepVolumeRootedPath, PathTestCases.sRelativePathUpTwoLevels), 'Combine(sDeepVolumeRootedPath, sRelativePathUpTwoLevels)'); Assert.AreEqual( PathTestCases.sCombinedRelAndRelPathUp, Path.Combine(PathTestCases.sRelativePath, PathTestCases.sRelativePathUpLevel), 'Combine(sRelativePath, sRelativePathUpLevel)'); end; procedure Manipulations.CombineTwoAbsolutePaths; begin Assert.AreEqual( PathTestCases.sCombinedVolRoot2AndDeepRooted, Path.Combine(PathTestCases.sVolumeRoot2, PathTestCases.sDeepRootedPath), 'Combine(sVolumeRoot2, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sCombinedVolPathAndDeepRooted, Path.Combine(PathTestCases.sVolumePath, PathTestCases.sDeepRootedPath), 'Combine(sVolumePath, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sDeepRootedPathNormalized, Path.Combine(PathTestCases.sRelativePath, PathTestCases.sDeepRootedPath), 'Combine(sRelativePath, sDeepRootedPath)'); end; {$ENDREGION} {$REGION 'PathConfigurations'} procedure PathConfigurations.TestConfiguration; begin Assert.AreEqual('myvolume#:folder1:folder2:folder3', Path.Normalize('myvolume#:folder1:folder2;folder3', Path.PathConfig.Create(':', ';', '#', ['$']))); end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2004-12-05 14:44:45
|
Update of /cvsroot/jedidotnet/nunit/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24318/nunit/bin Added Files: bin.txt Log Message: Moved test sets; adapted to Delphi 2005 --- NEW FILE: bin.txt --- |
From: Marcel B. <jed...@us...> - 2004-12-05 14:44:45
|
Update of /cvsroot/jedidotnet/nunit/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24318/nunit/lib Added Files: lib.txt Log Message: Moved test sets; adapted to Delphi 2005 --- NEW FILE: lib.txt --- |
From: Marcel B. <jed...@us...> - 2004-12-05 14:44:45
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24318/nunit Added Files: NUnit Tests.bdsgroup Nunit.Jedi.IO.bdsproj Nunit.Jedi.IO.dpk Nunit.Jedi.System.bdsproj Nunit.Jedi.System.dpk Nunit.Jedi.nunit Log Message: Moved test sets; adapted to Delphi 2005 --- NEW FILE: Nunit.Jedi.System.dpk --- package Nunit.Jedi.System; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, nunit.framework, Jedi.System; contains Jedi.System.AttributesNUnit in 'source\Jedi.System.AttributesNUnit.pas', Jedi.System.StringsNUnit in 'source\Jedi.System.StringsNUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.System')] [assembly: AssemblyDescription('Unit tests for the Jedi.System assembly.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] [assembly: ComVisible(False)] end. --- NEW FILE: NUnit Tests.bdsgroup --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.IO.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.nunit --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.System.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.IO.dpk --- package Nunit.Jedi.IO; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, Jedi.IO, nunit.framework; contains Jedi.IO.PathNunit in 'source\Jedi.IO.PathNunit.pas', Jedi.IO.BaseNUnit in 'source\Jedi.IO.BaseNUnit.pas'; [assembly: AssemblyTitle('Nunit.Jedi.IO')] [assembly: AssemblyDescription('Unit tests for the Jedi.IO assembly.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] [assembly: ComVisible(False)] end. |
From: Marcel B. <jed...@us...> - 2004-12-05 14:43:23
|
Update of /cvsroot/jedidotnet/main/Nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24050/main/Nunit/source Removed Files: NUnit.Jedi.Strings.pas NUnit.Jedi.System.pas Nunit.Jedi.IO.PathHandling.pas Nunit.Jedi.IO.pas Log Message: Moving to a level up the hierarchy --- Nunit.Jedi.IO.pas DELETED --- --- Nunit.Jedi.IO.PathHandling.pas DELETED --- --- NUnit.Jedi.Strings.pas DELETED --- --- NUnit.Jedi.System.pas DELETED --- |
From: Marcel B. <jed...@us...> - 2004-12-05 14:43:21
|
Update of /cvsroot/jedidotnet/main/Nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24050/main/Nunit Removed Files: Nunit.Jedi.Core.bdsproj Nunit.Jedi.Core.dpk Nunit.Jedi.Persistence.bdsproj Nunit.Jedi.Persistence.dpk Nunit.Jedi.Results.xml Nunit.Jedi.Text.bdsproj Nunit.Jedi.Text.dpk Nunit.Jedi.nunit Log Message: Moving to a level up the hierarchy --- Nunit.Jedi.Text.bdsproj DELETED --- --- Nunit.Jedi.Persistence.dpk DELETED --- --- Nunit.Jedi.Core.dpk DELETED --- --- Nunit.Jedi.nunit DELETED --- --- Nunit.Jedi.Persistence.bdsproj DELETED --- --- Nunit.Jedi.Text.dpk DELETED --- --- Nunit.Jedi.Core.bdsproj DELETED --- --- Nunit.Jedi.Results.xml DELETED --- |
From: Marcel B. <jed...@us...> - 2004-12-05 14:39:59
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23351/source Log Message: Directory /cvsroot/jedidotnet/nunit/source added to the repository |
From: Marcel B. <jed...@us...> - 2004-12-05 14:39:58
|
Update of /cvsroot/jedidotnet/nunit/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23351/lib Log Message: Directory /cvsroot/jedidotnet/nunit/lib added to the repository |
From: Marcel B. <jed...@us...> - 2004-12-05 14:39:57
|
Update of /cvsroot/jedidotnet/nunit/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23351/bin Log Message: Directory /cvsroot/jedidotnet/nunit/bin added to the repository |
From: Marcel B. <jed...@us...> - 2004-12-05 14:36:20
|
Update of /cvsroot/jedidotnet/nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22865/nunit Log Message: Directory /cvsroot/jedidotnet/nunit added to the repository |
From: Marcel B. <jed...@us...> - 2004-12-05 13:20:08
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8541/main/run Added Files: Jedi.Collections.InlineEditable.pas Jedi.Drawing.Colors.pas Jedi.IO.Paths.pas Jedi.System.Attributes.pas Jedi.System.Strings.pas Removed Files: Jedi.Collections.pas Jedi.Drawing.pas Jedi.IO.pas Jedi.Strings.pas Jedi.System.pas Log Message: Converted to Delphi 2005. Delphi 8 will no longer be supported. --- NEW FILE: Jedi.Collections.InlineEditable.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Collections.pas, released on 2004-06-13. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet [...1260 lines suppressed...] end; function InlineDictionaryBase.GetItemDescription(key: System.Object): string; begin Result := ''; end; function InlineDictionaryBase.GetItemEmptyValue(key: System.Object): System.Object; begin Result := nil; end; function InlineDictionaryBase.GetItemProperty(key, value: System.Object): PropertyDescriptor; begin Result := InlineCollectionUtils.CreateItemProperty(value.GetType, AttributeArray.Create(), Self, key.ToString, GetItemDescription(key), key, GetItemEmptyValue(key)); end; {$ENDREGION} end. --- Jedi.System.pas DELETED --- --- Jedi.Strings.pas DELETED --- --- Jedi.Collections.pas DELETED --- --- NEW FILE: Jedi.IO.Paths.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.IO.pas, released on 2004-11-24. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.IO.Paths.pas,v 1.1 2004/12/05 13:19:48 jedi_mbe Exp $ unit Jedi.IO.Paths; interface {$REGION 'Path manipulations'} type CharArray = array of Char; Path = class {$REGION 'PathConfig'} public type PathConfig = class strict private FDirSep: Char; FAltDirSep: Char; FVolSep: Char; FInvalidPathChars: array of Char; public constructor Create; overload; constructor Create(directorySeparator, altDirectorySeparator, volumeSeparator: Char; invalidPathChars: array of Char); overload; function AltDirectorySeparator: Char; function DirectorySeparator: Char; function InvalidPathChars: CharArray; function VolumeSeparator: Char; end; {$ENDREGION} strict private class constructor Create; strict protected constructor Create; strict protected class var SysConfig: PathConfig; public class function Combine(paths: array of string): string; overload; static; class function Combine(paths: array of string; config: PathConfig): string; overload; static; class function Combine(path1, path2: string): string; overload; static; class function Combine(path1, path2: string; config: PathConfig): string; overload; static; class function EnsureEndingDirectorySeparator(path: string): string; overload; static; class function EnsureEndingDirectorySeparator(path: string; config: PathConfig): string; overload; static; class function IsPathRooted(path: string): Boolean; overload; static; class function IsPathRooted(path: string; config: PathConfig): Boolean; overload; static; class function IsValid(path: string): Boolean; overload; static; class function IsValid(path: string; config: PathConfig): Boolean; overload; static; class function IsValid(path: string; allowWildcards: Boolean): Boolean; overload; static; class function IsValid(path: string; allowWildcards: Boolean; config: PathConfig): Boolean; overload; static; class function IsVolumePath(path: string): Boolean; overload; static; class function IsVolumePath(path: string; config: PathConfig): Boolean; overload; static; class function Normalize(path: string): string; overload; static; class function Normalize(path: string; config: PathConfig): string; overload; static; class function SystemConfig: PathConfig; static; end; PathException = class (SystemException) end; {$ENDREGION} implementation {$REGION 'implementation uses'} uses System.Collections, System.IO, System.Text, Jedi.System; {$ENDREGION} {$AUTOBOX ON} {$REGION 'Path'} class constructor Path.Create; begin SysConfig := Path.PathConfig.Create; end; constructor Path.Create; begin inherited Create; end; class function Path.Combine(paths: array of string): string; begin Result := Combine(paths, SysConfig); end; class function Path.Combine(paths: array of string; config: PathConfig): string; var i: Integer; lastRoot: Integer; al: ArrayList; level: Integer; sb: StringBuilder; begin if not Assigned(paths) then raise ArgumentNullException.Create('paths'); i := &Array(paths).Length - 1; lastRoot := -1; while (i >= 0) and not IsVolumePath(paths[i], config) do begin if (lastRoot = -1) and IsPathRooted(paths[i], config) then lastRoot := i; Dec(i); end; al := ArrayList.Create; if i = -1 then i := lastRoot else if i < lastRoot then begin al.Add(StringUtils.Before(paths[i], config.VolumeSeparator) + config.VolumeSeparator); i := lastRoot; end; if i = -1 then i := 0; while i < &Array(paths).Length do begin al.AddRange(&Array(StringUtils.RemoveDuplicateChars(paths[i].Trim([config.DirectorySeparator, config.AltDirectorySeparator]), [config.DirectorySeparator, config.AltDirectorySeparator]).Split( [config.DirectorySeparator, config.AltDirectorySeparator]))); Inc(i); end; i := 0; while (i < al.Count) and (System.String.Create('.', string(al[i]).Length).Equals(string(al[i]))) do Inc(i); while (i < al.Count) do begin if string(al[i]).Equals(System.String.Create('.', string(al[i]).Length)) then begin level := string(al[i]).Length - 1; if level > i then raise PathException.Create('Level traversal is too deep.'); al.RemoveRange(i - level, level + 1); Dec(i, level); end else Inc(i); end; sb := StringBuilder.Create(256); for i := 0 to al.Count - 1 do sb.Append(string(al[i]) + config.DirectorySeparator); if al.Count > 0 then sb.Remove(sb.Length - 1, 1); Result := Normalize(sb.ToString, config); if (lastRoot <> -1) and not IsVolumePath(Result, config) then Result := Result.Insert(0, config.DirectorySeparator); end; class function Path.Combine(path1, path2: string): string; begin Result := Combine([path1, path2], SysConfig); end; class function Path.Combine(path1, path2: string; config: PathConfig): string; begin Result := Combine([path1, path2], config); end; class function Path.EnsureEndingDirectorySeparator(path: string): string; begin Result := EnsureEndingDirectorySeparator(path, SysConfig); end; class function Path.EnsureEndingDirectorySeparator(path: string; config: PathConfig): string; begin if not path.EndsWith(config.DirectorySeparator) then Result := path + config.DirectorySeparator else Result := path; end; class function Path.IsPathRooted(path: string): Boolean; begin Result := IsPathRooted(path, SysConfig); end; class function Path.IsPathRooted(path: string; config: PathConfig): Boolean; begin Result := IsVolumePath(path, config) or path.StartsWith(config.DirectorySeparator) or path.StartsWith(config.AltDirectorySeparator); end; class function Path.IsValid(path: string): Boolean; begin Result := IsValid(path, False, SysConfig); end; class function Path.IsValid(path: string; config: PathConfig): Boolean; begin Result := IsValid(path, False, config); end; class function Path.IsValid(path: string; allowWildcards: Boolean): Boolean; begin Result := IsValid(path, allowWildcards, SysConfig); end; class function Path.IsValid(path: string; allowWildcards: Boolean; config: PathConfig): Boolean; var i: Integer; begin Result := ((path.IndexOf(config.VolumeSeparator) = -1) or IsVolumePath(path, config)) and (path.IndexOfAny(config.InvalidPathChars) = -1) and (allowWildcards or (path.IndexOfAny('*?'.ToCharArray) = -1)); i := 0; while Result and (i < path.Length) do begin if (i = 0) or (config.DirectorySeparator = path.Chars[i]) or (config.AltDirectorySeparator = path.Chars[i]) then begin if i > 0 then Inc(i); if (i < path.Length - 1) and (path.Chars[i] = '.') and (path.Chars[i + 1] = '.') then begin while Result and (i < path.Length) and ((config.DirectorySeparator + config.AltDirectorySeparator).IndexOf(path.Chars[i]) = -1) do begin Result := path.Chars[i] = '.'; Inc(i); end; end else Inc(i); end else Inc(i); end; end; class function Path.IsVolumePath(path: string): Boolean; begin Result := IsVolumePath(path, SysConfig); end; class function Path.IsVolumePath(path: string; config: PathConfig): Boolean; var idx1: Integer; idx2: Integer; begin idx1 := path.IndexOf(config.VolumeSeparator); if idx1 > -1 then begin idx2 := path.IndexOfAny([config.DirectorySeparator, config.AltDirectorySeparator]); Result := (idx2 = -1) or (idx2 > idx1) and (path.IndexOf(config.VolumeSeparator, idx1 + 1) = -1); end else Result := False; end; class function Path.Normalize(path: string): string; begin Result := Normalize(path, SysConfig); end; class function Path.Normalize(path: string; config: PathConfig): string; var i: Integer; lastSet: Integer; begin Result := path.Replace(config.AltDirectorySeparator, config.DirectorySeparator).Replace( config.DirectorySeparator + '.' + config.DirectorySeparator, ''); while Result.StartsWith('.' + config.DirectorySeparator) do Result := Result.Remove(0, 2); i := Result.Length - 1; while (i >= 1) and (Result.Chars[i] = config.DirectorySeparator) and (Result.Chars[i - 1] <> config.VolumeSeparator) do Dec(i); Result := Result.Substring(0, i + 1); lastSet := -1; repeat lastSet := Result.IndexOf('...', lastSet + 1); if lastSet > -1 then begin i := lastSet + 3; while (i < Result.Length) and (Result.Chars[i] = '.') do Inc(i); Result := Result.Remove(lastSet, i - lastSet).Insert(lastSet, StringUtils.Repeat( '..' + config.DirectorySeparator, i - lastSet - 1)); lastSet := lastSet + 3 * (i - lastSet - 1); end; until lastSet = -1; Result := StringUtils.RemoveDuplicateChars(Result, config.DirectorySeparator); i := Result.IndexOf(config.VolumeSeparator); if (i > -1) and (i < Result.Length - 1) and (Result.Chars[i + 1] <> config.DirectorySeparator) then Result := Result.Insert(i + 1, config.DirectorySeparator); end; class function Path.SystemConfig: PathConfig; begin Result := SysConfig; end; {$ENDREGION} {$REGION 'Path.PathConfig'} constructor Path.PathConfig.Create; begin Create(System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar, System.IO.Path.VolumeSeparatorChar, System.IO.Path.InvalidPathChars); end; constructor Path.PathConfig.Create(directorySeparator, altDirectorySeparator, volumeSeparator: Char; invalidPathChars: array of Char); begin inherited Create; FDirSep := directorySeparator; FAltDirSep := altDirectorySeparator; FVolSep := volumeSeparator; FInvalidPathChars := invalidPathChars; end; function Path.PathConfig.AltDirectorySeparator: Char; begin Result := FAltDirSep; end; function Path.PathConfig.DirectorySeparator: Char; begin Result := FDirSep; end; function Path.PathConfig.InvalidPathChars: CharArray; begin Result := FInvalidPathChars; end; function Path.PathConfig.VolumeSeparator: Char; begin Result := FVolSep; end; {$ENDREGION} end. --- NEW FILE: Jedi.System.Attributes.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.System.pas, released on 2004-06-13. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.System.Attributes.pas,v 1.1 2004/12/05 13:19:48 jedi_mbe Exp $ unit Jedi.System.Attributes; interface {$REGION 'interface uses'} uses System.Collections, System.ComponentModel; {$ENDREGION} {$REGION 'Attributes'} type AttributeArray = array of Attribute; AttributeCombineOperation = (Add, Replace, Delete, AddAndReplace); type AttributeUtils = class (System.Object) strict protected constructor Create; class function CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; overload; static; class function IndexOf(attrList: ArrayList; attr: System.Object): Integer; static; class function ToArrayList(attrs: array of Attribute): ArrayList; overload; static; class function ToArrayList(attrs: AttributeCollection): ArrayList; overload; static; public class function CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; overload; static; class function CombineAttributes(attributes1, attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1, attributes2: AttributeCollection): AttributeCollection; overload; static; class function CombineAttributes(attributes1, attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeCollection; overload; static; class function CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection): AttributeArray; overload; static; class function CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute): AttributeCollection; overload; static; class function CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; overload; static; class function GetAttribute(attributes: array of Attribute; attr: Attribute): Attribute; overload; static; class function GetAttribute(attributes: array of Attribute; attrType: System.Type): Attribute; overload; static; class function GetAttribute(attributes: AttributeCollection; attr: Attribute): Attribute; overload; static; class function GetAttribute(attributes: AttributeCollection; attrType: System.Type): Attribute; overload; static; end; {$ENDREGION} implementation {$REGION 'AttributeUtils'} constructor AttributeUtils.Create; begin inherited Create; end; class function AttributeUtils.IndexOf(attrList: ArrayList; attr: System.Object): Integer; var attrType: System.Type; endLoop: Boolean; begin if attr is System.Type then attrType := System.Type(attr) else attrType := attr.GetType; Result := 0; endLoop := False; while (Result < attrList.Count) and not endLoop do begin endLoop := attrType = attrList[Result].GetType; if endLoop and not &Object.ReferenceEquals(attr, attrType) then endLoop := attr.Equals(attrList[Result]); if not endLoop then Inc(Result); end; if Result >= attrList.Count then Result := -1; end; class function AttributeUtils.ToArrayList(attrs: array of Attribute): ArrayList; begin if Assigned(attrs) then Result := ArrayList.Create(&Array(attrs)) else Result := ArrayList.Create; end; class function AttributeUtils.ToArrayList(attrs: AttributeCollection): ArrayList; begin if Assigned(attrs) then Result := ArrayList.Create(attrs) else Result := ArrayList.Create; end; class function AttributeUtils.CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; var index: Integer; attrIndex: Integer; begin Result := attributes1; for index := 0 to attributes2.Count - 1 do begin attrIndex := IndexOf(Result, attributes2[index].GetType); if attrIndex > -1 then begin case operation of AddAndReplace, Replace: Result[attrIndex] := attributes2[index]; Delete: Result.RemoveAt(attrIndex); end; end else if (operation = Add) or (operation = AddAndReplace) then Result.Add(attributes2[index]); end; end; class function AttributeUtils.CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; class function AttributeUtils.CombineAttributes(attributes1, attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeArray; begin Result := AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute))); end; class function AttributeUtils.CombineAttributes(attributes1, attributes2: AttributeCollection): AttributeCollection; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; class function AttributeUtils.CombineAttributes(attributes1, attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeCollection; begin Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute)))); end; class function AttributeUtils.CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection): AttributeArray; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; class function AttributeUtils.CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; begin Result := AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute))); end; class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute): AttributeCollection; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; begin Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute)))); end; class function AttributeUtils.GetAttribute(attributes: array of Attribute; attr: Attribute): Attribute; var idx: Integer; begin idx := IndexOf(ToArrayList(attributes), attr); if idx > -1 then Result := attributes[idx] else Result := nil; end; class function AttributeUtils.GetAttribute(attributes: array of Attribute; attrType: System.Type): Attribute; var idx: Integer; begin idx := IndexOf(ToArrayList(attributes), attrType); if idx > -1 then Result := attributes[idx] else Result := nil; end; class function AttributeUtils.GetAttribute(attributes: AttributeCollection; attr: Attribute): Attribute; var idx: Integer; begin idx := IndexOf(ToArrayList(attributes), attr); if idx > -1 then Result := attributes[idx] else Result := nil; end; class function AttributeUtils.GetAttribute(attributes: AttributeCollection; attrType: System.Type): Attribute; var idx: Integer; begin idx := IndexOf(ToArrayList(attributes), attrType); if idx > -1 then Result := attributes[idx] else Result := nil; end; {$ENDREGION} end. --- NEW FILE: Jedi.Drawing.Colors.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Drawing.pas, released on 2004-05-16. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.Drawing.Colors.pas,v 1.1 2004/12/05 13:19:48 jedi_mbe Exp $ unit Jedi.Drawing.Colors; interface {$REGION 'interface uses'} uses System.Drawing; {$ENDREGION} {$REGION 'Color related'} type ColorUtils = class sealed (System.Object) public { Blends two colors. The resulting color will be a mix of the two colors. The percentage parameter determines how much of the second color will be present. } class function Blend(firstColor, secondColor: Color; percentage: Integer): Color; static; { Brightens a color. The resulting color will be a mix of the base color and pure white. The percentage parameter determines how much white will be present. } class function Brighten(baseColor: Color; percentage: Integer): Color; static; { Darkens a color. The resulting color will be a mix of the base color and pure black. The percentage parameter determines how much black will be present. } class function Darken(baseColor: Color; percentage: Integer): Color; static; end; {$ENDREGION} implementation {$REGION 'ColorUtils'} class function ColorUtils.Blend(firstColor, secondColor: Color; percentage: Integer): Color; begin Result := Color.FromArgb( firstColor.R + (secondColor.R - firstColor.R) * percentage div 100, firstColor.G + (secondColor.G - firstColor.G) * percentage div 100, firstColor.B + (secondColor.B - firstColor.B) * percentage div 100 ); end; class function ColorUtils.Brighten(baseColor: Color; percentage: Integer): Color; begin Result := ColorUtils.Blend(baseColor, Color.White, percentage); end; class function ColorUtils.Darken(baseColor: Color; percentage: Integer): Color; begin Result := ColorUtils.Blend(baseColor, Color.Black, percentage); end; {$ENDREGION} end. --- Jedi.Drawing.pas DELETED --- --- NEW FILE: Jedi.System.Strings.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Strings.pas, released on 2004-11-24. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.System.Strings.pas,v 1.1 2004/12/05 13:19:48 jedi_mbe Exp $ unit Jedi.System.Strings; interface {$REGION 'interface uses'} uses System.Collections, System.Text; {$ENDREGION} {$REGION 'String utilities'} type [Flags] ExtractQuotedStringFlags = (Default = 0, IgnoreGarbage = 1, EndQuoteMandetory = 2); StringUtils = class {$REGION 'TabSet class'} public type TabSet = class (&Object, ICloneable) strict private FTabs: ArrayList; FDefaultWidth: Integer; FUpdateCount: Integer; strict protected function IsAutoWidth: Boolean; function IsUpdating: Boolean; procedure RecalcDefaultWidth; public constructor Create; overload; constructor Create(defaultWidth: Integer); overload; constructor Create(tabs: array of Integer); overload; constructor Create(tabs: array of Integer; defaultWidth: Integer); overload; procedure Add(tabPosition: Integer); procedure BeginUpdate; procedure Clear; function Clone: &Object; virtual; procedure EndUpdate; function Equals(obj: &Object): Boolean; override; function RealDefaultWidth: Integer; procedure Remove(tabPosition: Integer; includeFollowing: Boolean = False); procedure RemoveAt(index: Integer; includeFollowing: Boolean = False); function TabFrom(pos: Integer): Integer; function get_Count: Integer; function get_DefaultWidth: Integer; function get_Tabs(index: Integer): Integer; procedure set_Tabs(index: Integer; value: Integer); procedure set_DefaultWidth(value: Integer); function ToString: string; override; property Count: Integer read get_Count; property DefaultWidth: Integer read get_DefaultWidth write set_DefaultWidth; property Tabs[index: Integer]: Integer read get_Tabs write set_Tabs; default; end; {$ENDREGION} strict protected constructor Create; public class function After(s: string; delimiter: System.Char): string; static; class function AfterAnyOf(s: string; delimiters: array of System.Char): string; static; class function AfterLast(s: string; delimiter: System.Char): string; static; class function AfterLastAnyOf(s: string; delimiters: array of System.Char): string; static; class function Before(s: string; delimiter: System.Char): string; static; class function BeforeAnyOf(s: string; delimiters: array of System.Char): string; static; class function BeforeLast(s: string; delimiter: System.Char): string; static; class function BeforeLastAnyOf(s: string; delimiters: array of System.Char): string; static; class function ExpandTabs(s: string; tabs: array of Int32): string; overload; static; class function ExpandTabs(s: string; tabs: array of Int32; additionalTabsWidth: Int32): string; overload; static; class function ExpandTabs(s: string; tabSet: TabSet): string; overload; static; class function ExtractQuotedString(s: string): string; overload; static; class function ExtractQuotedString(s: string; flags: ExtractQuotedStringFlags): string; overload; static; class function ExtractQuotedString(s: string; out lastUsedChar: Integer): string; overload; static; class function Left(s: string; length: Integer): string; static; class function Mid(s: string; from, &to: Integer): string; static; class function RemoveDuplicateChars(s: string; char: System.Char): string; overload; static; class function RemoveDuplicateChars(s: string; chars: array of System.Char): string; overload; static; class function &Repeat(s: string; count: Integer): string; static; class function Right(s: string; length: Integer): string; static; class function QuoteString(s: string): string; overload; static; class function QuoteString(s: string; quoteChar: Char): string; overload; static; end; {$ENDREGION} implementation {$AUTOBOX ON} {$REGION 'StringUtils'} constructor StringUtils.Create; begin inherited Create; end; class function StringUtils.After(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.IndexOf(delimiter); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.IndexOfAny(delimiters); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterLast(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.LastIndexOf(delimiter); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterLastAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.LastIndexOfAny(delimiters); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.Before(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.IndexOf(delimiter); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.IndexOfAny(delimiters); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeLast(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.LastIndexOf(delimiter); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeLastAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.LastIndexOfAny(delimiters); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.ExpandTabs(s: string; tabs: array of Integer): string; begin Result := ExpandTabs(s, TabSet.Create(tabs)); end; class function StringUtils.ExpandTabs(s: string; tabs: array of Integer; additionalTabsWidth: Integer): string; begin Result := ExpandTabs(s, TabSet.Create(tabs, additionalTabsWidth)); end; class function StringUtils.ExpandTabs(s: string; tabSet: TabSet): string; var sb: StringBuilder; startIndex: Integer; idx: Integer; begin sb := StringBuilder.Create; startIndex := 0; repeat idx := s.IndexOf(#9, startIndex); if idx > -1 then begin if idx > startIndex then sb.Append(s.Substring(startIndex, idx - startIndex)); Inc(idx); startIndex := idx; idx := tabSet.TabFrom(sb.Length); sb.Append(' ', idx - sb.Length) end else sb.Append(s.Substring(startIndex)); until idx = -1; Result := sb.ToString; end; class function StringUtils.ExtractQuotedString(s: string): string; begin Result := ExtractQuotedString(s, ExtractQuotedStringFlags.EndQuoteMandetory); end; class function StringUtils.ExtractQuotedString(s: string; flags: ExtractQuotedStringFlags): string; var i: Integer; begin if s = '' then Result := '' else begin Result := ExtractQuotedString(s, i); if ((flags and ExtractQuotedStringFlags.IgnoreGarbage) <> ExtractQuotedStringFlags.IgnoreGarbage) and (i > 0) and (i <> (s.Length - 1)) then raise FormatException.Create('String ends in garbage.'); if ((flags and ExtractQuotedStringFlags.EndQuoteMandetory) = ExtractQuotedStringFlags.EndQuoteMandetory) and (not i = s.Length) then raise FormatException.Create('End quote missing.'); end; end; class function StringUtils.ExtractQuotedString(s: string; out lastUsedChar: Integer): string; var qteChar: Char; sb: StringBuilder; i: Integer; begin Result := ''; lastUsedChar := 0; if s.Length > 0 then begin qteChar := s.Chars[0]; if (qteChar = '''') or (qteChar = '"') then begin sb := StringBuilder.Create; repeat i := s.IndexOf(qteChar, lastUsedChar + 1); if i >= 0 then begin if i <> (lastUsedChar + 1) then sb.Append(s.Substring(lastUsedChar + 1, i - lastUsedChar - 1)); lastUsedChar := i; Inc(i); if (i < s.Length) and (s.Chars[i] = qteChar) then begin sb.Append(qteChar); Inc(lastUsedChar); end else i := -1; end else begin sb.Append(s.Substring(lastUsedChar + 1)); lastUsedChar := not s.Length; end; until i < 0; Result := sb.ToString; end else begin Result := s; lastUsedChar := s.Length - 1; end; end; end; class function StringUtils.Left(s: string; length: Integer): string; begin Result := s.Substring(0, length); end; class function StringUtils.Mid(s: string; from, &to: Integer): string; begin Result := s.Substring(from, &to - from + 1); end; class function StringUtils.RemoveDuplicateChars(s: string; char: System.Char): string; var lastFound: Integer; sb: StringBuilder; newFound: Integer; foundCh: System.Char; begin lastFound := 0; sb := StringBuilder.Create; repeat newFound := s.IndexOf(char, lastFound); if newFound > -1 then begin sb.Append(Mid(s, lastFound, newFound)); foundCh := s.Chars[newFound]; while (newFound < s.Length) and (s.Chars[newFound] = foundCh) do Inc(newFound); lastFound := newFound; end else sb.Append(s.Substring(lastFound)); until (newFound = -1) or (newFound >= s.Length); Result := sb.ToString; end; class function StringUtils.RemoveDuplicateChars(s: string; chars: array of System.Char): string; var lastFound: Integer; sb: StringBuilder; newFound: Integer; foundCh: System.Char; begin lastFound := 0; sb := StringBuilder.Create; repeat newFound := s.IndexOfAny(chars, lastFound); if newFound > -1 then begin sb.Append(Mid(s, lastFound, newFound)); foundCh := s.Chars[newFound]; while (newFound < s.Length) and (s.Chars[newFound] = foundCh) do Inc(newFound); lastFound := newFound; end else sb.Append(s.Substring(lastFound)); until (newFound = -1) or (newFound >= s.Length); Result := sb.ToString; end; class function StringUtils.&Repeat(s: string; count: Integer): string; var sb: StringBuilder; begin if count < 0 then raise ArgumentOutOfRangeException.Create('param', count, 'The count parameter must be zero or positive.'); sb := StringBuilder.Create(s.Length * count); while count > 0 do begin sb.Append(s); Dec(count); end; Result := sb.ToString; end; class function StringUtils.Right(s: string; length: Integer): string; begin Result := s.Substring(s.length - length, length); end; class function StringUtils.QuoteString(s: string): string; begin Result := QuoteString(s, ''''); end; class function StringUtils.QuoteString(s: string; quoteChar: Char): string; var sb: StringBuilder; lastQtePos: Integer; thisQtePos: Integer; begin sb := StringBuilder.Create(quoteChar, s.Length * 11 div 10); lastQtePos := 0; thisQtePos := s.IndexOf(quoteChar); while thisQtePos > -1 do begin sb.Append(s.Substring(lastQtePos, thisQtePos - lastQtePos)); sb.Append(quoteChar, 2); lastQtePos := thisQtePos + 1; thisQtePos := s.IndexOf(quoteChar, lastQtePos); end; sb.Append(s.Substring(lastQtePos)); sb.Append(quoteChar); Result := sb.ToString; end; {$ENDREGION} {$REGION 'StringUtils.TabSet'} constructor StringUtils.TabSet.Create; begin Create([], 0); end; constructor StringUtils.TabSet.Create(defaultWidth: Integer); begin Create([], defaultWidth); end; constructor StringUtils.TabSet.Create(tabs: array of Integer); begin Create(tabs, 0); end; constructor StringUtils.TabSet.Create(tabs: array of Integer; defaultWidth: Integer); var idx: Integer; begin if defaultWidth < 0 then raise ArgumentOutOfRangeException.Create('defaultWidth', defaultWidth, 'DefaultWidth must be zero or positive.'); inherited Create; if not Assigned(tabs) then FTabs := ArrayList.Create else FTabs := ArrayList.Create(&Array(tabs).Length); FDefaultWidth := defaultWidth; if Assigned(tabs) then begin BeginUpdate; try for idx := 0 to High(tabs) do Add(tabs[idx]); finally EndUpdate; end; end; end; procedure StringUtils.TabSet.Add(tabPosition: Integer); var idx: Integer; begin idx := FTabs.BinarySearch(tabPosition); if idx < 0 then begin FTabs.Insert(not idx, tabPosition); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end else raise InvalidOperationException.Create('Duplicate positions are not allowed.'); end; procedure StringUtils.TabSet.BeginUpdate; begin Inc(FUpdateCount); end; procedure StringUtils.TabSet.Clear; begin FTabs.Clear; if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; function StringUtils.TabSet.Clone: &Object; type IntArray = array of Integer; begin Result := StringUtils.TabSet.Create(IntArray(FTabs.ToArray(TypeOf(Integer))), DefaultWidth); end; procedure StringUtils.TabSet.EndUpdate; begin if IsUpdating then begin Dec(FUpdateCount); if not IsUpdating and IsAutoWidth then RecalcDefaultWidth; end; end; function StringUtils.TabSet.Equals(obj: &Object): Boolean; var firstSet: StringUtils.TabSet; secondSet: StringUtils.TabSet; tabPos: Integer; i: Integer; begin Result := &Object.ReferenceEquals(Self, obj); if not Result and (TypeOf(StringUtils.TabSet).IsInstanceOfType(obj)) then begin firstSet := StringUtils.TabSet(obj); if IsAutoWidth and IsUpdating then RecalcDefaultWidth; if firstSet.IsAutoWidth and firstSet.IsUpdating then firstSet.RecalcDefaultWidth; Result := RealDefaultWidth = firstSet.RealDefaultWidth; if firstSet.Count > Count then begin secondSet := firstSet; firstSet := Self; end else secondSet := Self; if Result and (firstSet.Count < secondSet.Count) then begin if firstSet.Count > 0 then begin tabPos := firstSet.Tabs[firstSet.Count - 1]; i := firstSet.Count; end else begin tabPos := 0; i := 0; end; while Result and (i < secondSet.Count) do begin Inc(tabPos, firstSet.RealDefaultWidth); Result := tabPos = secondSet.Tabs[i]; Inc(i); end; end; i := firstSet.Count - 1; while Result and (i >= 0) do begin Result := firstSet.Tabs[i] = secondSet.Tabs[i]; Dec(i); end; end; end; function StringUtils.TabSet.get_Count: Integer; begin Result := FTabs.Count; end; function StringUtils.TabSet.get_DefaultWidth: Integer; begin if IsAutoWidth then Result := 0 else Result := FDefaultWidth; end; function StringUtils.TabSet.get_Tabs(index: Integer): Integer; begin Result := Integer(FTabs[index]); end; function StringUtils.TabSet.IsAutoWidth: Boolean; begin Result := FDefaultWidth <= 0; end; function StringUtils.TabSet.IsUpdating: Boolean; begin Result := FUpdateCount > 0; end; function StringUtils.TabSet.RealDefaultWidth: Integer; begin if IsAutoWidth then Result := not FDefaultWidth else Result := FDefaultWidth; end; procedure StringUtils.TabSet.RecalcDefaultWidth; begin if FTabs.Count > 1 then FDefaultWidth := not (Tabs[FTabs.Count - 1] - Tabs[FTabs.Count - 2]) else if FTabs.Count = 1 then FDefaultWidth := not Tabs[0] else FDefaultWidth := not 2; end; procedure StringUtils.TabSet.Remove(tabPosition: Integer; includeFollowing: Boolean); var idx: Integer; begin idx := FTabs.BinarySearch(tabPosition); if (idx < 0) and includeFollowing then idx := not idx; if (idx >= 0) and (idx < FTabs.Count) then RemoveAt(idx, includeFollowing); end; procedure StringUtils.TabSet.RemoveAt(index: Integer; includeFollowing: Boolean); begin if (index < 0) or (index >= FTabs.Count) then raise ArgumentOutOfRangeException.Create('index', index, 'Index must be within {0} and {1}.'); if includeFollowing then FTabs.RemoveRange(index, FTabs.Count - index) else FTabs.RemoveAt(index); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; procedure StringUtils.TabSet.set_DefaultWidth(value: Integer); begin if value < 0 then raise ArgumentOutOfRangeException.Create('value', value, 'DefaultWidth must be zero or positive.'); if (value > 0) and (value <> FDefaultWidth) then FDefaultWidth := value else if (value = 0) and not IsAutoWidth then RecalcDefaultWidth; end; procedure StringUtils.TabSet.set_Tabs(index: Integer; value: Integer); var newIdx: Integer; begin if (index < FTabs.Count) and (Integer(FTabs[index]) <> value) or (index = FTabs.Count) then begin newIdx := FTabs.BinarySearch(value); if newIdx >= 0 then raise InvalidOperationException.Create('Duplicate positions are not allowed.'); newIdx := not newIdx; FTabs.RemoveAt(index); if newIdx >= index then Dec(newIdx); FTabs.Insert(newIdx, value); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; end; function StringUtils.TabSet.TabFrom(pos: Integer): Integer; var idx: Integer; begin idx := FTabs.BinarySearch(pos + 1); if idx < 0 then idx := not idx; if idx < FTabs.Count then Result := Integer(FTabs[idx]) else begin if FTabs.Count > 0 then Result := Integer(FTabs[idx - 1]) else Result := 0; while Result <= pos do Inc(Result, RealDefaultWidth); end; end; function StringUtils.TabSet.ToString: string; var sb: StringBuilder; enum: IEnumerator; begin sb := StringBuilder.Create; sb.Append('['); enum := FTabs.GetEnumerator; if FTabs.Count > 0 then begin while enum.MoveNext do begin sb.Append(Integer(enum.Current)); sb.Append(','); end; sb.Remove(sb.Length - 1, 1); end; sb.Append(']+'); sb.Append(RealDefaultWidth); if RealDefaultWidth <> DefaultWidth then sb.Append(' (automatic)'); Result := sb.ToString; end; {$ENDREGION} end. --- Jedi.IO.pas DELETED --- |
From: Marcel B. <jed...@us...> - 2004-12-05 13:19:56
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8541/main/assemblies Added Files: Jedi.Drawing.bdsproj Jedi.Drawing.dpk Jedi.IO.bdsproj Jedi.IO.dpk Jedi.System.bdsproj Jedi.System.dpk Removed Files: Jedi.Core.bdsproj Jedi.Core.dpk Jedi.Graphics.bdsproj Jedi.Graphics.dpk Jedi.Persistence.bdsproj Jedi.Persistence.dpk Jedi.Text.bdsproj Jedi.Text.dpk Log Message: Converted to Delphi 2005. Delphi 8 will no longer be supported. --- NEW FILE: Jedi.Drawing.dpk --- package Jedi.Drawing; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, System.Drawing; contains Jedi.Drawing.Colors in '..\run\Jedi.Drawing.Colors.pas'; [assembly: AssemblyTitle('Jedi.Drawing')] [assembly: AssemblyDescription('.NET graphic classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] [assembly: ComVisible(False)] end. --- Jedi.Persistence.dpk DELETED --- --- NEW FILE: Jedi.IO.dpk --- package Jedi.IO; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, Jedi.System; contains Jedi.IO.Paths in '..\run\Jedi.IO.Paths.pas'; [assembly: AssemblyTitle('Jedi.IO')] [assembly: AssemblyDescription('.NET IO classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] [assembly: ComVisible(False)] end. --- Jedi.Core.bdsproj DELETED --- --- Jedi.Text.dpk DELETED --- --- NEW FILE: Jedi.System.bdsproj --- (This appears to be a binary file; contents omitted.) --- Jedi.Persistence.bdsproj DELETED --- --- NEW FILE: Jedi.System.dpk --- package Jedi.System; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS OFF} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, System.Drawing; contains Jedi.Collections.InlineEditable in '..\run\Jedi.Collections.InlineEditable.pas', Jedi.System.Attributes in '..\run\Jedi.System.Attributes.pas', Jedi.System.Strings in '..\run\Jedi.System.Strings.pas'; [assembly: AssemblyTitle('Jedi.System')] [assembly: AssemblyDescription('.NET core classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] [assembly: ComVisible(False)] end. --- Jedi.Graphics.dpk DELETED --- --- Jedi.Graphics.bdsproj DELETED --- --- NEW FILE: Jedi.IO.bdsproj --- (This appears to be a binary file; contents omitted.) --- Jedi.Text.bdsproj DELETED --- --- NEW FILE: Jedi.Drawing.bdsproj --- (This appears to be a binary file; contents omitted.) --- Jedi.Core.dpk DELETED --- |
From: Marcel B. <jed...@us...> - 2004-11-28 14:49:47
|
Update of /cvsroot/jedidotnet/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11873/web/images Added Files: dot.gif jedinow.gif opensrc.gif Log Message: --- NEW FILE: opensrc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jedinow.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dot.gif --- (This appears to be a binary file; contents omitted.) |
From: Marcel B. <jed...@us...> - 2004-11-28 14:49:47
|
Update of /cvsroot/jedidotnet/web/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11873/web/styles Added Files: default.css Log Message: --- NEW FILE: default.css --- body {padding: 0px 0px 0px 26px;background: #ffffff; color: #000000;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 9pt;} h1, h2, h3, h4 {font-family: Verdana, Arial, Helvetica, sans-serif;margin-left: -6px;margin-top: .5em;margin-bottom: .5em; } h1 {font-size: 160%;} h2 {font-size: 145%;} h3 {font-size: 130%;} h4 {font-size: 115%;} h5 {font-size: 105%;} hr {align:"right";color:"#000080";noshade;} ul p, ol p, dl p {margin-left: 0em;} p {margin-top: .6em;margin-bottom:.6em;} dl {margin-top: 0em;} dd {margin-bottom: 0em;margin-left: 1.9em;} dt {margin-top: .6em; } ul, ol {margin-top: .6em;margin-bottom: 0em;} ol {margin-left: 1.9em; } ul {list-style-type: disc;margin-left: 1.9em; } li {margin-bottom: .6em;} ul ol, ol ol {list-style-type: lower-alpha;} pre {margin-top: .6em;margin-bottom: .6em; } pre,code {font-family: Courier New, Courier, mono;color: #660000;} table {background: #999999;margin-top: .6em;margin-bottom: .3em;} th {padding: 4px 8px;background: #cccccc;text-align: left;font-size: 70%;vertical-align: bottom;height: 25px;} td {padding: 4px 8px;background: #ffffff;vertical-align: top;font-size: 70%;height: 25px;} blockquote {margin-left: 3.8em;margin-right: 3.8em;margin-top: .6em;margin-bottom: .6em;} sup {text-decoration: none;font-size: smaller; } a:link {color: #0066ff;} a:visited {color: #0066ff;} a:hover {color: #cc9900;} .select {margin-bottom:-4px;border-width: 1px;border-style: solid;width: 400px;} .input, .textarea {margin-bottom:-4px;border-width: 1px;border-style: solid;width: 400px;} .submit {background-color: #CCCCCC;border-width: 1px;border-style: solid;} .reset {background-color: #CCCCCC;border-width: 1px;border-style: solid;} .button {background-color: #CCCCCC;border-width: 1px;border-style: solid;} .InfoField {border: 2px solid #AAAAAA;padding: 4px 4px;background: #EFEFEF;} |
From: Marcel B. <jed...@us...> - 2004-11-28 14:49:46
|
Update of /cvsroot/jedidotnet/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11873/web Added Files: about.htm contact.htm content.htm contributing.htm contributors.htm cvs.htm devhelp.htm downloads.htm faq.htm framebottom.htm frameleft.htm frametop.htm help.htm index.html licensing.htm links.htm news.htm reportbug.htm team.htm Log Message: --- NEW FILE: cvs.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Using CVS with JVCL</title> </head> <body> <p> </p> <h2>Using CVS and SSH on a Windows computer</h2> <p> </p> <h4>Overview</h4> <p> Making CVS and CVS with SSH work on a Windows computer can be a daunting task. With the newest releases of a couple of programs and some clear instructions, this is not as difficult as it once was. This document tries to explain in a step by step and easy to follow manner the tasks you must complete to make it work on your computer. </p> <p> </p> <p> With the proliferation of open source projects and the success of the SourceForge web site, the need for a working CVS/SSH solution on the Windows platform has become acute for many developers. To set up CVS and SSH, you must perform the following tasks: </p> <p> </p> <ul> <li>Install the necessary software</li> <li>Create public and private keys</li> <li>Create SourceForge account</li> <li>Upload public key to SourceForge</li> <li>Setting environment variables</li> <li>Checking out a module using SSH</li> <li>Remove the requirement to login</li> </ul> <p> </p> <h4>Install the necessary software</h4> <p>This explanation assumes you are using TortoiseCVS and PuTTY. Note that you don't need the entire PuTTY package: only puttygen.exe and pageant.exe is used here. </p> <p> </p> <p>You can download TortoiseCVS from <a href="http://www.tortoisecvs.org">http://www.tortoisecvs.org</a>. Make sure you get version 0.53 or later as this version has (almost) automatic SSH support. </p> <p> </p> <p>Download PuTTY from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty/.</a> Either download the entire package or choose the puttygen.zip and the pageant.zip files. Install the programs to a folder of your own choice. It is a good idea to put PuTTy in a sub folder of TortoiseCVS. </p> <p> </p> <h4>Anonymous CVS access</h4> <p>You should now be able to make anonymous connections to the CVS repository. TortoiseCVS makes this really simple: </p> <p> </p> <p>Start your web browser and open the project page of the SourceForge project you are interested in. Click the CVS link in the menu bar. The page explains how to setup anonymous access, like this (this example is taken from the JEDI VCL page on SF, but others look the same):</p> <p> </p> <p class="InfoField"> <b>Anonymous CVS Access<br> <br> </b> This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, simply press the Enter key. <br> <br> cvs -d:pserver:ano...@cv...:/cvsroot/jvcl login <br> cvs -z3 -d<span style="background-color: #FFFF00">:pserver:anonymous</span><span style="background-color: #FFFF00">@</span><span style="background-color: #FFFF00">cvs.sourceforge.net</span><span style="background-color: #FFFF00">:/</span><span style="background-color: #FFFF00">cvsroot</span><span style="background-color: #FFFF00">/</span><span style="background-color: #FFFF00">jvcl</span> co modulename </p> <p> </p> <p>To do a checkout, right-click on the folder where you would like to put the files you are going to check out (a sub folder with the modulename will be created automatically) and click the <b> CVS Checkout</b> menu item. Copy the yellow selection above into the CVSROOT edit field like this:</p> <p> </p> <p> <img alt="checkout1.gif" src="images/checkout1.gif" width="454" height="467"> </p> <p> </p> <p> </p> <p>Notice how TortoiseCVS fills in the other fields automatically for you. The only thing you have to add yourself is the module name. You can either click the <b>Fetch list</b> button to get all available modules or type in the name manually. For JVCL3, use dev/JVCL3 as the modulename. </p> <p> </p> <p class="InfoField"> <b>Note:</b><br> Module names are case-sensitive! </p> <p> </p> <p>Click the OK button and all the units and folders will be downloaded to your computer. If you get a password prompt, just press ENTER. If you get a prompt asking you if you trust this server, click Yes. </p> <p> </p> <h4> </h4> <h4>Checkout using SSH</h4> <p> </p> <p>To be able to checkout modules using SSH, you need a SourceForge account, developer access status to the project and SSH enabled on your computer. </p> <h5>Enabling SSH</h5> <p>To enable SSH, you only need to do one thing: add an environment variable. </p> <p> </p> <p> In Windows NT, right-click the "My computer" icon on the desktop and select "Properties" from the menu. In the dialog, click the "Advanced" tab and then the button "Environment variables". On the user variables list, click add and enter the following values: </p> <p> </p> <pre>Name - CVS_RSH Value - ssh </pre> <p>Click OK and OK to close the dialogs. </p> <h5>Create SourceForge account</h5> <p>Now you need a SourceForge account (unless you already have one). Go to SourceForge (<a href="http://sf.net">http://sf.net</a>) and create a new user account. When you've done this, one of the JVCL admins need to grant you developer access to the project. To contact a project admin, send him a mail or post a request in the bug tracker or in the newsgroups.</p> <h5>Checking out a module using SSH</h5> <p>You should now be able to access the project via SSH. The actual command to checkout via CVS is on the CVS page of the project:</p> <p> </p> <p> </p> <p class="InfoField"> <b>Developer CVS Access via SSH<br> <br> </b> Only project developers can access the CVS tree via this method. SSH1 must be installed on your client machine. Substitute modulename and developername with the proper values. Enter your site password when prompted. <br> <br> export CVS_RSH=ssh <br> cvs -z3 -d<span style="background-color: #FFFF00">:ext:developername</span><span style="background-color: #FFFF00">@</span><span style="background-color: #FFFF00">cvs.sourceforge.net</span><span style="background-color: #FFFF00">:/</span><span style="background-color: #FFFF00">cvsroot</span><span style="background-color: #FFFF00">/</span><span style="background-color: #FFFF00">jvcl</span> co modulename </p> <p> </p> <p>Doing the same as when you made an anonymous checkout, right-click the folder where you would like to put the files and select <b>CVS Checkout</b> from the menu. </p> <p> </p> <p> Paste the marked line above into the CVSROOT field, replace <i>developername</i> with your SourceForge login name and either click <b>Fetch List</b> or enter the module name manually. </p> <p> </p> <p> Here's how the TortoiseCVS dialog should look like when doing a SSH checkout (replace "peter3" with your SourceForge developer name):</p> <p> </p> <p><img src="images/checkout2.gif" border="0" width="454" height="467"></p> <p> </p> <p>You will now be prompted by TortoiseCVS for a password. This is your SourceForge password. Type it in and press ENTER. The files and folders from the CVS repository are now downloaded to the selected folder.</p> <p> </p> <h4>Remove the requirement to login</h4> <p> </p> <p>Constantly entering the password to the CVS repository quickly gets tedious, but there is a simple way to fix this. By creating a private/ public key pair with puttygen, you can use PageAnt to handle the login for you. </p> <p> </p> <p> When this is set up correctly, you only need to enter the pass phrase in PageAnt at startup and the rest will be automatic.</p> <h5>Create public and private keys</h5> <p>Begin by running puttygen.exe and create a new key pair. Save both keys on your computer (I recommend the TortoiseCVS folder with the names identity.prv and identity.pub). Note that you don't need to specify a pass phrase for the keys, but it is slightly more secure than leaving them empty. If you are the only person with access to your computer, you probably won't need a pass phrase.</p> <h5>Upload public key to SourceForge</h5> <p>You now need to upload your public key to SourceForge so SSH can find it when you need to login. </p> <p> </p> <p>To do this, select and copy all the text in the memo field in puttygen. Start your web browser and go to your own page on SourceForge (<a href="https://sourceforge.net/my">https://sourceforge.net/my</a>), login (if prompted to do so) and click the <b> Account Options</b> menu item at the top of the page. </p> <p> </p> <p> Browse to the bottom were it says <b> Host Access Information </b> and click the <b> [Edit Keys]</b> link. In the new page, paste the text copied from puttygen into the memo field and click the <b> Update</b> button. </p> <p> </p> <h4>Loading your private key automatically</h4> <h5>Automatic login</h5> <p>Create a new shortcut on your desktop and make it point to pageant.exe. Right-click the new link and select <b>Properties</b>. In the <b> Target</b> field, append a space and the path and filename to the private key file you just saved and created. Save and double-click the link to start PageAnt. Enter the pass phrase if you use one. Verify that your key has been loaded by right-clicking the PageAnt icon in the tray and select<b> View Keys</b>: there should be one key in the list. </p> <p> </p> <blockquote> <p class="InfoField"><b>Tip:<br> </b>Copy / move the PageAnt link to your AutoStart/Startup folder to run PageAnt automatically at boot time.</p> </blockquote> <p> </p> <p>Now when you Checkout, Update, Diff, Commit etc in CVS projects that require SSH, you should not have to enter your password. If TortoiseCVS still prompts you, go over this document again and make sure you've done everything correctly. If you've downloaded a project using anonymous access and later want to change to SSH access, it's easiest to completely delete the folder and start from scratch. </p> <p> </p> <p>If for some reason you can't do that, you could open every Root file (in the CVS subfolders) with Notepad and manually change the cvs path in them from ":pserver" to ":ext" and replace "anonymous" with your SF name and try a CVS Update after that. </p> <hr> <p>Arthur Hoogervorst provided these instructions for WinCVS: <br> </p> <ul> <li>Download the latest <a href="http://www.wincvs.org/">WinCVS</a> (try the mirrors, the other sites are too slow (I currently use 1.3 b7) </li> <li>Download <a href="http://sfsetup.sourceforge.net/">SFSetup</a>. Developed in Delphi, and installs neatly. </li> <li>Connect to CVS with the settings as described above. <br> </li> </ul> <p> </p> <hr> <p>For more information on how to use CVS you can read the Tortoise tutorial, or the official <a href="http://cvshome.org/docs/manual/">CVS manual</a></p> </body> </html> --- NEW FILE: index.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta name="Generator" content="Alleycode HTML Editor"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="keywords" content="Borland, Delphi, Pascal, Object Pascal, component, JEDI, Project JEDI, VCL.NET, TObject, TComponent, Open Source, source, code, programming, software, software development, .NET, C#, WinForms, Windows.Forms, FCL"> <meta name="description" content="Website dedicated to .NET classes, component and controls written in Borland Delphi, donated by Project JEDI members"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Welcome to the JEDI.NET home page</title> </head> <frameset rows="120,*,75" framespacing="0" border="0" frameborder="0"> <frame name="top" scrolling="auto" target="contents" src="frametop.htm" marginwidth="0" marginheight="0"> <frameset cols="203,*"> <frame name="contents" target="_blank" src="frameleft.htm" scrolling="auto" marginwidth="0" marginheight="0"> <frame name="main" src="news.htm" scrolling="auto" target="_blank"> </frameset> <frame name="bottom" scrolling="no" noresize target="contents" src="framebottom.htm"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes> </frameset> </html> --- NEW FILE: devhelp.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Developer Help</title> </head> <body> <h2>Developer Help</h2> <hr> <p>Becoming a developer in JVCL (or any open source project, for that matter) can be overwhelming at the beginning. Not only are you unaquainted with the source code but you probably don't have a clue as to how the work is divided, where to ask for help or what you can and cannot do. </p> <p> </p> <p>This document aims to provide you with answers to most of the questions you might have about JVCL and what you can do to improve it and at the same time personally benefit from the work you put in. If something is missing, wrong or unclear don't hesitate to contact us. </p> <p> </p> <h4>Who will be invited to become a JVCL developer?</h4> <p>The only reason to make someone a JVCL developer is to grant them write access to CVS. This means that although you might have provided a lot of help in enhancing the JVCL it is entirely possible that if you don't need CVS access, you will still not be granted developer status.</p> <p dir="ltr"> </p> <p dir="ltr">Here's some of the most common criteria we use to determine whether someone will be made a developer or not:</p> <ul> <li>Has donated a library of components that has been accepted and has agreed on helping maintain it.</li> <li>Has provided substantial help with enhancing the JVCL, either as a bug fixer, donator or in any other way that makes it obvious that the person needs CVS access</li> <li>Knows the JVCL coding style and follows it.</li> </ul> <p> </p> <p>Most of the time, developers will be invited by one of the admins to become a developer but if you feel that you should have CVS access, you can contact an admin and ask if you can be added to the team. Even if the admin turns you down, that doesn't have to mean that you have done anything wrong. Most of the time it is just a matter of determining whether you actually need CVS access or not.</p> <p> </p> <p>Note that even if you are not a developer, you can still provide bug fixes and enhancements through the bug tracker or the newgroups.</p> <h4>Who will not become a JVCL developer?</h4> <p>People who have contributed nothing or little to the JVCL, who doesn't really need CVS access, who has a sloppy coding style, who constantly submit buggy and non-working code or have a known history of malicious behavior towards JVCL or other projects will have little chance of becoming a JVCL developer.</p> <p> </p> <h4>What happens when I become a developer?</h4> <p dir="ltr" align="left">First, you are added to the team on the SF page by an admin who also sets up your permissions. You should then have write access to CVS (see the <a href="cvs.htm"> CVS</a> page on how to set up CVS with SSH). The admin also adds you to the various project trackers, so you get mail when something happens. You will also be added as developer to the bug tracker which means you can modify and take over bug issues.</p> <p dir="ltr"> </p> <h4 dir="ltr">What do I have to do as a developer?</h4> <p dir="ltr">Once you are a developer, there is really nothing you <i>have </i>to do. JVCL development is based on voluntary work so we don't require anyone to do anything but since you have access, doing something might be a good idea<g>. You might already have a task if you've donated a library and agreed on maintaining it. </p> <p dir="ltr"> </p> <p dir="ltr"> The best way to find out what is going on and what needs to be done is to monitor the newsgroups, the task tracker on the SF page as well as the bug tracker. </p> <p dir="ltr"> </p> <p dir="ltr">If you're new to JVCL, one of the best ways of getting aquainted with it is to try to fix some of the bugs reported in Mantis and expand from there. If you still have nothing to do, posting a message to the newsgroup letting everyone know that you are available for JVCL work, will usually trigger at least a couple of replies with suggestions.</p> <p dir="ltr"> </p> <h4>What should I avoid doing?</h4> <p>There are some things you should avoid in JVCL:</p> <ul> <li>Don't change code without knowing it or without testing it.</li> <li>Don't introduce version specific changes (<b>example:</b> TStringlist.CaseSensitive is not available in D5 or D6).</li> <li>Don't delete files without asking an admin or in the newsgroups first.</li> <li>Don't name units, classes and types in a way that conflicts with the JVCL standard.</li> <li>Don't create new CVS folders or files without prior permission.</li> <li>If you have access to several versions of Delphi/BCB/Kylix, test your code with all versions before committing it. </li> <li dir="ltr"> <p dir="ltr">If you are unsure if a particular code change will work with other versions of Delphi, try to find another developer willing to test it before you commit it.</p> </li> </ul> <p dir="ltr"> </p> <p dir="ltr">Note that if you've been inactive for some time (at least several weeks), you might get removed without prior notice. </p> <p> </p> <p> </p> <p> </p> </body> </html> --- NEW FILE: reportbug.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Report Bugs</title> </head> <body> <h2>Report Bugs</h2> <p> </p> <p dir="ltr">While we try hard to release bug free software, bugs are a part of reality. So, if you have found any bugs, please report them to us. To make the bug reporting as efficient as possible, please try to follow these rules:</p> <p dir="ltr"> </p> <ul> <li dir="ltr"> <p dir="ltr">Make the report as detailed as possible so we have a fair chance to reproduce and fix it. </li> <li dir="ltr"> <p dir="ltr">If you have any code that reproduce the problem, attach it to the report (zip file, source only, no dependencies on third-party software).</li> <li dir="ltr"> <p dir="ltr">Detailed steps are mandatory for us to understand and solve your problem. </li> <li dir="ltr"> <p dir="ltr">If you already have a solution you believe will work, include it in the bug report.</li> <li>Be prepared to monitor the report after submission since it is very common that we will need additional information.</li> </ul> <p> </p> <p> </p> <p align="left"><a href="http://homepages.borland.com/jedi/issuetracker" target="_blank">Login to report a bug</a> (preferred)</p> <p align="left"> <a href="http://homepages.borland.com/jedi/issuetracker/login_anon.php" target="_blank">Report a bug anonymously</a> (anonymous user)</p> <p> </p> </body> </html> --- NEW FILE: downloads.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Downloads</title> </head> <body> <h2>Downloads</h2> <p> </p> <p> The JEDI.NET library can be downloaded in several ways depending on whether you want to be on the "bleeding edge" or want to use a more stable version. </p> <p> </p> <h4>Official Releases</h4> <p> The official releases of JEDI.NET can be downloaded from the <a href="http://sourceforge.net/project/showfiles.php?group_id=111655" target="_blank">sourceforge project page</a>. </p> <p> </p> <h4>Daily zips</h4> <p> Every night a couple of zip files are created automatically containing a snapshot of the current CVS repository. Since these zip files are generated automatically, they might contain errors and the zip file might even be corrupted. To access the daily zips, go to <a href="http://jedidotnet.sf.net/daily">http://jedidotnet.sf.net/daily</a> to see a listing of available downloads. </p> <p> </p> <h4>CVS</h4> <p> To always have access to the most recent changes in JEDI.NET, you should install a CVS client (we recommend <a href="http://www.tortoisecvs.org">TortoiseCVS</a> and <a href="http://www.wincvs.org">WinCVS</a>) and download the CVS repository files to your computer. With the CVS client, you can update your local repository at any time. For more instructions on how to set up CVS and use it with JEDI.NET, see the <a target="main" href="cvs.htm">CVS instruction page</a>. You can also access the CVS repository via the web. Click <a href="http://cvs.sourceforge.net/viewcvs.py/jedidotnet/">this link</a> to go to the CVS root, click <a href="http://cvs.sourceforge.net/viewcvs.py/jedidotnet/main/">this link</a> to go to the root folder of current development. </p> <p> </p> <h4>Daily tarballs</h4> <p> A daily tarball of the entire CVS repository is available for backup or mirroring purposes at <a href="http://cvs.sourceforge.net/cvstarballs/jedidotnet-cvsroot.tar.gz">http://cvs.sourceforge.net/cvstarballs/jedidotnet-cvsroot.tar.gz</a>. </p> <p> </p> </body> </html> --- NEW FILE: content.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Contents</title> </head> <body> <h2>Home</h2> <p>The JEDI Visual Component Library (JVCL) consists of a large collection (currently ca 500) visual and non-visual components which can be instantly reused in your Delphi, Kylix and C++ Builder projects. </p> <p>The library is built upon code donated from the JEDI community. It is reformatted to achieve a common look-and-feel, tested, documented and merged into the library. The library is grouped into several categories such as Enhanced Standard, Visual, Non-Visual, Data Aware and many, many more. The library is released to the public under the terms of the Mozilla Public License (MPL) and as such can be freely used in both freeware, shareware, open source and commercial projects. </p> <p dir="ltr">Source code files included in the JVCL have a header which explicitly states the license (as is required). However, unless noted otherwise, all files, including those without an MPL header, are subject to the MPL license. </p> <p> </p> </body> </html> --- NEW FILE: news.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>News</title> <meta name="Generator" content="Alleycode HTML Editor"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> </head> <body> <h2>News</h2> <p> </p> <p><b>November 2004:</b></p> <ul> <li> Marcel Bestebroer donates the FCL class <b>StringUtils</b>, providing class static methods dealing with strings (tab expansion (with definable tabulation positions and default tab width), quoted string handling and retrieving string sections, and more). </li> <li> Marcel Bestebroer donates the FCL class <b>PathUtils</b>, providing class static methods dealing with strings representing paths (combining (including relative paths and traversal up the directory chain), normalizing and validation). </li> <li> <b><a href="http://nunit.sourceforge.net">NUnit</a></b> is going to be used to provide the testing framework of at least all non-visible classes. The two new classes above already have a corresponding <b>NUnit</b> assembly. </li> <li> <b><a href="http://ndoc.sourceforge.net">NDoc</a></b> has been adapted by Marcel Bestebroer so it will accept Delphi written assemblies. <b>NDoc</b> will be used to generate the help files (both Html Help 2 as well as an MSDN style on-line help system). The required XML files should be generatable by the compiler, but unfortunately Borland has chosen a different schema for the XML files they generate. Instead of adapting them, a tool was written to generate the XML skeletons based on the compiled assembly (no source code parsing required). </li> </ul> <p><b>September 2004:</b></p> <ul> <li> Due to incompatability issues between the Delphi and Visual Studio IDEs, the <b>Led</b> controls are going to be kept out of any release that may follow, until these issues have been figured out. </li> </ul> <p><b>July 2004:</b></p> <ul> <li> Andreas Hausladen donates the WinForms control <b>Shape</b>, which mimics the VCL's <b>TShape</b> control. </li> <li> Andreas Hausladen donates the FCL class <b>FileOfRecord</b>, which mimics Delphi's <b>file of <i><type></i></b> construct for the .NET world. The class, though named <b><i>File</i>OfRecord</b>, actually represents a <b><i>Stream</i>OfRecord</b>. </li> </ul> <p><b>June 2004:</b></p> <ul> <li> Project JEDI is proud to initiate a .NET project for Delphi. The initial goal is to obtain as much code as possible, whether it will be non-visual classes, WinForms controls and component or VCL.NET controls and components. All code will be contained within this single project, until such a time when a sub-division is separate sub projects is warranted. </p> </li> </ul> </body> </html> --- NEW FILE: framebottom.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="Generator" content="Alleycode HTML Editor"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Footer</title> <base target="contents"> </head> <body topmargin="0" leftmargin="0"> <hr> <div align="left"> <table border="0" cellpadding="0" cellspacing="0" align="left"> <tr> <td> <a href="http://www.opensource.org/"><img border="0" src="images/opensrc.gif" width="88" height="32" alt="http://www.opensource.org/"></a> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" align="right"> <tr> <td align="left" style="vertical-align: middle;"> <font size="1" color="#808080"><i>Copyright (c) 2004 by the JEDI.NET Team; all rights reserved.<br> Problems with this website should be reported to the <a href="mailto:jed...@us...">WebAdmin</a> </i> </font> </td> <td align="left" style="vertical-align: middle;"><b><font size="3">Hosted by:</font></b></td> <td> <a href="http://sourceforge.net" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=111655&type=0" border="0" alt="http://sourceforge.net"></a> </td> </tr> </table> </div> </body> </html> --- NEW FILE: help.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Help</title> </head> <body> <h2>Help</h2> <p> <br> Please find below online help resources for the JVCL.<br> </p> <p> </p> <ul> <li><a target="_blank" href="http://homepages.borland.com/jedi/jedihelp/">On-line help (Jedi Online Help)</a> </li> <li><a href="FAQ.htm">FAQ</a> </li> <li><a href="AdminHelp.htm">Administrator help </a> </li> <li><a href="DevHelp.htm">Developer help </a> </li> <li><a href="StyleGuide.htm">Style Guide</a> </li> <li><a href="GuideLines.htm">JVCL Guidelines</a> </li> <li><a href="JvInterpreter.htm">JvInterpreter</a></li> </ul> <p> </p> </body> </html> --- NEW FILE: links.htm --- <html> <head> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Links</title> <base target="_blank"> </head> <body> <h2>Links</h2> <p> </p> <p>The following list of links is not exhaustive but provides a good selection of Delphi and Borland related sites. If you would like to suggest a link or report a broken link, <a href="contact.htm">let us know</a>.</p> <p> </p> <p><b>JEDI Projects</b></p> <p><a href="http://delphi-jedi.org/">Project JEDI</a></p> <p><a href="http://sourceforge.net/projects/jcl/">JEDI Code Library</a></p> <p><a href="http://sourceforge.net/projects/jcl/">JEDI Visual Component Library</a></p> <p><a href="http://jexperts.sourceforge.net">JEDI Experts</a></p> <p><a href="http://sourceforge.net/projects/jedimath/">JEDI Math</a></p> <p><a href="http://sourceforge.net/projects/jedidbd/">JEDI Database Desktop</a></p> <p><a href="http://sourceforge.net/projects/jedicodeformat/">JEDI Code Format</a></p> <p><a href="http://sourceforge.net/projects/jedi-isoax/">JEDI IsoAxEE</a></p> <p><a href="http://sourceforge.net/projects/jedi-sdl/">JEDI SDL</a></p> <p><a href="http://sourceforge.net/projects/jediedit/">JEDI Editor</a></p> <p><a href="http://sourceforge.net/projects/jedi-jwars/">JEDI JWars</a></p> <p><a href="http://jedivcs.sourceforge.net">JEDI VCS</a></p> <p> </p> <p><b>Borland</b></p> <p><a href="http://www.borland.com">Borland</a></p> <p><a href="http://bdn.borland.com/">Borland Developer Network</a></p> <p><a href="http://qc.borland.com/">QualityCentral</a></p> <p><a href="http://codecentral.borland.com/">CodeCentral</a></p> <p><a href="http://www.borland.com/delphi/">Delphi</a> </p> <p><a href="http://www.borland.com/news/">News and events</a></p> <p><a href="http://www.borland.com/products/downloads/">Downloads</a></p> <p> </p> <p><b>Other sites</b></p> <p><a href="http://www.geocities.com/delphihelp/">Delphi Information and Utilities (Steve Trefethen)</a></p> <p><a href="http://www.delphipages.com">Delphi Pages</a></p> <p><a href="http://delphi.icm.edu.pl/">Delphi Super Page</a></p> <p> <a href="http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm">Delphi Unicode Controls</a></p> <p><a href="http://www.progdigy.com/headers/">GDIPlus for Delphi</a></p> <p><a href="http://www.euromind.com/iedelphi/index.htm">Internet Explorer and Delphi</a></p> <p><a href="http://buglist.jrsoftware.org/bugsall.htm">The Delphi Bug List</a></p> <p><a href="http://www.torry.net/index.htm">Torry's Delphi Pages</a></p> <p> </p> <p> </p> </body> </html> --- NEW FILE: licensing.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Licensing</title> </head> <body> <h2>Licensing</h2> <p> </p> <p> If you have any comments or questions about licensing, please <a href="Contact.htm">let us know</a>. <p> </p> <h4 dir="ltr">MPL License</h4> <p dir="ltr">The JEDI.NET library is licensed under the <a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public Licence ("MPL") version 1.1</a>. </p> <p dir="ltr"> </p> <p dir="ltr">Mozilla is the Open Source initiative formulated by Netscape for the next generation of their web browsers. Netscape states "We believe this license satisfies the Debian Free Software Guidelines which provide a commonly accepted definition of 'free software', much like other free software licenses such as GPL or BSD."<p> <p> JEDI.NET's implementation of the MPL allows developers to use its code in their applications ("Larger Work") regardless of whether the intended distribution will be in the public domain or as commercial applications, as long as the licence conditions are met. For a more detailed explanation, an annotated version of the MPL is available.<p> <p> <p> <p> </p> <h4>License FAQ</h4> <p><font face="Verdana" size="2">For additional information, please also check the <a href="http://www.mozilla.com/MPL/FAQ.html">official FAQ from Mozilla</a>.</font></p> <p> </p> <h5>Author perspective</h5> <p><b>Q: Do I retain copyright once I publish source under the MPL?</b><p> A: Absolutely. You still retain all your copyrights.<p> <p> <p> <b>Q: Can I release the code under a different (possibly commercial type) license?</b><p> A: Yes. Since you have the original copyright, you can do it, but you can do it only for your own code, and not for any contributions from others.<p> <p> <p> <b>Q: In two years Acme, Inc. comes with a great new license, which I would love to use. Am I always bound to MPL for my released code?</b><p> A: You can use a Dual License approach, i.e. you keep the code under MPL, and you add another license, e.g. GPL. The user will have then the option to use the one s/he prefers. Or, as the Initial Contributor, with the original copyright, you can release it under the other license. Please note: even if you release the code under new license, users of your original MPL-released code can continue to use under MPL as before.<p> <p> <p> <b>Q: I've contributed code to JEDI under MPL, but now I've changed my mind and don't want this code to be OpenSource.</b><p> A: Once you release code as OpenSource, you cannot take it back as long as the user conforms to the original license. Of course, as the Initial developer you can re-release it under different license, incl. a commercial one (see above) <p> <p> <p> <b>Q: I think, JEDI could benefit from having cryptographic functions. I would like to donate some (DES, Tripple DES etc.), which are covered by patent rights (RSA, for example)? How should I do it?</b><p> A: All contributions are "Subject to third party intellectual property (IP) claims." Thus, if you are aware of any patents infringements, before submitting make sure that you: <ul> <li>secure the rights to use the IP in your contribution (e.g. by paying a fee) </li> <li>modify the code so it doesn't infringe (in our case, provide other, non-patented cryptographic functions) </li> <li>in a worst case scenario, if the two above are not possible, do not submit the code </li> </ul> <p> Please note: different countries may have different patents laws. Therefore in some countries it could be legal to use patented IP (e.g. because the patent expired), while in others not. Check with your local Patent Office. <h5> User perspective</h5> <p> <b>Q: Can I use the MPL code in commercial software? If yes, am I obligated to credit the author?</b><p> A: Yes, you can use the MPL code in any commercial software. Since you have to include the MPL code, the credit is included in the license header. While not required, it is also customary to credit the author in "AboutBox".<p> <p> <p> <b>Q: Must I release the source code of used components?</b><p> A: Only of those covered by MPL, together with any modifications to them.<p> <p> <p> <b>Q: Must I publish my apps under MPL if I used MPL licensed code (the viral aspect) ?</b><p> A: No. That's the big advantage over GPL - you can use different code, mix MPL and commercial code, but you don't have to release either the application, nor the non-MPL code under MPL. Basically, what is MPL, will stay MPL, but it doesn't have any impact on the non-MPL code.<p> <p> <p> <b>Q: If a bug in MPL licensed code renders my clients machine unbootable, who can I hold responsible for that?</b><p> A: Nobody. You use MPL licensed code at your own risk. Since it is provided to you in a source code form, you can inspect it, test it, making sure that it does, what you want it to do.<p> <p> <p> <b>Q: Must I publish modifications to MPL licensed code?</b><p> A: Yes. This is one of the MPL requirements. You are getting a free source code, but you have to publish all modifications to the code, unless you have done the changes for your internal use.<p> <p> <p> <b>Q: Must I publish code based on MPL licensed code under MPL?</b><p> A: Yes. You cannot change the license terms. Only the Initial Developer can add an additional license (see dual license)<p> <p> <p> <b>Q: If I subclass the MPL code, do I still have to publish the new code? After all I didn't modify the code at all!</b><p> A: That's a tricky one. By the letter of the law, since you didn't touch the original code, you might claim that it is a "new" code, therefore no need for MPL. However, by the 'spirit of the law', Inheritance (or subclassing) is a modification of the functionality of a given class, and as such a "derived work", so even if you didn't touch the original code, you are still making changes.<p> <p> <p> <b>Q: I am proposing a modification to a JEDI-VCL component, which has a dual license (MPL and GPL). This new file also needs to include a new class. Should the source files for the new class be put in JEDI-VCL using MPL with GPL dual-license or can it be put in another location and use only the MPL?</b><p> A: The license of a file can't be changed without the consent of the copyright owner. And a new file derived from an existing file inherits the licensing from the existing file. In the case of this component, it has to stay MPL/GPL.<p> <p> <p> <b>Q: I am considering using an XML parser that has being covered by the MPL v1.1 (or alternatively the GPL) in a commercial product. I will simply use the DLL libraries without modification, including the necessary header files in my own code. When I distribute (sell) my own product I would, of course, need to distribute the DLL libraries as well. My questions are: </b> <blockquote> <p> <b>Q1: Am I correct in assuming that simply including unmodified header files and linking with a library covered by the MPL does not place any legal restrictions or obligations on my commercial product and its source code?</b><p> A1: It places no obligations on the code YOU wrote, but there are still obligations for the code you included. These include source distribution (for included MPL code, not YOUR code), and some notification requirements.<p> <p> <p> <b>Q2: Am I obligated to distribute the (unmodified) source code that produced the libraries with which I link?</b><p> A2: No, you don't have to "physically" distribute the source code, but you have to give credit to the authors and provide a link to location where the users can download the source code (see next question) <p> <p> <p> <b>Q3: Am I obligated to make my use of the particular libraries known to users of my product?</b><p> A3: Absouletly, it's spelled out in the license. You need to credit the source of copyrighted code that is not yours in both the product and its documentation. </blockquote> <p> <p> <p> <p> <b>Q: We are using JEDI.NET in our products. We did not modify the source codes in any way. Can some one please tell me if we need to add a Copyright statement in our product's license text and if so, which text is required? </b> <p> <p> A: This is normally done in "AboutBox" and the documentation. To make it simple, if you use JEDI.NET you can add statement like:<p> <ul> <li><i>"This program contains JEDI.NET source code that can be obtained from http://jedidotnet.sourceforge.net"</i> or</li> <li><i>"JEDI.NET portions are licensed from Project JEDI, and the source code can be obtained from http://jedidotnet.sourceforge.net" </i></li> </ul> <p> <p> <p> If you look at Microsoft Office programs, you can see bunch of similar legal statements in their "About Box".<p> <p> By including such statement in the AboutBox AND your documentation, you have fulfilled the requirement to:<p> <ul> <li>provide credit to the author </li> <li>provide the user with the location where they can download JEDI.NET source code </li> </ul> <p> <p> </font></p> </body> </html> --- NEW FILE: frametop.htm --- <html> <head> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="Generator" content="Alleycode HTML Editor"> <title>Menu</title> <base target="main"> </head> <body style="background-color: #EFEFEF" topmargin="0" leftmargin="0"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" align="left"> <tr> <td style="background-color: #EFEFEF" nowrap><h1>JEDI.NET Framework Library</h1></td> <td align="right" style="vertical-align: middle; background-color:#EFEFEF"> <a href="http://delphi-jedi.org"><img border="0" src="images/jedinow.gif" alt="http://delphi-jedi.org" width="116" height="31" /></a> </td> </tr> <tr> <!--- border-bottom:1 dotted #EDEDED;vertical-align:super ---> <td colspan="2" style="background-color: #EFEFEF;" nowrap> <span style="font-size: 80%"> <a href="news.htm">News</a> | <a href="team.htm">Team</a> | <a href="contributors.htm">Contributors</a> | <a href="downloads.htm">Downloads</a> | <a href="contact.htm">Contact</a> | <a href="reportbug.htm">Report Bugs</a> | <a href="contributing.htm">Contributing</a> | <a href="licensing.htm">Licensing</a> | <a href="links.htm">Links</a> | <a href="about.htm">About</a> </span> </td> </tr> </table> </body> </html> --- NEW FILE: faq.htm --- <html> <head> <title>Frequently Asked Questions</title> <link rel="stylesheet" type="text/css" href="styles/default.css"> <style> div a { text-decoration:underline; font-weight: normal;} a { text-decoration:none; font-weight: bold;} a:link {color: #336699;} a:hover {color: #336699;} a:visited { color: #336699;} </style> <script language="JavaScript" type="text/javascript"> <!-- var lastobj = null; var allvisible = false; function ToggleAll() { var i = 0 var obj; do { obj = document.getElementById('FAQ' + i); if (obj != null) { obj.style.display = allvisible ? 'none':'block'; i += 1; } } while(obj != null); allvisible = !allvisible; } function ToggleVisible(objId) { var obj = document.getElementById(objId); // NEW if (obj == null) return; if ((lastobj) && (lastobj != obj)) { lastobj.style.display = "none"; } obj.style.display = (obj.style.display == 'none') ? 'block': 'none'; lastobj = obj; } //--> </script> </head> <body> <h1>Frequently Asked Questions</h1> <a style="text-decoration:none;" href="javascript:void(1)" onClick="ToggleAll()"> <div style="font-family: Verdana; font-size:90%;text-decoration:none;font-weight:bold;" align=right>Expand/Collapse</div></a> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ0');">What is the JVCL?</a><br> <div id="FAQ0" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> The JVCL is a library of more than 500 visual and non-visual components for Delphi, C++Builder and Kylix. The components have been donated by developers from all around the world and can be used in commercial as well as shareware and freeware and open source projects without cost.<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ1');">Where can I get it?</a><br> <div id="FAQ1" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> You can always download the latest release of JVCL from the JVCL homepage at <a href="http://jvcl.sf.net">http://jvcl.sf.net</a>.<br><br>You can also get the JVCL from CVS or from the daily zips. See the download page on the <a href="http://jvcl.sf.net">JVCL website</a> for more information.<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ2');">How is the JVCL licensed?</a><br> <div id="FAQ2" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> The JVCL is licensed under the <a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public License</a> (MPL 1.1) license.<br><br>In short, the MPL allows you to use the JVCL components in commercial, shareware, freeware and open source projects as long as you give due credit to the JVCL in your application (including a notice in your About Box is a good idea). <br><br>If you extend, derive from or modify any unit in the JVCL, you are obliged to make the source of the modifications available to your customers. You are also encouraged to donate any modifications back to the JVCL community.<br><br>To learn more about the MPL, see the License FAQ on the <a href="http://jvcl.sf.net"> JVCL website</a>.<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ3');">How can I contribute?</a><br> <div id="FAQ3" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> There are several ways you can contribute to the development of JVCL. Among other things, you can write new or extend existing components, write help, fix bugs or write demos. <br><br>If you are a writer, you could write articles about the JVCL or about specific components in the JVCL. If you speak a foreign language (foreign to english speaking people, that is), you could help translate the JVCL to other languages.<br><br>For more information , see the JVCL webpage on contributing (<a href="http://jvcl.sf.net">http://jvcl.sf.net</a>).<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ4');">Required Package 'Inet' Not Found</a><br> <div id="FAQ4" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> <i>From Julien Ferraro:</i><br><br>It's probably because you didn't choose to install the Internet components. Just launch your Delphi setup and select "Internet components" (or whatever the name is) and you should be OK. <br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ5');">In D7, when I press F1, I am not getting JVCL help information</a><br> <div id="FAQ5" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> Go to Help/Customize, delete the JCL.cnt and JVCL.cnt references, add them again, and save the project.<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ6');">When I try to compile my apps, I get an error message "line is too long (>1023 chars)"</a><br> <div id="FAQ6" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> The files probably have UNIX carriage returns in them. <br><br>Use something like <a href="http://ccrma-www.stanford.edu/~craig/utility/flip/">http://ccrma-www.stanford.edu/~craig/utility/flip/</a> to correct it. <br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ7');">I'm getting an error ("Cannot load package JvNet. It contains zlib.pas which is also in package YYYY") when I try to install the JvNet package.</a><br> <div id="FAQ7" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> Open the JvNet run-time package and add the other run-time package ("YYYY") to it's requires node. Try to install again.<br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ8');">"The procedure entry point SHGetSpecialFolderPathA could not be located in XXX".</a><br> <div id="FAQ8" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> You probably have an older Internet Explorer installed. Install the latest IE release.<br><br>You might also want to try to update your ComCtl32.dll. <br><br>Since Microsoft keep moving their pages around, we cannot give you a reliable link. Instead, go to <a href="http://www.microsoft.com">Microsoft's website</a> and search for 50comupd.exe.<br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ9');">How do I dock a form at design-time with the JvDocking components?</a><br> <div id="FAQ9" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> You can't dock the forms at design-time. You will have to do it programmatically.<br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ10');">How do I change the docking style at runtime?</a><br> <div id="FAQ10" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> You can't change it at runtime, only at design-time. We are working on resolving this issue.<br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ11');">Cannot load JvMM. It contains VFW.pas which is also contained in GLSCENE.</a><br> <div id="FAQ11" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> Resolve it by either adding the GLSCENE package to the requires of JVMM <br>or add JvMM to the requires of GLSCENE. Rebuild the packages.<br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ12');">Unit zlib/zlibconst implicitly imported into JvCrypt</a><br> <div id="FAQ12" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> This message is nothing to worry about unless you have other packages also including zlib. In that case, you <br>might get an error saying something like: "Unable to load JvCrypt. It contains unit zlib which is also included in package XXXX". <br><br>The error message is not entirely correct but nevertheless you cannot install two packages that includes (explicitly or implicitly) the same units. <br>To resolve, you have to add the other package's dcp file to the requires node of JvCrypt and rebuild JvCrypt.<br><br>In some cases, this doesn't help either because the other package is using a non-standard zlib unit (JvCrypt requires the standard zlib/zlibconst.pas <br>available on the Delphi CD). To resolve this issue, you can copy the Borland zlib and zlibconst unis from the Delphi CD to your computer and rename them <br>(you will also need the obj files in the same folder). Open JvZLibMultiple.pas and change the uses clause to reflect the name of the renamed Borland zlib unit). <br><br>If all else fails, remove JvZLibMultiple.pas from the JvCrypt runtime package and the JvZLibMultiple registration and uses from jvcl\design\JvCryptReg.pas <br>and rebuild the packages (runtime as well as design-time).<br><br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ13');">Why doesn't JvDotNetFilenameEdit and JvDotNetDirectoryEdit have a palette icon?</a><br> <div id="FAQ13" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> If the package containing JvFilenameEdit and JvDirectoryEdit is installed after the JvDotNet package, the icons won't be shown on the palette.<br><br><b>Fix:</b><br><ul><br><li>In Delphi, go to Component - Install Packages<br><li>Select the Jv DotNet package in the list<br><li>Toggle the checkbox off and then on again<br><li>Close the dialog<br></ul><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ14');">After installing JVCL, my palette icons are corrupted.</a><br> <div id="FAQ14" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> This error can be caused by faulty video drivers or an old version of the common controls library. <br><br><b>Fix:</b><ul><br><li>Get the latest Internet Explorer release from Microsoft. It will update the ComCtrl library as well. <br><li>If that doesn't help, try to find updated video drivers for your graphics card.<br><li>If it still doesn't help, try lowering the video acceleration (you do this from Control Panel-Desktop-Settings-Advanced)<br></ul><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ15');">Will JVCL continue to support and develop RXLib?</a><br> <div id="FAQ15" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> Yes, we will continue to support and develop RXLib but within the constraints of JVCL. This means that RXLib components can be merged, replaced, archived and renamed at any time as we see fit (indeed, this has already happened to a few of the original RXLib components). <br><br>JVCL will try to preserve backward compatibility, taking into account the cost for JVCL (maintenance, stopping of future development, not being able to fix bugs etc). If we think it is better for the JVCL as a whole to make changes that break backward compatibility, we will do the changes.<br><br>This standpoint is not RXLib specific. We reserve the right to do the same with any library or component donated to JVCL.<br><br></div> <img src="images/q.gif" border=0 width="12" height="12"> <a href="javascript:void(1)" onClick="ToggleVisible('FAQ16');">C++ Builder: Why isn't anything updated when I use the '<<' or '>>' operator on a Set property (Font.Style, JvWizard.EnabledButtons...)</a> <br> <div id="FAQ16" style="color: #334499;display:none;margin-left:25px; margin-top: 5px; margin-bottom:10px;"> <img src="images/a.gif" border=0 width="12" height="12"> This is a BUG in C++ Builder related to the way the '<<' and '>>' operators work, as reported in Quality Central under bug #9359. For instance, if you want to add "fsBold" to the Font style, the following code is not reliable.<br> <br> <code> Font->Style << fsBold; </code><br> <br> Use that one instead:<br> <br> <code> Font->Style = TFontStyles(Font->Style) << fsBold; </code><br> <br> This is the only way you can be sure that the internal value will be set AND the property setter, if any, will be called. </div> </body> </html> --- NEW FILE: contact.htm --- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Contact</title> </head> <body> <h2>Contact</h2> <p> </p> <p>The JEDI.NET is built by the community, but more importantly, for the community. Therefore we would like to hear from you. If you have any problems, comments or suggestions we would appreciate it if you would drop us a note. There are several ways to get in contact with us.</p> <p> </p> <h4>Newsgroups</h4> <p>The newsgroups are the most active forums for discussing the JEDI.NET (and other JEDI related topics) and is also the place where the JEDI.NET developers hang out. The JEDI.NET specific group is called jedi.dotnet, but you are recommended to also subscribe to at least jedi.general and jedi.binaries.</p> <p> </p> <p><a href="news://forums.talkto.net">Newsgroup server</a></p> <p> <a href="news://forums.talkto.net/jedi.dotnet">jedi.dotnet</a></p> <p> <a href="news://forums.talkto.net/jedi.general">jedi.general</a></p> <p> <a href="news://forums.talkto.net/jedi.binaries">jedi.binaries</a></p> <p> </p> <h4>Web gateway</h4> <p>If you can't access the newsgroups directly (because of firewalls or company policy), there is also a <a href="http://delphi.newswhat.com/geoxml/forumlistgroups?area=JEDI"> web gateway to the newsgroups</a>.</p> <p> </p> <h4>Mailing lists</h4> <p>We also have a mailing list on SourceForge, but the activity will be very low:</p> <p><a href="http://lists.sourceforge.net/lists/listinfo/jedidotnet-discuss">JEDI.NET discuss</a></p> <p> </p> <h4>Bug tracker</h4> <p>The bug tracker can be used to provide feedback, suggest improvements or donate code as well as reporting bugs:</p> <p> </p> <p><a href="http://homepages.borland.com/jedi/issuetracker" target="_blank">Login to bug tracker</a> (preferred)</p> <p><a href="http://homepages.borland.com/jedi/issuetracker/login_anon.php" target="_blank">Anonymous access to bug tracker</a></p> <p> </p> <h4>Contacting individual developers</h4> <p>We do not encourage direct contact with team members unless you have specific reason to. Please use the above forums as much as possible.</p> <p> </p> <p>If you still think you need to contact a developer, you can find the e-mails of all JEDI.NET developer at the <a href="http://sourceforge.net/project/memberlist.php?group_id=45786">sourceforge members page</a>.</p> </body> </html> --- NEW FILE: contributors.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link rel="STYLESHEET" href="styles/default.css" type="text/css"> <title>Contributors</title> </head> <body> <h2>Contributors</h2> <p> </p> <p> Following is a list of all people that donated, or gave permission to use, their code in the JEDI.NET library, who spent their time reporting and working to resolve significant bugs, who donated their writing skills and many other things. This page is an attempt to acknowledge those people and show them our appreciation. </p> <p> </p> <h4><b>Code/component donors</b></h4> <p> Marcel Bestebroer, Andreas hausladen </p> <p> </p> <h4><b>Other contributions and help</b></h4> <p> Robert Love, Alan C. Moore, Matthias Thoma </p> <p> </p> <h4>Special thanks</h4> <p> Special thanks to the following people for their dedicated help in various situations and for opportunity to use their tools: </p> <p> </p> <ul> <li>Rene Tschaggelar (<a href="http://www.talkto.net/" target="_blank">JEDI Newsgroups</a>)</li> <li>Marco Cantú (<a href="http://www.marcocantu.com/" target="_blank">Web gateway for JEDI newsgroups</a>)</li> </ul> <p> </p> <p> If your name is missing from the list and you think you should be included, <a href="contact.htm">let us know</a>.<br> </p> <p> </p> <p> </p> </body> </html> --- NEW FILE: about.htm --- <html> <head> <meta http-equiv="Content-Type" con... [truncated message content] |
From: Marcel B. <jed...@us...> - 2004-11-28 14:48:57
|
Update of /cvsroot/jedidotnet/web/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11712/styles Log Message: Directory /cvsroot/jedidotnet/web/styles added to the repository |
From: Marcel B. <jed...@us...> - 2004-11-28 14:48:56
|
Update of /cvsroot/jedidotnet/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11712/images Log Message: Directory /cvsroot/jedidotnet/web/images added to the repository |