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: <sim...@us...> - 2003-04-19 13:45:57
|
Update of /cvsroot/cdchamber/CDChamber In directory sc8-pr-cvs1:/tmp/cvs-serv27468 Added Files: thinlet-2002-10-28.zip Log Message: The only way to download it from sf.net. :( --- NEW FILE: thinlet-2002-10-28.zip --- (This appears to be a binary file; contents omitted.) |
From: <cry...@us...> - 2002-08-09 05:38:28
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv17596 Modified Files: TODO.txt Log Message: aspect.debug and aspect.unittest conflict Index: TODO.txt =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/TODO.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TODO.txt 31 Jul 2002 06:09:02 -0000 1.20 --- TODO.txt 9 Aug 2002 05:38:25 -0000 1.21 *************** *** 25,26 **** --- 25,28 ---- + : Add password protect. + : Add data file encrypt + + : aspect.debug is conflict with aspect.unittest if they aspect the same file. + it can be resolved by preprocess now, and if aspectj can process class file, it can also be resolved |
From: <cry...@us...> - 2002-08-09 05:36:54
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv17257 Modified Files: build.xml Log Message: ajc.unittest updates on EntryParser.java Index: build.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/build.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** build.xml 7 Aug 2002 03:28:54 -0000 1.38 --- build.xml 9 Aug 2002 05:36:49 -0000 1.39 *************** *** 71,75 **** <uptodate targetfile="${build.aspect.unittest}/org/cdchamber/elements/EntryParserWrapper.class"> <srcfiles dir="${aspect.unittest}" includes="**/*.*"/> ! <srcfiles dir="${aspect.unittest}" includes="file.lst"/> </uptodate> </condition> --- 71,75 ---- <uptodate targetfile="${build.aspect.unittest}/org/cdchamber/elements/EntryParserWrapper.class"> <srcfiles dir="${aspect.unittest}" includes="**/*.*"/> ! <srcfiles dir="${aspect.gen}" includes="org/cdchamber/elements/EntryParser.java"/> </uptodate> </condition> *************** *** 136,139 **** --- 136,140 ---- <ajc destdir="${build.aspect.debug}" argfiles="${aspect.debug}/file.lst"> <classpath> + <pathelement location="${build.aspect.unittest}" /> <path refid="classpath" /> </classpath> *************** *** 146,149 **** --- 147,151 ---- <classpath> <pathelement location="${build.aspect.debug}" /> + <pathelement location="${build.aspect.unittest}" /> <pathelement path="${test.classes}" /> <path refid="classpath" /> *************** *** 151,155 **** <formatter type="plain" usefile="false"/> <batchtest todir="${junit.results}"> ! <fileset dir="${test.classes}" includes="org/cdchamber/gui/CDCMainFrameControllerTest.class"/> </batchtest> </junit> --- 153,157 ---- <formatter type="plain" usefile="false"/> <batchtest todir="${junit.results}"> ! <fileset dir="${test.classes}" includes="org/cdchamber/elements/EntryParserTest.class"/> </batchtest> </junit> |
From: <cry...@us...> - 2002-08-09 05:26:29
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv15070 Modified Files: EntryParserTest.java Log Message: fix bug of size Index: EntryParserTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/EntryParserTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EntryParserTest.java 7 Aug 2002 04:43:16 -0000 1.2 --- EntryParserTest.java 9 Aug 2002 05:26:27 -0000 1.3 *************** *** 32,39 **** MockEntry[] entries = new MockEntry[] { new MockEntry("foo/",1,0), ! new MockEntry("foo/bar",1,0), }; parse(entries); assertEquals(1,compressedFile.getFilesCount()); } --- 32,50 ---- MockEntry[] entries = new MockEntry[] { new MockEntry("foo/",1,0), ! new MockEntry("foo/bar/",1,0), ! new MockEntry("foo/bar/file1",1,0), ! new MockEntry("foo/bar/file2",1,0), ! new MockEntry("foo/zoo/",1,0), ! new MockEntry("foo/zoo/file3",10,0), }; parse(entries); assertEquals(1,compressedFile.getFilesCount()); + assertEquals(12,compressedFile.getSize()); + DirectoryType dir = (DirectoryType)compressedFile.getFiles(0); + assertEquals(2, dir.getFilesCount()); + assertEquals(12,dir.getSize()); + dir = (DirectoryType)dir.getFiles(0); + assertEquals(2,dir.getFilesCount()); + assertEquals(2,dir.getSize()); } *************** *** 66,71 **** }; parse(entries); ! FileType dir = compressedFile.getFiles(0); ! assertEquals(1,dir.getSize()); } --- 77,84 ---- }; parse(entries); ! assertEquals(1,compressedFile.getFilesCount()); ! DirectoryType dir = (DirectoryType)compressedFile.getFiles(0); ! assertEquals(0,dir.getFilesCount()); ! assertEquals(0,dir.getSize()); } |
From: <cry...@us...> - 2002-08-09 05:26:07
|
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv14952 Modified Files: EntryParser.java Log Message: fix bug of directory size calculation when ignore directory is in Index: EntryParser.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryParser.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EntryParser.java 7 Aug 2002 03:28:31 -0000 1.6 --- EntryParser.java 9 Aug 2002 05:26:02 -0000 1.7 *************** *** 29,32 **** --- 29,33 ---- } entryWrapper.close(); + updateEntrySize(root); } *************** *** 52,56 **** private void parseFile(String dir, String entryName) { if ( !FileFilters.accept(false, entryName)) return; ! DirectoryType parent = getLastParent(dir, entryWrapper.getSize()); if ( parent == null) return; --- 53,57 ---- private void parseFile(String dir, String entryName) { if ( !FileFilters.accept(false, entryName)) return; ! DirectoryType parent = getLastParent(dir); if ( parent == null) return; *************** *** 79,83 **** dirType.setName( entryName); ! DirectoryType parent = getLastParent( newDir, dirType.getSize()); if ( parent == null) return; nodes.put( dir, dirType); --- 80,84 ---- dirType.setName( entryName); ! DirectoryType parent = getLastParent(newDir); if ( parent == null) return; nodes.put( dir, dirType); *************** *** 90,94 **** ! private DirectoryType getLastParent(String dir, long size) { DirectoryType parent = null; DirectoryType lastParent = root; --- 91,95 ---- ! private DirectoryType getLastParent(String dir) { DirectoryType parent = null; DirectoryType lastParent = root; *************** *** 103,107 **** dirpath += dirName; parent = (DirectoryType) nodes.get(dirpath); - // Is the directory in our hash table already? if (parent == null) { parent = new DirectoryType(); --- 104,107 ---- *************** *** 110,114 **** nodes.put(dirpath, parent); } - parent.setSize( parent.getSize() + size); lastParent = parent; dirpath += "/"; --- 110,113 ---- *************** *** 117,120 **** --- 116,132 ---- return lastParent; } + + private void updateEntrySize(DirectoryType node) { + long sumSize = 0; + for ( int i = 0; i < node.getFilesCount(); i ++ ) { + FileType fileType = node.getFiles(i); + if ( fileType instanceof DirectoryType ) { + updateEntrySize((DirectoryType)fileType); + } + sumSize += fileType.getSize(); + } // end of for () + node.setSize(sumSize); + + } } |
From: <cry...@us...> - 2002-08-07 04:43:19
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv13227 Modified Files: EntryParserTest.java Log Message: add a testcase catch the EntryParser's bug for calculating size Index: EntryParserTest.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements/EntryParserTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EntryParserTest.java 7 Aug 2002 03:31:36 -0000 1.1 --- EntryParserTest.java 7 Aug 2002 04:43:16 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- public class EntryParserTest extends TestCase { + private CompressedFileType compressedFile; public EntryParserTest(String name) { super(name); *************** *** 11,15 **** public void setUp() { ! } --- 12,16 ---- public void setUp() { ! compressedFile = new CompressedFileType(); } *************** *** 18,37 **** } ! public void testMockEntryWrapper() { ! MockEntry[] entries = new MockEntry[] { ! new MockEntry("foo/",1,0), ! new MockEntry("foo/bar",1,0) ! }; MockEntryWrapper entryWrapper = new MockEntryWrapper(entries); - CompressedFileType compressedFile = new CompressedFileType(); try { EntryParser entryParser = new EntryParser(compressedFile, entryWrapper); entryParser.parseEntries(); - assertEquals(1,compressedFile.getFilesCount()); } catch ( Exception e) { fail("should not throw Exception: " + e); ! } // end of try-catch ! } } --- 19,73 ---- } ! private void parse(MockEntry[] entries) { MockEntryWrapper entryWrapper = new MockEntryWrapper(entries); try { EntryParser entryParser = new EntryParser(compressedFile, entryWrapper); entryParser.parseEntries(); } catch ( Exception e) { fail("should not throw Exception: " + e); ! } ! } ! ! public void testMockEntryWrapper() { ! MockEntry[] entries = new MockEntry[] { ! new MockEntry("foo/",1,0), ! new MockEntry("foo/bar",1,0), ! }; ! parse(entries); ! assertEquals(1,compressedFile.getFilesCount()); ! } ! ! public void testOrder() { ! MockEntry[] entries = new MockEntry[] { ! new MockEntry("foo/bar",1,0), ! new MockEntry("foo/",1,0), ! new MockEntry("zoo/",1,0), ! }; ! parse(entries); ! assertEquals(2,compressedFile.getFilesCount()); ! } ! ! public void testSize() { ! MockEntry[] entries = new MockEntry[] { ! new MockEntry("foo/",1,0), ! new MockEntry("foo/bar/",1,0), ! new MockEntry("foo/bar/file",10,0), ! }; ! parse(entries); ! FileType dir = compressedFile.getFiles(0); ! assertEquals(10,dir.getSize()); ! } ! ! public void testIgnoreSize() { ! MockEntry[] entries = new MockEntry[] { ! new MockEntry("foo/",1,0), ! new MockEntry("foo/CVS/",1,0), ! new MockEntry("foo/CVS/file",10,0), ! }; ! parse(entries); ! FileType dir = compressedFile.getFiles(0); ! assertEquals(1,dir.getSize()); } + } |
From: <cry...@us...> - 2002-08-07 03:31:40
|
Update of /cvsroot/cdchamber/CDChamber/test/src/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv29048 Added Files: EntryParserTest.java Log Message: add EntryParser Test --- NEW FILE: EntryParserTest.java --- // $Id: EntryParserTest.java,v 1.1 2002/08/07 03:31:36 crystal_y Exp $ package org.cdchamber.elements; import junit.framework.*; public class EntryParserTest extends TestCase { public EntryParserTest(String name) { super(name); } public void setUp() { } public void tearDown() { } public void testMockEntryWrapper() { MockEntry[] entries = new MockEntry[] { new MockEntry("foo/",1,0), new MockEntry("foo/bar",1,0) }; MockEntryWrapper entryWrapper = new MockEntryWrapper(entries); CompressedFileType compressedFile = new CompressedFileType(); try { EntryParser entryParser = new EntryParser(compressedFile, entryWrapper); entryParser.parseEntries(); assertEquals(1,compressedFile.getFilesCount()); } catch ( Exception e) { fail("should not throw Exception: " + e); } // end of try-catch } } class MockEntry { String name; long size; long time; MockEntry( String name, long size, long time) { this.name = name; this.size = size; this.time = time; } } class MockEntryWrapper extends EntryWrapper { MockEntry[] entries; int index; public MockEntryWrapper(MockEntry[] entries) { this.entries = entries; index = -1; } public void close() { } public void nextElement() { index ++; } public boolean hasMoreElements() { return index < entries.length - 1; } public String getName() { return entries[index].name; } public long getSize() { return entries[index].size; } public long getTime() { return entries[index].time; } } |
From: <cry...@us...> - 2002-08-07 03:28:57
|
Update of /cvsroot/cdchamber/CDChamber In directory usw-pr-cvs1:/tmp/cvs-serv28552 Modified Files: build.xml Log Message: refactoring aspect's usage structure Index: build.xml =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/build.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** build.xml 31 Jul 2002 06:49:03 -0000 1.37 --- build.xml 7 Aug 2002 03:28:54 -0000 1.38 *************** *** 14,21 **** <property name="test.src" value="${test.dir}/src"/> <property name="aspect.gen" value="${aspect.dir}/gen"/> ! <property name="aspect.src" value="${aspect.dir}/src"/> <property name="build.dest" value="${build.dir}/classes"/> <property name="test.classes" value="${build.dir}/test"/> ! <property name="aspect.classes" value="${build.dir}/aspect"/> <property name="jar.dir" value="${build.dir}/lib"/> --- 14,24 ---- <property name="test.src" value="${test.dir}/src"/> <property name="aspect.gen" value="${aspect.dir}/gen"/> ! <property name="aspect.debug" value="${aspect.dir}/debug"/> ! <property name="aspect.unittest" value="${aspect.dir}/unittest"/> <property name="build.dest" value="${build.dir}/classes"/> <property name="test.classes" value="${build.dir}/test"/> ! <property name="build.aspect" value="${build.dir}/aspect"/> ! <property name="build.aspect.debug" value="${build.aspect}/debug"/> ! <property name="build.aspect.unittest" value="${build.aspect}/unittest"/> <property name="jar.dir" value="${build.dir}/lib"/> *************** *** 25,29 **** <path id="classpath"> <pathelement path="${basedir}/lib" /> - <pathelement path="${test.classes}" /> <pathelement path="${build.dest}" /> <fileset dir="${basedir}/lib"> --- 28,31 ---- *************** *** 39,43 **** <mkdir dir="${build.dest}"/> <mkdir dir="${test.classes}"/> ! <mkdir dir="${aspect.classes}"/> <mkdir dir="${logdir}"/> <mkdir dir="${jar.dir}"/> --- 41,47 ---- <mkdir dir="${build.dest}"/> <mkdir dir="${test.classes}"/> ! <mkdir dir="${build.aspect}"/> ! <mkdir dir="${build.aspect.debug}"/> ! <mkdir dir="${build.aspect.unittest}"/> <mkdir dir="${logdir}"/> <mkdir dir="${jar.dir}"/> *************** *** 53,65 **** </and> </condition> ! <condition property="ajc_gen.notRequired"> <uptodate targetfile="${src.dir}/org/cdchamber/elements/FileType.java"> <srcfiles dir="${aspect.gen}" includes="**/*.*"/> </uptodate> </condition> ! <condition property="ajc.notRequired"> ! <uptodate targetfile="${aspect.classes}/AspectCDCMainFrameControllerTest.class"> ! <srcfiles dir="${aspect.src}" includes="**/*.*"/> ! <srcfiles dir="${aspect.dir}" includes="file.lst"/> </uptodate> </condition> --- 57,75 ---- </and> </condition> ! <condition property="ajc.gen.notRequired"> <uptodate targetfile="${src.dir}/org/cdchamber/elements/FileType.java"> <srcfiles dir="${aspect.gen}" includes="**/*.*"/> </uptodate> </condition> ! <condition property="ajc.debug.notRequired"> ! <uptodate targetfile="${build.aspect.debug}/AspectCDCMainFrameControllerTest.class"> ! <srcfiles dir="${aspect.debug}" includes="**/*.*"/> ! <srcfiles dir="${aspect.debug}" includes="file.lst"/> ! </uptodate> ! </condition> ! <condition property="ajc.unittest.notRequired"> ! <uptodate targetfile="${build.aspect.unittest}/org/cdchamber/elements/EntryParserWrapper.class"> ! <srcfiles dir="${aspect.unittest}" includes="**/*.*"/> ! <srcfiles dir="${aspect.unittest}" includes="file.lst"/> </uptodate> </condition> *************** *** 71,75 **** </target> ! <target name="castor_gen" depends="init" description="Generate src files from xsd files" unless="xmlBuild.notRequired"> <java classname="org.exolab.castor.builder.SourceGenerator" fork="true"> <arg line="-i ${src.dir}/cdchamber.xsd -dest ${aspect.gen} -package org.cdchamber.elements -verbose -types j2 -nodesc -f"/> --- 81,85 ---- </target> ! <target name="castor.gen" depends="init" description="Generate src files from xsd files" unless="xmlBuild.notRequired"> <java classname="org.exolab.castor.builder.SourceGenerator" fork="true"> <arg line="-i ${src.dir}/cdchamber.xsd -dest ${aspect.gen} -package org.cdchamber.elements -verbose -types j2 -nodesc -f"/> *************** *** 81,85 **** ! <target name="ajc_gen" depends="castor_gen" unless="ajc_gen.notRequired"> <ajc preprocess="yes" workingdir="${src.dir}" nocomments="yes"> <classpath> --- 91,95 ---- ! <target name="ajc.gen" depends="castor.gen" unless="ajc.gen.notRequired"> <ajc preprocess="yes" workingdir="${src.dir}" nocomments="yes"> <classpath> *************** *** 92,96 **** </target> ! <target name="compile" depends="ajc_gen" description="Compile application without aspectj"> <javac srcdir="${src.dir}" destdir="${build.dest}" classpathref="classpath" includes="**/*.java" debug="true" deprecation="true" /> --- 102,106 ---- </target> ! <target name="compile" depends="ajc.gen" description="Compile application without aspectj"> <javac srcdir="${src.dir}" destdir="${build.dest}" classpathref="classpath" includes="**/*.java" debug="true" deprecation="true" /> *************** *** 105,111 **** </target> ! <target name="test.compile" depends="testsuite.gen"> <javac srcdir="${test.src}" destdir="${test.classes}"> <classpath> <path refid="classpath" /> </classpath> --- 115,130 ---- </target> ! <target name="ajc.unittest" depends="compile" unless="ajc.unittest.notRequired"> ! <ajc destdir="${build.aspect.unittest}" argfiles="${aspect.unittest}/file.lst"> ! <classpath> ! <path refid="classpath" /> ! </classpath> ! </ajc> ! </target> ! ! <target name="test.compile" depends="testsuite.gen,ajc.unittest"> <javac srcdir="${test.src}" destdir="${test.classes}"> <classpath> + <pathelement location="${build.aspect.unittest}" /> <path refid="classpath" /> </classpath> *************** *** 114,119 **** </target> ! <target name="ajc" depends="test.compile" unless="ajc.notRequired"> ! <ajc destdir="${aspect.classes}" argfiles="${aspect.dir}/file.lst"> <classpath> <path refid="classpath" /> --- 133,138 ---- </target> ! <target name="ajc.debug" depends="test.compile" unless="ajc.debug.notRequired"> ! <ajc destdir="${build.aspect.debug}" argfiles="${aspect.debug}/file.lst"> <classpath> <path refid="classpath" /> *************** *** 122,129 **** </target> ! <target name="ajrun" depends="ajc" description="Run debugging unit tests"> <junit fork="yes" haltonfailure="yes" dir="."> <classpath> ! <pathelement location="${aspect.classes}" /> <path refid="classpath" /> </classpath> --- 141,150 ---- </target> ! ! <target name="ajrun.debug" depends="ajc.debug" description="Run debugging unit tests"> <junit fork="yes" haltonfailure="yes" dir="."> <classpath> ! <pathelement location="${build.aspect.debug}" /> ! <pathelement path="${test.classes}" /> <path refid="classpath" /> </classpath> *************** *** 138,149 **** <junit fork="true" haltonfailure="yes" dir="."> <classpath> <path refid="classpath" /> </classpath> <formatter type="plain" usefile="false"/> <test name="AllTests"/> - - <!-- <batchtest todir="${junit.results}"> --> - <!-- <fileset dir="${test.classes}" includes="**/*Test.class"/> --> - <!-- </batchtest> --> </junit> </target> --- 159,168 ---- <junit fork="true" haltonfailure="yes" dir="."> <classpath> + <pathelement location="${build.aspect.unittest}" /> + <pathelement path="${test.classes}" /> <path refid="classpath" /> </classpath> <formatter type="plain" usefile="false"/> <test name="AllTests"/> </junit> </target> *************** *** 152,156 **** <jar jarfile="${jar.dir}/CDChamber.jar"> <fileset dir="${build.dest}"/> - <fileset dir="${aspect.classes}"/> </jar> </target> --- 171,174 ---- |
From: <cry...@us...> - 2002-08-07 03:28:34
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv28461/unittest/org/cdchamber/elements Added Files: EntryParserWrapper.java Log Message: refactoring aspect's usage structure --- NEW FILE: EntryParserWrapper.java --- package org.cdchamber.elements; import java.io.IOException; public aspect EntryParserWrapper{ public EntryParser.new(DirectoryType root, EntryWrapper entryWrapper) throws IOException{ this(); this.entryWrapper = entryWrapper; this.root = root; } } |
From: <cry...@us...> - 2002-08-07 03:28:34
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest In directory usw-pr-cvs1:/tmp/cvs-serv28461/unittest Added Files: file.lst Log Message: refactoring aspect's usage structure --- NEW FILE: file.lst --- org/cdchamber/elements/EntryParserWrapper.java ../../src/org/cdchamber/elements/EntryParser.java |
From: <cry...@us...> - 2002-08-07 03:28:33
|
Update of /cvsroot/cdchamber/CDChamber/aspect/src In directory usw-pr-cvs1:/tmp/cvs-serv28461/src Removed Files: AspectCDCMainFrameControllerTest.java Log Message: refactoring aspect's usage structure --- AspectCDCMainFrameControllerTest.java DELETED --- |
From: <cry...@us...> - 2002-08-07 03:28:33
|
Update of /cvsroot/cdchamber/CDChamber/aspect/debug In directory usw-pr-cvs1:/tmp/cvs-serv28461/debug Added Files: AspectCDCMainFrameControllerTest.java file.lst Log Message: refactoring aspect's usage structure --- NEW FILE: AspectCDCMainFrameControllerTest.java --- import java.io.*; import org.cdchamber.gui.*; import org.cdchamber.util.DirPath; public aspect AspectCDCMainFrameControllerTest { pointcut entry(): cflowbelow(call(void testSaveAllCDRomAction())) && call(void actionPerformed(..)); void printFiles() { File dataDir = new File( DirPath.DataDir); File[] newFiles = dataDir.listFiles(new XmlFilenameFilter() ); for ( int i = 0; i < newFiles.length; i++ ) { System.out.println(newFiles[i].getName() + " " + newFiles[i].lastModified() ); } // end of for () } before():entry() { System.out.println("before actionPerformed"); printFiles(); } after():entry() { System.out.println("after actionPerformed"); printFiles(); } } class XmlFilenameFilter implements FilenameFilter { public boolean accept(File dir, String name) { if ( name.toLowerCase().endsWith(".xml")) return true; return false; } } --- NEW FILE: file.lst --- AspectCDCMainFrameControllerTest.java ../../test/src/org/cdchamber/gui/CDCMainFrameControllerTest.java |
From: <cry...@us...> - 2002-08-07 03:28:33
|
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv28461/gen/org/cdchamber/elements Modified Files: EntryParser.java EntryWrapper.java Log Message: refactoring aspect's usage structure Index: EntryParser.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryParser.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EntryParser.java 7 Aug 2002 01:11:28 -0000 1.5 --- EntryParser.java 7 Aug 2002 03:28:31 -0000 1.6 *************** *** 11,17 **** public class EntryParser { ! private DirectoryType root; private Hashtable nodes = new Hashtable(); EntryWrapper entryWrapper; public EntryParser( DirectoryType root, String fileName) throws IOException{ entryWrapper = EntryWrapper.getEntryWrapper(fileName); --- 11,21 ---- public class EntryParser { ! DirectoryType root; private Hashtable nodes = new Hashtable(); EntryWrapper entryWrapper; + public EntryParser() { + + } + public EntryParser( DirectoryType root, String fileName) throws IOException{ entryWrapper = EntryWrapper.getEntryWrapper(fileName); Index: EntryWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryWrapper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EntryWrapper.java 7 Aug 2002 01:11:28 -0000 1.3 --- EntryWrapper.java 7 Aug 2002 03:28:31 -0000 1.4 *************** *** 21,26 **** if ( fileName.endsWith(".jar")) return new JarFileWrapper(new JarFile(fileName)); ! else ! return new ZipFileWrapper(new ZipInputStream( new FileInputStream(fileName))); } --- 21,27 ---- if ( fileName.endsWith(".jar")) return new JarFileWrapper(new JarFile(fileName)); ! else{ ! return new ZipFileWrapper(new ZipInputStream( new FileInputStream(fileName))); ! } } |
From: <cry...@us...> - 2002-08-07 03:28:33
|
Update of /cvsroot/cdchamber/CDChamber/aspect In directory usw-pr-cvs1:/tmp/cvs-serv28461 Removed Files: file.lst Log Message: refactoring aspect's usage structure --- file.lst DELETED --- |
From: <cry...@us...> - 2002-08-07 03:27:33
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv28190/org/cdchamber/elements Log Message: Directory /cvsroot/cdchamber/CDChamber/aspect/unittest/org/cdchamber/elements added to the repository |
From: <cry...@us...> - 2002-08-07 03:27:23
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest/org/cdchamber In directory usw-pr-cvs1:/tmp/cvs-serv28095/org/cdchamber Log Message: Directory /cvsroot/cdchamber/CDChamber/aspect/unittest/org/cdchamber added to the repository |
From: <cry...@us...> - 2002-08-07 03:27:03
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest/org In directory usw-pr-cvs1:/tmp/cvs-serv27918/org Log Message: Directory /cvsroot/cdchamber/CDChamber/aspect/unittest/org added to the repository |
From: <cry...@us...> - 2002-08-07 03:26:36
|
Update of /cvsroot/cdchamber/CDChamber/aspect/unittest In directory usw-pr-cvs1:/tmp/cvs-serv27709/unittest Log Message: Directory /cvsroot/cdchamber/CDChamber/aspect/unittest added to the repository |
From: <cry...@us...> - 2002-08-07 03:25:48
|
Update of /cvsroot/cdchamber/CDChamber/aspect/debug In directory usw-pr-cvs1:/tmp/cvs-serv27235/debug Log Message: Directory /cvsroot/cdchamber/CDChamber/aspect/debug added to the repository |
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv26415 Added Files: BakFileFilter.java CVSFileFilter.java IFileFilter.java SwungDashFileFilter.java Log Message: refactoring entryparser,compressedfiletypewrapper |
From: <cry...@us...> - 2002-08-07 01:11:31
|
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv26207 Modified Files: CompressedFileTypeWrapper.java EntryParser.java EntryWrapper.java FileTypeWrapper.java Removed Files: BakFileFilter.java CVSFileFilter.java IFileFilter.java SwungDashFileFilter.java Log Message: refactoring entryparser,compressedfiletypewrapper Index: CompressedFileTypeWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/CompressedFileTypeWrapper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CompressedFileTypeWrapper.java 31 Jul 2002 01:58:14 -0000 1.6 --- CompressedFileTypeWrapper.java 7 Aug 2002 01:11:28 -0000 1.7 *************** *** 6,19 **** import org.cdchamber.parser.FileParseException; - - import java.util.jar.JarFile; - import java.util.jar.JarEntry; - import java.util.Enumeration; import java.io.IOException; - import java.io.File; - import java.io.FileInputStream; - import net.sf.jazzlib.ZipFile; - import net.sf.jazzlib.ZipEntry; - import net.sf.jazzlib.ZipInputStream; public aspect CompressedFileTypeWrapper{ --- 6,10 ---- *************** *** 21,44 **** public CompressedFileType.new( String fileName) throws FileParseException { super(); ! this.parse( fileName); } public void CompressedFileType.parse( String fileName) throws FileParseException { try { ! File file = new File( fileName); ! setBasicInfo( file); ! ! EntryWrapper entryWrapper; ! if ( fileName.endsWith(".jar")) entryWrapper = EntryWrapper.getEntryWrapper(new JarFile( fileName)); ! else entryWrapper = EntryWrapper.getEntryWrapper(new ZipInputStream( new FileInputStream(fileName))); ! EntryParser entryParser= new EntryParser(this, entryWrapper); entryParser.parseEntries(); - - entryParser.close(); } catch (IOException e) { throw new FileParseException( "Can't parse jar file"); } - } - } --- 12,26 ---- public CompressedFileType.new( String fileName) throws FileParseException { super(); ! this.parse(fileName); } public void CompressedFileType.parse( String fileName) throws FileParseException { try { ! setBasicInfo(fileName); ! EntryParser entryParser= new EntryParser(this, fileName); entryParser.parseEntries(); } catch (IOException e) { throw new FileParseException( "Can't parse jar file"); } } } Index: EntryParser.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EntryParser.java 6 Aug 2002 09:41:38 -0000 1.4 --- EntryParser.java 7 Aug 2002 01:11:28 -0000 1.5 *************** *** 5,16 **** package org.cdchamber.elements; ! import org.cdchamber.elements.DirectoryType; ! import org.cdchamber.elements.EntryWrapper; ! ! import java.util.*; ! import java.util.jar.JarFile; ! import java.io.*; ! ! import net.sf.jazzlib.ZipFile; public class EntryParser { --- 5,11 ---- package org.cdchamber.elements; ! import java.util.Hashtable; ! import java.io.IOException; ! import java.util.StringTokenizer; public class EntryParser { *************** *** 19,36 **** private Hashtable nodes = new Hashtable(); EntryWrapper entryWrapper; ! public EntryParser( DirectoryType root, EntryWrapper entryWrapper) { ! this.root = root; ! this.entryWrapper = entryWrapper; ! } ! ! public void close() throws IOException { ! entryWrapper.close(); ! } ! public void parseEntries() throws IOException { while ( entryWrapper.hasMoreElements()) { entryWrapper.nextElement(); parseEntry(); } } --- 14,28 ---- private Hashtable nodes = new Hashtable(); EntryWrapper entryWrapper; ! public EntryParser( DirectoryType root, String fileName) throws IOException{ ! entryWrapper = EntryWrapper.getEntryWrapper(fileName); ! this.root = root; ! } ! public void parseEntries() throws IOException { while ( entryWrapper.hasMoreElements()) { entryWrapper.nextElement(); parseEntry(); } + entryWrapper.close(); } Index: EntryWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EntryWrapper.java 31 Jul 2002 01:58:14 -0000 1.2 --- EntryWrapper.java 7 Aug 2002 01:11:28 -0000 1.3 *************** *** 7,10 **** --- 7,14 ---- import net.sf.jazzlib.*; + import java.io.FileInputStream; + import net.sf.jazzlib.ZipFile; + import net.sf.jazzlib.ZipEntry; + import net.sf.jazzlib.ZipInputStream; import java.util.jar.JarFile; import java.util.jar.JarEntry; *************** *** 14,22 **** public abstract class EntryWrapper { ! public static EntryWrapper getEntryWrapper( Object obj) { ! if ( obj instanceof JarFile ) { ! return new JarFileWrapper( (JarFile)obj); ! } return new ZipFileWrapper( (ZipInputStream)obj); ! } public abstract void close() throws IOException; --- 18,27 ---- public abstract class EntryWrapper { ! public static EntryWrapper getEntryWrapper(String fileName ) throws IOException{ ! if ( fileName.endsWith(".jar")) ! return new JarFileWrapper(new JarFile(fileName)); ! else ! return new ZipFileWrapper(new ZipInputStream( new FileInputStream(fileName))); ! } public abstract void close() throws IOException; *************** *** 57,60 **** --- 62,66 ---- } + // it is dangerous to nextElement in hasMoreElements public boolean hasMoreElements() throws IOException { entry = zis.getNextEntry(); Index: FileTypeWrapper.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/FileTypeWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileTypeWrapper.java 26 Jul 2002 10:10:51 -0000 1.2 --- FileTypeWrapper.java 7 Aug 2002 01:11:28 -0000 1.3 *************** *** 8,16 **** public void FileType.parse( String fileName) throws FileParseException { ! File file = new File( fileName); ! setBasicInfo( file); } ! public void FileType.setBasicInfo( File file) throws FileParseException { if ( !file.exists()) throw new FileParseException( "File not exist"+ file.getName()); setName( file.getName()); --- 8,16 ---- public void FileType.parse( String fileName) throws FileParseException { ! setBasicInfo(fileName); } ! public void FileType.setBasicInfo(String fileName) throws FileParseException { ! File file = new File( fileName); if ( !file.exists()) throw new FileParseException( "File not exist"+ file.getName()); setName( file.getName()); --- BakFileFilter.java DELETED --- --- CVSFileFilter.java DELETED --- --- IFileFilter.java DELETED --- --- SwungDashFileFilter.java DELETED --- |
From: <cry...@us...> - 2002-08-06 09:41:45
|
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv30538 Modified Files: EntryParser.java Log Message: refactor entryparser a little, need more refactor Index: EntryParser.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements/EntryParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EntryParser.java 31 Jul 2002 01:58:14 -0000 1.3 --- EntryParser.java 6 Aug 2002 09:41:38 -0000 1.4 *************** *** 29,96 **** public void parseEntries() throws IOException { - while ( entryWrapper.hasMoreElements()) { entryWrapper.nextElement(); ! String entryName = entryWrapper.getName(); ! // Get the directory part if there is one ! String dir = null; ! // Get the position of the last '/' ! int cutIndex = entryName.lastIndexOf('/'); ! if (cutIndex != -1) { ! dir = entryName.substring(0, cutIndex); ! // Separate the file part ! entryName = entryName.substring(cutIndex + 1); ! } ! if (!entryName.equals("")) { ! FileType node = new FileType(); ! setFileBasicInfo(node, entryName); ! // This is not a directory entry, e.g. a class ! DirectoryType lastParent = getLastParent(dir, node.getSize()); ! if ( lastParent == null) continue; ! // judge the file ! if ( !FileFilters.accept(false, entryName)) continue; ! // Add the entry to the directory node ! lastParent.addFiles(node); ! } else { ! DirectoryType dirType = (DirectoryType)nodes.get( dir); ! if ( dirType == null) { ! dirType = new DirectoryType(); ! dirType.setDate( entryWrapper.getTime()); ! entryName = dir; ! String newDir = null; ! cutIndex = dir.lastIndexOf( '/'); ! if (cutIndex != -1) { ! newDir = dir.substring(0, cutIndex); ! entryName = dir.substring(cutIndex + 1); ! } ! if ( !FileFilters.accept( true, entryName)) continue; ! dirType.setName( entryName); ! DirectoryType parent = getLastParent( newDir, dirType.getSize()); ! if ( parent == null) continue; ! nodes.put( dir, dirType); ! parent.addFiles( dirType); ! } else dirType.setDate( entryWrapper.getTime()); ! } ! } ! } ! private void setFileBasicInfo(FileType node, String entryName) { ! node.setName( entryName); ! node.setSize( entryWrapper.getSize()); ! node.setDate( entryWrapper.getTime()); ! } private DirectoryType getLastParent(String dir, long size) { DirectoryType parent = null; DirectoryType lastParent = root; ! if (dir == null) parent = lastParent; ! else { StringTokenizer tokenizer = new StringTokenizer(dir, "/"); String dirpath = ""; --- 29,101 ---- public void parseEntries() throws IOException { while ( entryWrapper.hasMoreElements()) { entryWrapper.nextElement(); ! parseEntry(); ! } ! } ! private void parseEntry() throws IOException { ! String entryName = entryWrapper.getName(); ! // Get the directory part if there is one ! String dir = null; ! // Get the position of the last '/' ! int cutIndex = entryName.lastIndexOf('/'); ! if (cutIndex != -1) { ! dir = entryName.substring(0, cutIndex); ! // Separate the file part ! entryName = entryName.substring(cutIndex + 1); ! } ! if (!entryName.equals("")) { ! parseFile(dir,entryName); ! } else { ! parseDirectory(dir,entryName); ! } ! } ! private void parseFile(String dir, String entryName) { ! if ( !FileFilters.accept(false, entryName)) return; ! DirectoryType parent = getLastParent(dir, entryWrapper.getSize()); ! if ( parent == null) return; ! FileType node = new FileType(); ! node.setName(entryName); ! node.setSize(entryWrapper.getSize()); ! node.setDate(entryWrapper.getTime()); ! parent.addFiles(node); ! } ! private void parseDirectory(String dir, String entryName) { ! DirectoryType dirType = (DirectoryType)nodes.get(dir); ! if ( dirType == null) { ! dirType = new DirectoryType(); ! dirType.setDate( entryWrapper.getTime()); ! entryName = dir; ! String newDir = null; ! int cutIndex = dir.lastIndexOf( '/'); ! if (cutIndex != -1) { ! newDir = dir.substring(0, cutIndex); ! entryName = dir.substring(cutIndex + 1); ! } ! if ( !FileFilters.accept( true, entryName)) return; ! dirType.setName( entryName); ! DirectoryType parent = getLastParent( newDir, dirType.getSize()); ! if ( parent == null) return; ! nodes.put( dir, dirType); ! parent.addFiles( dirType); ! } else ! dirType.setDate(entryWrapper.getTime()); ! ! } ! ! private DirectoryType getLastParent(String dir, long size) { DirectoryType parent = null; DirectoryType lastParent = root; ! if (dir != null){ StringTokenizer tokenizer = new StringTokenizer(dir, "/"); String dirpath = ""; *************** *** 106,110 **** parent = new DirectoryType(); parent.setName( dirName); - //setFileBasicInfo( parent, dirName, zipFile.getEntry( dirpath)); lastParent.addFiles(parent); nodes.put(dirpath, parent); --- 111,114 ---- *************** *** 116,141 **** } return lastParent; - } - - public static void main( String[] args) throws Exception { - if ( args.length != 4) reportUsage(); - if ( !args[0].equalsIgnoreCase( "-i")) reportUsage(); - if ( !args[2].equalsIgnoreCase( "-o")) reportUsage(); - File inFile = new File( args[1]); - File outFile = new File( args[3]); - - DirectoryType root = new DirectoryType(); - EntryParser parser; - if ( inFile.getName().toLowerCase().endsWith( ".jar")) - parser = new EntryParser( root, EntryWrapper.getEntryWrapper( new JarFile(inFile))); - else parser = new EntryParser( root, EntryWrapper.getEntryWrapper( new ZipFile(inFile))); - parser.parseEntries(); - root.marshal( new FileWriter( outFile)); - } - - private static void reportUsage() { - System.out.println( "Usage: java org.elements.EntryParser -i inputfile -o outputfilename"); - System.out.println( "And make sure the inputdir can read, the outputfilename can write"); - System.exit( 1); } --- 120,123 ---- |
From: <cry...@us...> - 2002-07-31 06:52:52
|
Update of /cvsroot/cdchamber/CDChamber/test/src In directory usw-pr-cvs1:/tmp/cvs-serv14276 Removed Files: AllTests.java Log Message: remove AllTests.java --- AllTests.java DELETED --- |
From: <cry...@us...> - 2002-07-31 06:52:28
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools In directory usw-pr-cvs1:/tmp/cvs-serv14127 Modified Files: AllTestsGenerator.java Log Message: generate file if no AllTests.java exists Index: AllTestsGenerator.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools/AllTestsGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AllTestsGenerator.java 31 Jul 2002 06:50:10 -0000 1.4 --- AllTestsGenerator.java 31 Jul 2002 06:52:25 -0000 1.5 *************** *** 12,22 **** static String testSrc = DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src"; ! private static String readFile( String filename ) throws IOException{ ! File file = new File(filename); ! FileReader reader = new FileReader(file); ! char[] buf = new char[(int)file.length()]; ! reader.read(buf,0,(int)file.length()); ! reader.close(); ! return new String(buf); } --- 12,27 ---- static String testSrc = DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src"; ! private static String readFile( String filename ){ ! try { ! File file = new File(filename); ! FileReader reader = new FileReader(file); ! char[] buf = new char[(int)file.length()]; ! reader.read(buf,0,(int)file.length()); ! reader.close(); ! return new String(buf); ! } catch (IOException e) { ! return ""; ! } // end of try-catch ! } |
From: <cry...@us...> - 2002-07-31 06:50:13
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools In directory usw-pr-cvs1:/tmp/cvs-serv13504 Modified Files: AllTestsGenerator.java Log Message: use memory string.equal to check if file is different Index: AllTestsGenerator.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/util/testtools/AllTestsGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AllTestsGenerator.java 31 Jul 2002 06:02:05 -0000 1.3 --- AllTestsGenerator.java 31 Jul 2002 06:50:10 -0000 1.4 *************** *** 10,58 **** public class AllTestsGenerator { ! static String testSrc = DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src" + DirPath.SEP ; ! static PrintWriter allTest; ! static String tmpFile = testSrc + "AllTests.java2"; ! static String targetFile = testSrc + "AllTests.java"; public static void main( String[] args) throws IOException { ! allTest = new PrintWriter( new FileWriter( tmpFile)); File testsDir = new File( DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src"); ! prefix(); ! generate( testsDir, ""); ! postfix(); ! allTest.close(); ! ! if ( !FileComparator.diff( targetFile, tmpFile)) delete( tmpFile); ! else { ! delete( targetFile); ! rename(); ! } ! } ! ! static void rename( ) { ! File file = new File( tmpFile); ! File target = new File( targetFile); ! file.renameTo( target); ! } ! ! static void delete( String fileName) { ! File file = new File( fileName); ! System.out.println( file.delete()); } ! static void generate( File testsDir, String packageName) { File[] files = testsDir.listFiles(); for ( int i=0; i< files.length; i++) { File file = files[i]; ! if ( file.isDirectory()) generate( file, getPackageName( packageName, file.getName())); if ( file.getName().endsWith( "Test.java")) { int point = file.getName().lastIndexOf('.'); String name = file.getName().substring( 0, point); ! allTest.print( " suite.addTest(new TestSuite("); ! allTest.print( packageName+"."+ name); ! allTest.println( ".class));"); } } } --- 10,53 ---- public class AllTestsGenerator { ! static String testSrc = DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src"; ! ! private static String readFile( String filename ) throws IOException{ ! File file = new File(filename); ! FileReader reader = new FileReader(file); ! char[] buf = new char[(int)file.length()]; ! reader.read(buf,0,(int)file.length()); ! reader.close(); ! return new String(buf); ! } public static void main( String[] args) throws IOException { ! String original = readFile(testSrc + DirPath.SEP + "AllTests.java"); File testsDir = new File( DirPath.BaseDir + DirPath.SEP + "test" + DirPath.SEP + "src"); ! String result = prefix(); ! result += generate( testsDir, ""); ! result += postfix(); ! if ( !result.equals(original) ) { ! PrintWriter allTest = new PrintWriter( new FileWriter(testSrc + DirPath.SEP + "AllTests.java")); ! allTest.print(result); ! allTest.close(); ! } // end of if () } ! static String generate( File testsDir, String packageName) { File[] files = testsDir.listFiles(); + String result = ""; for ( int i=0; i< files.length; i++) { File file = files[i]; ! if ( file.isDirectory()) ! result += generate( file, getPackageName( packageName, file.getName())); if ( file.getName().endsWith( "Test.java")) { int point = file.getName().lastIndexOf('.'); String name = file.getName().substring( 0, point); ! result += " suite.addTest(new TestSuite("; ! result += packageName+"."+ name + ".class));\n"; } } + return result; } *************** *** 63,80 **** } ! static void prefix() { ! allTest.println( "import junit.framework.*;"); ! allTest.println( "public class AllTests {"); ! allTest.println( " public static void main (String[] args) {"); ! allTest.println( " junit.textui.TestRunner.run (suite());"); ! allTest.println( " }"); ! allTest.println( " public static Test suite ( ) {"); ! allTest.println( " TestSuite suite= new TestSuite(\"All CDChamber Tests\");"); } ! static void postfix() { ! allTest.println( " return suite;"); ! allTest.println( " }"); ! allTest.println( "}"); } } --- 58,79 ---- } ! static String prefix() { ! String result = ""; ! result += "import junit.framework.*;\n"; ! result += "public class AllTests {\n"; ! result += " public static void main (String[] args) {\n"; ! result += " junit.textui.TestRunner.run (suite());\n"; ! result += " }\n"; ! result += " public static Test suite ( ) {\n"; ! result += " TestSuite suite= new TestSuite(\"All CDChamber Tests\");\n"; ! return result; } ! static String postfix() { ! String result = ""; ! result += " return suite;\n"; ! result += " }\n"; ! result += "}\n"; ! return result; } } |