[JEDI.NET-commits] nunit/source Jedi.IO.Paths.Nunit.pas,1.1,1.2
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2005-03-28 18:14:36
|
Update of /cvsroot/jedidotnet/nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13675/nunit/source Modified Files: Jedi.IO.Paths.Nunit.pas Log Message: * Added: test cases for Jedi.IO.Path.CommonBase * Added: test cases for Jedi.IO.Path.MakeRelativeFrom Index: Jedi.IO.Paths.Nunit.pas =================================================================== RCS file: /cvsroot/jedidotnet/nunit/source/Jedi.IO.Paths.Nunit.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.IO.Paths.Nunit.pas 6 Dec 2004 11:44:09 -0000 1.1 --- Jedi.IO.Paths.Nunit.pas 28 Mar 2005 18:14:27 -0000 1.2 *************** *** 50,53 **** --- 50,56 ---- [Test] procedure CombineTwo; [Test] procedure CombineTwoAbsolutePaths; + [Test] procedure CommonBaseOfFour; + [Test] procedure CommonBaseOfTwo; + [Test] procedure MakeRelativeFrom; end; *************** *** 242,245 **** --- 245,276 ---- 'Combine(sRelativePath, sDeepRootedPath)'); end; + + procedure Manipulations.CommonBaseOfFour; + begin + Assert.AreEqual(PathTestCases.sCommonPathOfAll4, Path.CommonBase([PathTestCases.sCommonPath1, + PathTestCases.sCommonPath2, PathTestCases.sCommonPath3, PathTestCases.sCommonPath4])); + end; + + procedure Manipulations.CommonBaseOfTwo; + begin + Assert.AreEqual(PathTestCases.sCommonPathOf1And2, Path.CommonBase(PathTestCases.sCommonPath1, + PathTestCases.sCommonPath2), 'Paths 1 and 2'); + Assert.AreEqual(PathTestCases.sCommonPathOf1And3, Path.CommonBase(PathTestCases.sCommonPath1, + PathTestCases.sCommonPath3), 'Paths 1 and 3'); + Assert.AreEqual(PathTestCases.sCommonPathOf1And4, Path.CommonBase(PathTestCases.sCommonPath1, + PathTestCases.sCommonPath4), 'Paths 1 and 4'); + end; + + procedure Manipulations.MakeRelativeFrom; + begin + Assert.AreEqual(PathTestCases.sRelativePath1, Path.MakeRelativeFrom(PathTestCases.sCommonPath1, + PathTestCases.sRelativeBasePath), 'Path 1'); + Assert.AreEqual(PathTestCases.sRelativePath2, Path.MakeRelativeFrom(PathTestCases.sCommonPath2, + PathTestCases.sRelativeBasePath), 'Path 2'); + Assert.AreEqual(PathTestCases.sRelativePath3, Path.MakeRelativeFrom(PathTestCases.sCommonPath3, + PathTestCases.sRelativeBasePath), 'Path 3'); + Assert.AreEqual(PathTestCases.sRelativePath4, Path.MakeRelativeFrom(PathTestCases.sCommonPath4, + PathTestCases.sRelativeBasePath), 'Path 4'); + end; {$ENDREGION} |