Update of /cvsroot/javaprofiler/test/snapshot
In directory usw-pr-cvs1:/tmp/cvs-serv18032
Added Files:
TestNoSwing.java build.xml run3.bat
Log Message:
the test, that doesn't require X console
--- NEW FILE: TestNoSwing.java ---
/* Some test, that doesn't require X console
*/
import java.util.*;
class TestNoSwing {
Set set;
List list;
TestNoSwing() {
set = new HashSet();
list = new ArrayList();
};
void initSet() {
int i;
for (i = 1; i < 1000; i++) {
set.add( new Double(Math.random()) );
}
};
void initList() {
Iterator it=set.iterator();
Double d;
while ( it.hasNext() ) {
d = (Double) it.next();
list.add( d );
}
};
void sort() {
SortedSet tree=new TreeSet();
Iterator it=list.iterator();
Double d;
while ( it.hasNext() ) {
d = (Double) it.next();
tree.add( d );
}
it=list.iterator();
while ( it.hasNext() ) {
d = (Double) it.next();
//System.out.print( d + " ");
}
}
public static void main( String[] arg ) {
TestNoSwing a = new TestNoSwing();
int i;
System.out.println( "Start" );
for (i = 1; i < 20; i++) {
a.initSet();
a.initList();
a.sort();
System.out.print( i + " " );
}
System.out.println( "end" );
}
}
--- NEW FILE: build.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="compile" name="test jpiimpl">
<target name="init">
<tstamp/>
<!-- You can set up any variables you want used throughout the script here. -->
<!-- configuration ************************************************** -->
<!-- Common classpath -->
<path id="project.classpath">
<pathelement location="../../jpiimpl/jpiimpl.jar"/>
</path>
</target>
<target name="compile" depends="init" description="Compile .java files">
<property name="cp" refid="project.classpath"/>
<echo message="Classpath is ${cp}"/>
<javac classpathref="project.classpath" debug="true" failonerror="true">
<src>
<pathelement location="."/>
</src>
</javac>
</target>
<target name="all" depends="init,compile" description="Build everything.">
<echo message="Application built. "/>
</target>
<!-- <target name="test" depends="init,all" description="Try running it.">
<java classname="" fork="true" failonerror="true">
<classpath>
<pathelement location="."/>
</classpath> -->
<!-- Pass some args, perhaps: -->
<!--<arg value="-myfile"/> -->
<!-- Will be given as an absolute path: -->
<!-- <arg file="myfile.txt"/> -->
<!-- </java>
</target> -->
<target name="clean" depends="init" description="Clean all build products.">
<delete>
<fileset dir=".">
<include name="*.class"/>
</fileset>
</delete>
</target>
</project>
--- NEW FILE: run3.bat ---
SET JAVA_HOME=d:\j2sdk1.4.0-rc
rem **************************
SET CLASSPATH=.;%CLASSPATH%
set path=%JAVA_HOME%\bin;%path%
java -Xrun..\..\library\src\profiler\profiler:commun_type=socket TestNoSwing > out3.txt
|