[Fat-develop] FAT/src/FAT.Core ITestFileScanner.cs,1.1,1.2 TestFileScanner.cs,1.1,1.2
Brought to you by:
exortech
|
From: <exo...@us...> - 2004-01-20 06:01:26
|
Update of /cvsroot/fat/FAT/src/FAT.Core
In directory sc8-pr-cvs1:/tmp/cvs-serv9446/src/FAT.Core
Modified Files:
ITestFileScanner.cs TestFileScanner.cs
Log Message:
parser is now configurable. configuration is used as factory for parser
Index: ITestFileScanner.cs
===================================================================
RCS file: /cvsroot/fat/FAT/src/FAT.Core/ITestFileScanner.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ITestFileScanner.cs 14 Dec 2003 21:30:28 -0000 1.1
--- ITestFileScanner.cs 20 Jan 2004 06:01:19 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
{
ITestFile[] Scan();
+ ITestFile[] Scan(string[] args);
}
}
Index: TestFileScanner.cs
===================================================================
RCS file: /cvsroot/fat/FAT/src/FAT.Core/TestFileScanner.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestFileScanner.cs 14 Dec 2003 21:30:28 -0000 1.1
--- TestFileScanner.cs 20 Jan 2004 06:01:20 -0000 1.2
***************
*** 10,14 ****
public const string TESTFILE_EXTENSION = ".fat";
private string[] inputPaths;
- private ArrayList testFiles;
public TestFileScanner(string[] paths)
--- 10,13 ----
***************
*** 19,38 ****
public ITestFile[] Scan()
{
! string[] paths = (inputPaths.Length == 0) ? new string[] { Directory.GetCurrentDirectory() } : inputPaths;
! testFiles = new ArrayList();
! Scan(paths);
return (ITestFile[])testFiles.ToArray(typeof(ITestFile));
}
! private void Scan(string[] paths)
{
foreach (string path in paths)
{
! Scan(path);
}
}
! private void Scan(string path)
{
if (File.Exists(path))
--- 18,45 ----
public ITestFile[] Scan()
{
! return Scan(inputPaths);
! }
! public ITestFile[] Scan(string[] paths)
! {
! if (paths.Length == 0)
! {
! paths = new string[] { Directory.GetCurrentDirectory() };
! }
!
! ArrayList testFiles = new ArrayList();
! Scan(paths, testFiles);
return (ITestFile[])testFiles.ToArray(typeof(ITestFile));
}
! private void Scan(string[] paths, IList testFiles)
{
foreach (string path in paths)
{
! Scan(path, testFiles);
}
}
! private void Scan(string path, IList testFiles)
{
if (File.Exists(path))
***************
*** 45,49 ****
else if (Directory.Exists(path))
{
! Scan(Directory.GetFileSystemEntries(path));
}
else
--- 52,56 ----
else if (Directory.Exists(path))
{
! Scan(Directory.GetFileSystemEntries(path), testFiles);
}
else
|