You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(111) |
Jul
(258) |
Aug
(21) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cry...@us...> - 2002-06-27 07:59:37
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv13426 Modified Files: build.xml Log Message: jar file is generated from aspect class path Index: build.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 27 Jun 2002 06:57:50 -0000 1.13 --- build.xml 27 Jun 2002 07:59:33 -0000 1.14 *************** *** 115,119 **** <target name="jar"> <jar jarfile="${jar.dir}/CDChamber.jar"> ! <fileset dir="${build.dest}"/> </jar> </target> --- 115,119 ---- <target name="jar"> <jar jarfile="${jar.dir}/CDChamber.jar"> ! <fileset dir="${aspect.classes}"/> </jar> </target> |
From: <sim...@us...> - 2002-06-27 07:48:50
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools In directory usw-pr-cvs1:/tmp/cvs-serv10986/src/org/cdchamber/util/testtools Modified Files: FileComparator.java Log Message: FileComparator can display more detail on different lines. Index: FileComparator.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools/FileComparator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileComparator.java 27 Jun 2002 06:57:50 -0000 1.2 --- FileComparator.java 27 Jun 2002 07:48:47 -0000 1.3 *************** *** 28,32 **** line2 = reader2.readLine(); ! if ( !same( line1, line2)) throw new FileComparatorException( "Diff at line:"+reader1.getLineNumber()); } while ( (line1 != null) && (line2 !=null)); return; --- 28,39 ---- line2 = reader2.readLine(); ! if ( same( line1, line2)) continue; ! StringBuffer sb = new StringBuffer(); ! sb.append( "Diff at line:"+reader1.getLineNumber()); ! sb.append( "\n<<<<<<<\n"); ! sb.append( line1); ! sb.append( "\n>>>>>>>\n"); ! sb.append( line2); ! throw new FileComparatorException( sb.toString()); } while ( (line1 != null) && (line2 !=null)); return; |
From: <sim...@us...> - 2002-06-27 07:08:15
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber In directory usw-pr-cvs1:/tmp/cvs-serv1461 Added Files: Main.java Log Message: The IDEA's refactor bug, move refactor remove the file, but forget to add the new one. --- NEW FILE: Main.java --- /* * User: Simon * Date: 2002-6-27 * Time: 13:22:44 * $Id: Main.java,v 1.1 2002/06/27 07:08:13 simon_lei Exp $ */ package org.cdchamber; import org.cdchamber.elements.DirectoryType; import org.cdchamber.parser.FileParseException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { public static void main( String []args) throws IOException, MarshalException, ValidationException, FileParseException { if ( args.length != 4) reportUsage(); if ( !args[0].equalsIgnoreCase( "-i")) reportUsage(); if ( !args[2].equalsIgnoreCase( "-o")) reportUsage(); File inDir = new File( args[1]); File outFile = new File( args[3]); if ( !inDir.isDirectory()) reportUsage(); DirectoryType dirType = new DirectoryType(); dirType.parse( inDir.getAbsolutePath()); dirType.marshal( new FileWriter( outFile)); } private static void reportUsage() { System.out.println( "Usage: java org.cdchamber.Main -i inputdir -o outputfilename"); System.out.println( "And make sure the inputdir can read, the outputfilename can write"); System.exit( 1); } } |
From: <sim...@us...> - 2002-06-27 06:57:54
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools In directory usw-pr-cvs1:/tmp/cvs-serv31332/src/org/cdchamber/util/testtools Modified Files: FileComparator.java Log Message: Add acceptance test, and refactor the build.xml Index: FileComparator.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools/FileComparator.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** FileComparator.java 22 Jun 2002 06:41:10 -0000 1.1.1.1 --- FileComparator.java 27 Jun 2002 06:57:50 -0000 1.2 *************** *** 16,21 **** public static void diff( File file1, File file2) throws FileComparatorException, IOException { ! LineNumberReader reader1 = new LineNumberReader( new FileReader( file1)); ! LineNumberReader reader2 = new LineNumberReader( new FileReader( file2)); String line1, line2; --- 16,25 ---- public static void diff( File file1, File file2) throws FileComparatorException, IOException { ! diff( new FileReader( file1), new FileReader( file2)); ! } ! ! public static void diff( Reader in1, Reader in2) throws FileComparatorException, IOException { ! LineNumberReader reader1 = new LineNumberReader( in1); ! LineNumberReader reader2 = new LineNumberReader( in2); String line1, line2; |
From: <sim...@us...> - 2002-06-27 06:57:54
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv31332 Modified Files: build.xml Log Message: Add acceptance test, and refactor the build.xml Index: build.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** build.xml 26 Jun 2002 00:57:27 -0000 1.12 --- build.xml 27 Jun 2002 06:57:50 -0000 1.13 *************** *** 24,31 **** --- 24,36 ---- <path id="classpath"> + <pathelement path="${basedir}/lib" /> + <pathelement path="${aspect.classes}" /> + <pathelement path="${test.classes}" /> + <pathelement path="${build.dest}" /> <fileset dir="${basedir}/lib"> <include name="**/*.jar"/> <include name="**/*.zip"/> </fileset> + <pathelement path="${java.class.path}" /> </path> *************** *** 42,45 **** --- 47,51 ---- <srcfiles dir= "${src.dir}" includes="**/*.xsd"/> </uptodate> + <available property="result.xml.exist" file="${build.dir}/result.xml"/> </target> *************** *** 54,63 **** <classpath> <path refid="classpath" /> - <pathelement path="${java.class.path}" /> - <pathelement path="${basedir}/lib" /> </classpath> </java> </target> <target name="compilewithajc" depends="src_gen"> <ajc destdir="${aspect.classes}" argfiles="${aspect.dir}/file.lst"> --- 60,68 ---- <classpath> <path refid="classpath" /> </classpath> </java> </target> + <target name="compilewithajc" depends="src_gen"> <ajc destdir="${aspect.classes}" argfiles="${aspect.dir}/file.lst"> *************** *** 68,73 **** <classpath> <path refid="classpath" /> - <pathelement path="${build.dest}" /> - <pathelement path="${java.class.path}" /> </classpath> </ajc> --- 73,76 ---- *************** *** 79,90 **** </target> ! <target name="test.compile" depends="compile"> <javac srcdir="${test.src}" destdir="${test.classes}"> <classpath> - <pathelement path="${aspect.classes}"/> <path refid="classpath" /> - <pathelement path="${build.dest}" /> - <pathelement path="${java.class.path}" /> </classpath> <include name="**/*.java"/> --- 82,98 ---- </target> + <target name="result_gen" depends="compilewithajc" description="Generate the test result, if it isn't exist" unless="result.xml.exist"> + <java classname="org.cdchamber.Main" fork="true" dir="${basedir}"> + <arg line="-i test/testcase -o build/result.xml"/> + <classpath> + <path refid="classpath" /> + </classpath> + </java> + </target> ! <target name="test.compile" depends="result_gen"> <javac srcdir="${test.src}" destdir="${test.classes}"> <classpath> <path refid="classpath" /> </classpath> <include name="**/*.java"/> *************** *** 95,103 **** <junit fork="yes" haltonfailure="yes" dir="."> <classpath> - <pathelement path="${aspect.classes}"/> <path refid="classpath" /> - <pathelement path="${test.classes}" /> - <pathelement path="${build.dest}" /> - <pathelement path="${java.class.path}" /> </classpath> <formatter type="plain" usefile="false"/> --- 103,107 ---- *************** *** 133,139 **** <classpath> <path refid="classpath" /> - <pathelement path="${build.dest}" /> - <pathelement path="${script.dir}" /> - <pathelement path="${java.class.path}" /> </classpath> </java> --- 137,140 ---- |
From: <sim...@us...> - 2002-06-27 06:57:54
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util In directory usw-pr-cvs1:/tmp/cvs-serv31332/src/org/cdchamber/util Modified Files: DirPath.java Log Message: Add acceptance test, and refactor the build.xml Index: DirPath.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/DirPath.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DirPath.java 26 Jun 2002 06:16:46 -0000 1.2 --- DirPath.java 27 Jun 2002 06:57:50 -0000 1.3 *************** *** 11,13 **** --- 11,14 ---- public static final String SEP = System.getProperty("file.separator"); public static final String TestCaseDir = BaseDir + SEP + "test" + SEP + "testcase"; + public static final String BuildDir = BaseDir + SEP + "build"; } |
From: <sim...@us...> - 2002-06-27 06:57:54
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber In directory usw-pr-cvs1:/tmp/cvs-serv31332/test/src/org/cdchamber Added Files: MainTest.java Removed Files: Main.java Log Message: Add acceptance test, and refactor the build.xml --- NEW FILE: MainTest.java --- /* * User: Simon * Date: 2002-6-27 * Time: 14:26:32 * $Id: MainTest.java,v 1.1 2002/06/27 06:57:50 simon_lei Exp $ */ package org.cdchamber; import junit.framework.TestCase; import org.cdchamber.util.DirPath; import org.cdchamber.util.testtools.FileComparator; import org.cdchamber.elements.DirectoryType; import java.io.StringWriter; import java.io.StringReader; import java.io.FileReader; public class MainTest extends TestCase { public MainTest(String s) { super(s); } protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testAcceptance() throws Exception { DirectoryType dirType = new DirectoryType(); dirType.parse( DirPath.TestCaseDir); StringWriter stringWriter = new StringWriter(); dirType.marshal( stringWriter); StringReader stringReader = new StringReader( stringWriter.getBuffer().toString()); FileReader fileReader = new FileReader( DirPath.BuildDir + DirPath.SEP + "result.xml"); FileComparator.diff( stringReader, fileReader); } } --- Main.java DELETED --- |
From: <sim...@us...> - 2002-06-27 05:42:24
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber In directory usw-pr-cvs1:/tmp/cvs-serv15747/test/src/org/cdchamber Added Files: Main.java Log Message: Add the main class, to complish the acceptance test. --- NEW FILE: Main.java --- /* * User: Simon * Date: 2002-6-27 * Time: 13:22:44 * $Id: Main.java,v 1.1 2002/06/27 05:42:21 simon_lei Exp $ */ package org.cdchamber; import org.cdchamber.elements.DirectoryType; import org.cdchamber.parser.FileParseException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { public static void main( String []args) throws IOException, MarshalException, ValidationException, FileParseException { if ( args.length != 4) reportUsage(); if ( !args[0].equalsIgnoreCase( "-i")) reportUsage(); if ( !args[2].equalsIgnoreCase( "-o")) reportUsage(); File inDir = new File( args[1]); File outFile = new File( args[3]); if ( !inDir.isDirectory()) reportUsage(); if ( !outFile.canWrite()) reportUsage(); DirectoryType dirType = new DirectoryType(); dirType.parse( inDir.getAbsolutePath()); dirType.marshal( new FileWriter( outFile)); } private static void reportUsage() { System.out.println( "Usage: java org.cdchamber.Main -i inputdir -o outputfilename"); System.out.println( "And make sure the inputdir can read, the outputfilename can write"); System.exit( 1); } } |
From: <sim...@us...> - 2002-06-27 05:03:41
|
Update of /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv9061/aspect/src/org/cdchamber/elements Modified Files: DirectoryTypeWrapper.java Log Message: Add the FileTypeFactory to create different type. And more testcase too. Index: DirectoryTypeWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements/DirectoryTypeWrapper.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DirectoryTypeWrapper.java 27 Jun 2002 03:15:28 -0000 1.5 --- DirectoryTypeWrapper.java 27 Jun 2002 05:03:37 -0000 1.6 *************** *** 19,24 **** int sumSize = 0; for ( int i=0; i<files.length; i++) { - FileType fileType = new FileType(); if ( files[i].getName().equals( "CVS")) continue; fileType.parse( files[i].getAbsolutePath()); this.addFiles( fileType); --- 19,24 ---- int sumSize = 0; for ( int i=0; i<files.length; i++) { if ( files[i].getName().equals( "CVS")) continue; + FileType fileType = FileTypeFactory.createFileType( files[i]); fileType.parse( files[i].getAbsolutePath()); this.addFiles( fileType); |
From: <sim...@us...> - 2002-06-27 05:03:41
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv9061/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: Add the FileTypeFactory to create different type. And more testcase too. Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DirectoryTypeTest.java 27 Jun 2002 04:00:31 -0000 1.9 --- DirectoryTypeTest.java 27 Jun 2002 05:03:37 -0000 1.10 *************** *** 59,62 **** --- 59,73 ---- } + public void testNestDir() throws Exception { + DirectoryType dirType = new DirectoryType(); + String dirName = DirPath.TestCaseDir + DirPath.SEP + "testtools"; + + dirType.parse( dirName); + + assertEquals( "Name should be testtools", dirType.getName(), "testtools"); + assertEquals( 9525, dirType.getSize()); // the size + assertEquals( getFileDate(dirName), dirType.getDate()); + } + private long getFileDate(String dirName) { File dir = new File( dirName); |
From: <sim...@us...> - 2002-06-27 05:03:41
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv9061/src/org/cdchamber/elements Added Files: FileTypeFactory.java Log Message: Add the FileTypeFactory to create different type. And more testcase too. --- NEW FILE: FileTypeFactory.java --- /* * User: Simon * Date: 2002-6-27 * Time: 12:51:55 * $Id: FileTypeFactory.java,v 1.1 2002/06/27 05:03:37 simon_lei Exp $ */ package org.cdchamber.elements; import java.io.File; public class FileTypeFactory { public static FileType createFileType( File file) { if ( file.isDirectory()) return new DirectoryType(); return new FileType(); } } |
From: <sim...@us...> - 2002-06-27 04:00:34
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv30279/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: Convert text file from dos format to unix format, so that all tests will pass on different system. Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DirectoryTypeTest.java 27 Jun 2002 03:30:33 -0000 1.8 --- DirectoryTypeTest.java 27 Jun 2002 04:00:31 -0000 1.9 *************** *** 55,59 **** assertEquals( "Name should be difffiles", dirType.getName(), "difffiles"); ! assertEquals( 4821, dirType.getSize()); // the size assertEquals( getFileDate(dirName), dirType.getDate()); } --- 55,59 ---- assertEquals( "Name should be difffiles", dirType.getName(), "difffiles"); ! assertEquals( 4763, dirType.getSize()); // the size assertEquals( getFileDate(dirName), dirType.getDate()); } |
From: <sim...@us...> - 2002-06-27 03:30:35
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv24280 Modified Files: DirectoryTypeTest.java Log Message: Don't need to create new empty directory now. Because we ignore the CVS directory. :) Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DirectoryTypeTest.java 27 Jun 2002 03:15:28 -0000 1.7 --- DirectoryTypeTest.java 27 Jun 2002 03:30:33 -0000 1.8 *************** *** 39,55 **** public void testEmptyDir() throws Exception { DirectoryType dirType = new DirectoryType( ); ! String tmpDirName = DirPath.TestCaseDir + DirPath.SEP + "tmpnulldir"; ! File tmpDir = new File( tmpDirName); ! ! if ( !tmpDir.mkdirs()) fail( "Can't create null directory, can't continue this test."); ! long createDate = tmpDir.lastModified(); ! dirType.parse( tmpDirName); ! assertEquals( "Name should be tmpnulldir", dirType.getName(), "tmpnulldir"); ! assertEquals( 0, dirType.getSize()); // dir size should be 0, because it contains 0 files in it. ! // how to test date? ! assertEquals( createDate, dirType.getDate()); // the date should be same as the create date. ! tmpDir.delete(); } --- 39,49 ---- public void testEmptyDir() throws Exception { DirectoryType dirType = new DirectoryType( ); ! String emptyDirName = DirPath.TestCaseDir + DirPath.SEP + "nulldir"; ! dirType.parse( emptyDirName); ! assertEquals( "Name should be nulldir", dirType.getName(), "nulldir"); ! assertEquals( 0, dirType.getSize()); // dir size should be 0 ! assertEquals( getFileDate( emptyDirName), dirType.getDate()); // the date should be same as the create date. } *************** *** 57,62 **** DirectoryType dirType = new DirectoryType(); String dirName = DirPath.TestCaseDir + DirPath.SEP + "testtools"+DirPath.SEP+"difffiles"; - File dir = new File( dirName); - long curDate = dir.lastModified(); dirType.parse( dirName); --- 51,54 ---- *************** *** 64,68 **** assertEquals( "Name should be difffiles", dirType.getName(), "difffiles"); assertEquals( 4821, dirType.getSize()); // the size ! assertEquals( curDate, dirType.getDate()); } } --- 56,66 ---- assertEquals( "Name should be difffiles", dirType.getName(), "difffiles"); assertEquals( 4821, dirType.getSize()); // the size ! assertEquals( getFileDate(dirName), dirType.getDate()); ! } ! ! private long getFileDate(String dirName) { ! File dir = new File( dirName); ! long curDate = dir.lastModified(); ! return curDate; } } |
From: <sim...@us...> - 2002-06-27 03:15:31
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv20731 Modified Files: TODO.txt Log Message: Ignore CVS directory in hard code. It should be refactored in the future. Index: TODO.txt =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/TODO.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TODO.txt 26 Jun 2002 10:30:04 -0000 1.7 --- TODO.txt 27 Jun 2002 03:15:28 -0000 1.8 *************** *** 5,10 **** x : Let the java files can be generated from xsd files automatically. x : Auto update the castor.jar's castorbuilder.properties. + : write DirectoryType testcases + : write FileType testcases + : Code Standard should be wrote. ! + : Find a way to test empty directory, file date and different directory size on different os. --- 5,11 ---- x : Let the java files can be generated from xsd files automatically. x : Auto update the castor.jar's castorbuilder.properties. + x : Find a way to test empty directory, file date and different directory size on different os. + : write DirectoryType testcases + : write FileType testcases + : Code Standard should be wrote. ! + : Add filter to ignore files/dirs like CVS, *.bak, *~, etc. \ No newline at end of file |
From: <sim...@us...> - 2002-06-27 03:15:31
|
Update of /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv20731/aspect/src/org/cdchamber/elements Modified Files: DirectoryTypeWrapper.java Log Message: Ignore CVS directory in hard code. It should be refactored in the future. Index: DirectoryTypeWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements/DirectoryTypeWrapper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DirectoryTypeWrapper.java 27 Jun 2002 02:40:46 -0000 1.4 --- DirectoryTypeWrapper.java 27 Jun 2002 03:15:28 -0000 1.5 *************** *** 20,27 **** for ( int i=0; i<files.length; i++) { FileType fileType = new FileType(); fileType.parse( files[i].getAbsolutePath()); this.addFiles( fileType); sumSize += fileType.getSize(); - System.out.println( "Sum:"+sumSize); } this.setSize( sumSize); --- 20,27 ---- for ( int i=0; i<files.length; i++) { FileType fileType = new FileType(); + if ( files[i].getName().equals( "CVS")) continue; fileType.parse( files[i].getAbsolutePath()); this.addFiles( fileType); sumSize += fileType.getSize(); } this.setSize( sumSize); |
From: <sim...@us...> - 2002-06-27 03:15:31
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv20731/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: Ignore CVS directory in hard code. It should be refactored in the future. Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DirectoryTypeTest.java 27 Jun 2002 02:40:46 -0000 1.6 --- DirectoryTypeTest.java 27 Jun 2002 03:15:28 -0000 1.7 *************** *** 56,60 **** public void testFilesOnlyDir() throws Exception { DirectoryType dirType = new DirectoryType(); ! String dirName = DirPath.TestCaseDir + DirPath.SEP + "nulldir"+DirPath.SEP+"CVS"; File dir = new File( dirName); long curDate = dir.lastModified(); --- 56,60 ---- public void testFilesOnlyDir() throws Exception { DirectoryType dirType = new DirectoryType(); ! String dirName = DirPath.TestCaseDir + DirPath.SEP + "testtools"+DirPath.SEP+"difffiles"; File dir = new File( dirName); long curDate = dir.lastModified(); *************** *** 62,67 **** dirType.parse( dirName); ! assertEquals( "Name should be CVS", dirType.getName(), "CVS"); ! assertEquals( 101, dirType.getSize()); // the size assertEquals( curDate, dirType.getDate()); } --- 62,67 ---- dirType.parse( dirName); ! assertEquals( "Name should be difffiles", dirType.getName(), "difffiles"); ! assertEquals( 4821, dirType.getSize()); // the size assertEquals( curDate, dirType.getDate()); } |
From: <sim...@us...> - 2002-06-27 03:15:31
|
Update of /cvsroot/cdchamber/CDChamber/docs In directory usw-pr-cvs1:/tmp/cvs-serv20731/docs Modified Files: storycard.txt Log Message: Ignore CVS directory in hard code. It should be refactored in the future. Index: storycard.txt =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/docs/storycard.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** storycard.txt 25 Jun 2002 10:00:33 -0000 1.2 --- storycard.txt 27 Jun 2002 03:15:28 -0000 1.3 *************** *** 4,8 **** Äܹ»¶Áȡij¸öĿ¼ÀïµÄÄÚÈÝ£¨°üÀ¨Ä¿Â¼½á¹¹£¬ÎļþÃû£¬Ê±¼ä£¬´óС£©£¬²¢ÇÒ½«ÎļþÁÐ±í±£´æÎªÒ»¸ö¼Ç¼Îļþ¡£ ! 2: --- 4,8 ---- Äܹ»¶Áȡij¸öĿ¼ÀïµÄÄÚÈÝ£¨°üÀ¨Ä¿Â¼½á¹¹£¬ÎļþÃû£¬Ê±¼ä£¬´óС£©£¬²¢ÇÒ½«ÎļþÁÐ±í±£´æÎªÒ»¸ö¼Ç¼Îļþ¡£ ! 2: *************** *** 12,27 **** Äܹ»½«ÆäËûÓû§Éú³ÉµÄ¼Ç¼ÎļþÌí¼Óµ½×Ô¼ºµÄcdÊý¾Ý¿âµ±ÖС£ ! 3: ! Óû§¿ÉÒÔÔö¼ÓºÍÐÞ¸ÄÎļþ¼Ç¼ÖеÄÃèÊöÐÅÏ¢¡£ÕâЩÃèÊöÐÅÏ¢ºÍĿ¼½á¹¹Ò»Í¬±£´æ¡£ ! 4: Óû§¿ÉÒÔʹÓöàÖÖ²éѯÌõ¼þ¼°Í¨Åä·ûÀ´²éÕÒÎļþ¡£ ²éѯÌõ¼þ°üÀ¨Ê±¼ä£¬Îļþ´óС£¬ÎļþÃû¡£ ! 5: ! Äܹ»Ö§³Ö¶àÖÖѹËõÎļþ¸ñʽ£¬½«Ñ¹ËõÎļþµ±×÷Ò»¸öĿ¼À´´¦Àí¡£ ! --- 12,31 ---- Äܹ»½«ÆäËûÓû§Éú³ÉµÄ¼Ç¼ÎļþÌí¼Óµ½×Ô¼ºµÄcdÊý¾Ý¿âµ±ÖС£ ! 3: ! Óû§¿ÉÒÔÔö¼ÓºÍÐÞ¸ÄÎļþ¼Ç¼ÖеÄÃèÊöÐÅÏ¢¡£ÕâЩÃèÊöÐÅÏ¢ºÍĿ¼½á¹¹Ò»Í¬±£´æ¡£ ! 4: Óû§¿ÉÒÔʹÓöàÖÖ²éѯÌõ¼þ¼°Í¨Åä·ûÀ´²éÕÒÎļþ¡£ ²éѯÌõ¼þ°üÀ¨Ê±¼ä£¬Îļþ´óС£¬ÎļþÃû¡£ ! 5: ! Äܹ»Ö§³Ö¶àÖÖѹËõÎļþ¸ñʽ£¬½«Ñ¹ËõÎļþµ±×÷Ò»¸öĿ¼À´´¦Àí¡£ ! ! 6. ! ! Äܹ»ºöÂÔһЩ³£¼ûµÄÎļþÃû/Ŀ¼Ãû£¬ÀýÈçCVS£¬*.bak£¬*~£¬etc ! ÕâЩÐÅÏ¢¶ÔÓû§²¢Ã»ÓÐÓô¦¡£ \ No newline at end of file |
From: <sim...@us...> - 2002-06-27 02:50:38
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv16053/elements Log Message: Directory /cvsroot/cdchamber/CDChamber/src/org/cdchamber/elements added to the repository |
From: <sim...@us...> - 2002-06-27 02:40:50
|
Update of /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv14122/aspect/src/org/cdchamber/elements Modified Files: DirectoryTypeWrapper.java Log Message: Add more to directorytype testcase. The dir's size is the sum size of all files in it. Index: DirectoryTypeWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/src/org/cdchamber/elements/DirectoryTypeWrapper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DirectoryTypeWrapper.java 26 Jun 2002 10:05:35 -0000 1.3 --- DirectoryTypeWrapper.java 27 Jun 2002 02:40:46 -0000 1.4 *************** *** 8,11 **** --- 8,12 ---- import org.cdchamber.parser.FileParseException; + import java.io.*; public aspect DirectoryTypeWrapper { *************** *** 13,16 **** --- 14,29 ---- public void DirectoryType.parse( String dirName) throws FileParseException { super.parse( dirName); + File dir = new File( dirName); + + File[] files = dir.listFiles(); + int sumSize = 0; + for ( int i=0; i<files.length; i++) { + FileType fileType = new FileType(); + fileType.parse( files[i].getAbsolutePath()); + this.addFiles( fileType); + sumSize += fileType.getSize(); + System.out.println( "Sum:"+sumSize); + } + this.setSize( sumSize); } } |
From: <sim...@us...> - 2002-06-27 02:40:50
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv14122/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: Add more to directorytype testcase. The dir's size is the sum size of all files in it. Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DirectoryTypeTest.java 26 Jun 2002 10:30:04 -0000 1.5 --- DirectoryTypeTest.java 27 Jun 2002 02:40:46 -0000 1.6 *************** *** 11,14 **** --- 11,17 ---- import org.cdchamber.util.DirPath; + import java.io.File; + import java.util.Date; + public class DirectoryTypeTest extends TestCase { public DirectoryTypeTest(String s) { *************** *** 36,45 **** public void testEmptyDir() throws Exception { DirectoryType dirType = new DirectoryType( ); ! dirType.parse( DirPath.TestCaseDir + DirPath.SEP + "nulldir"); ! assertEquals( "Name should be nulldir", dirType.getName(), "nulldir"); ! // How to test directory size? ! // since it's different for windows and *nix. ! // assertEquals( 0, dirType.getSize()); // file size should be 0 // how to test date? } } --- 39,68 ---- public void testEmptyDir() throws Exception { DirectoryType dirType = new DirectoryType( ); ! String tmpDirName = DirPath.TestCaseDir + DirPath.SEP + "tmpnulldir"; ! File tmpDir = new File( tmpDirName); ! ! if ( !tmpDir.mkdirs()) fail( "Can't create null directory, can't continue this test."); ! long createDate = tmpDir.lastModified(); ! ! dirType.parse( tmpDirName); ! assertEquals( "Name should be tmpnulldir", dirType.getName(), "tmpnulldir"); ! assertEquals( 0, dirType.getSize()); // dir size should be 0, because it contains 0 files in it. // how to test date? + assertEquals( createDate, dirType.getDate()); // the date should be same as the create date. + + tmpDir.delete(); + } + + public void testFilesOnlyDir() throws Exception { + DirectoryType dirType = new DirectoryType(); + String dirName = DirPath.TestCaseDir + DirPath.SEP + "nulldir"+DirPath.SEP+"CVS"; + File dir = new File( dirName); + long curDate = dir.lastModified(); + + dirType.parse( dirName); + + assertEquals( "Name should be CVS", dirType.getName(), "CVS"); + assertEquals( 101, dirType.getSize()); // the size + assertEquals( curDate, dirType.getDate()); } } |
From: <sim...@us...> - 2002-06-26 10:43:02
|
Update of /cvsroot/cdchamber/CDChamber/script In directory usw-pr-cvs1:/tmp/cvs-serv15320/script Modified Files: continuousbuild.xml Log Message: Make sure the cvs diff really work. Index: continuousbuild.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/script/continuousbuild.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** continuousbuild.xml 26 Jun 2002 10:21:20 -0000 1.6 --- continuousbuild.xml 26 Jun 2002 10:42:59 -0000 1.7 *************** *** 34,38 **** <cvs output="${build.tmpdir}/patch"> <commandline> ! <argument line="-q diff -u -N"/> </commandline> </cvs> --- 34,38 ---- <cvs output="${build.tmpdir}/patch"> <commandline> ! <argument line="-q diff -u -N -r HEAD"/> </commandline> </cvs> *************** *** 57,61 **** <ant dir="${project.basedir}" antfile="${project.buildfile}" target="${build.cleantarget}"/> <java jvm="/usr/bin/java" classname="org.apache.tools.ant.Main" fork="true" dir="${basedir}"> ! <arg line="-quiet -logfile ${build.logfile} -buildfile ${project.buildfile} ${build.defaulttarget}"/> <classpath> <pathelement path="${java.class.path}"/> --- 57,61 ---- <ant dir="${project.basedir}" antfile="${project.buildfile}" target="${build.cleantarget}"/> <java jvm="/usr/bin/java" classname="org.apache.tools.ant.Main" fork="true" dir="${basedir}"> ! <arg line="-logfile ${build.logfile} -buildfile ${project.buildfile} ${build.defaulttarget}"/> <classpath> <pathelement path="${java.class.path}"/> |
From: <sim...@us...> - 2002-06-26 10:30:08
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv10204/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: Some difficult problem, see TODO.txt Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DirectoryTypeTest.java 26 Jun 2002 10:14:59 -0000 1.4 --- DirectoryTypeTest.java 26 Jun 2002 10:30:04 -0000 1.5 *************** *** 38,42 **** dirType.parse( DirPath.TestCaseDir + DirPath.SEP + "nulldir"); assertEquals( "Name should be nulldir", dirType.getName(), "nulldir"); ! assertEquals( 0, dirType.getSize()); // file size should be 0 // how to test date? } --- 38,44 ---- dirType.parse( DirPath.TestCaseDir + DirPath.SEP + "nulldir"); assertEquals( "Name should be nulldir", dirType.getName(), "nulldir"); ! // How to test directory size? ! // since it's different for windows and *nix. ! // assertEquals( 0, dirType.getSize()); // file size should be 0 // how to test date? } |
From: <sim...@us...> - 2002-06-26 10:30:08
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv10204 Modified Files: TODO.txt Log Message: Some difficult problem, see TODO.txt Index: TODO.txt =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/TODO.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TODO.txt 25 Jun 2002 09:04:57 -0000 1.6 --- TODO.txt 26 Jun 2002 10:30:04 -0000 1.7 *************** *** 8,9 **** --- 8,10 ---- + : write FileType testcases + : Code Standard should be wrote. + + : Find a way to test empty directory, file date and different directory size on different os. |
From: <sim...@us...> - 2002-06-26 10:21:22
|
Update of /cvsroot/cdchamber/CDChamber/script In directory usw-pr-cvs1:/tmp/cvs-serv7546/CDChamber/script Modified Files: continuousbuild.xml Log Message: bug fix for continuous integrate. The BUG:Can't increase the buildnumber. Index: continuousbuild.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/script/continuousbuild.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** continuousbuild.xml 26 Jun 2002 06:00:37 -0000 1.5 --- continuousbuild.xml 26 Jun 2002 10:21:20 -0000 1.6 *************** *** 47,51 **** <cvs> <commandline> ! <argument line="-Q update -d -P"/> </commandline> </cvs> --- 47,51 ---- <cvs> <commandline> ! <argument line="-Q update -d"/> </commandline> </cvs> *************** *** 95,99 **** </condition> <condition property="build.success"> ! <not> <isfalse value="${build.fail}"/></not> </condition> </target> --- 95,99 ---- </condition> <condition property="build.success"> ! <isfalse value="${build.fail}"/> </condition> </target> |
From: <sim...@us...> - 2002-06-26 10:15:01
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv6293/test/src/org/cdchamber/elements Modified Files: DirectoryTypeTest.java Log Message: The cruisecontrol script is useless now. remove them. Index: DirectoryTypeTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/DirectoryTypeTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DirectoryTypeTest.java 26 Jun 2002 10:05:35 -0000 1.3 --- DirectoryTypeTest.java 26 Jun 2002 10:14:59 -0000 1.4 *************** *** 34,38 **** } ! public void testNullDir() throws Exception { DirectoryType dirType = new DirectoryType( ); dirType.parse( DirPath.TestCaseDir + DirPath.SEP + "nulldir"); --- 34,38 ---- } ! public void testEmptyDir() throws Exception { DirectoryType dirType = new DirectoryType( ); dirType.parse( DirPath.TestCaseDir + DirPath.SEP + "nulldir"); *************** *** 41,44 **** // how to test date? } - } --- 41,43 ---- |