summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-04-20 15:53:25 +0000
committermichelou <michelou@epfl.ch>2006-04-20 15:53:25 +0000
commitaec0da2eadadcdb5e0320db477cf699e6e94ac3e (patch)
tree472c32c739f08fb41647f8acf731f758ed06c7ef /test
parent5fe735b785e0d57f574809ad29dbc52273875156 (diff)
downloadscala-aec0da2eadadcdb5e0320db477cf699e6e94ac3e.tar.gz
scala-aec0da2eadadcdb5e0320db477cf699e6e94ac3e.tar.bz2
scala-aec0da2eadadcdb5e0320db477cf699e6e94ac3e.zip
added CLI tests for Jikes and the J9 VM (IBM)
Diffstat (limited to 'test')
-rwxr-xr-xtest/clitest99
-rw-r--r--test/files/cli/test1/Main.check.j9vm54
-rw-r--r--test/files/cli/test1/Main.check.jikes3
-rw-r--r--test/files/cli/test1/Main.check.scalac86
-rw-r--r--test/files/cli/test1/Main.check.scalaint82
-rw-r--r--test/files/cli/test2/Main.check.j9vm54
-rw-r--r--test/files/cli/test2/Main.check.jikes9
-rw-r--r--test/files/cli/test2/Main.check.scalac86
-rw-r--r--test/files/cli/test2/Main.check.scalaint82
-rw-r--r--test/files/cli/test3/Main.check.j9vm55
-rw-r--r--test/files/cli/test3/Main.check.jikes14
-rw-r--r--test/files/cli/test3/Main.check.scalac86
-rw-r--r--test/files/cli/test3/Main.check.scalaint82
13 files changed, 354 insertions, 288 deletions
diff --git a/test/clitest b/test/clitest
index f2e43aecbc..c2055af9fa 100755
--- a/test/clitest
+++ b/test/clitest
@@ -87,7 +87,9 @@ test_print_help() {
echo '--installed use the installed programs on $PATH'
echo "--debug redirect all outputs to standard output";
echo "--info display information messages";
- echo "--java run same tests for Java";
+ echo "--javac run same tests with the Sun Java compiler";
+ echo "--jikes run same tests with the IBM Java compiler";
+ echo "--jredir=<dir> specify the Sun JRE installation directory (jikes)";
echo "--objdir=<dir> specify where to place generated files";
echo "--verbose display verbose messages";
echo "--help, -? display this help and exit";
@@ -116,6 +118,8 @@ test_diff() {
$DIFF $check $TMP_FILE > $DIFF_FILE
if [ -n "`cat $DIFF_FILE`" ] ; then
printf_outline "\\nDifferences between check and log files:\\n";
+ file=`echo $check | sed -e "s#$PREFIX/##g"`;
+ printf "$file\\n";
cat $DIFF_FILE;
fi
}
@@ -127,14 +131,7 @@ test_compile() {
info="$1"; shift 1;
[ -d "$OUTPUT_DIR" ] || mkdir -p $OUTPUT_DIR;
[ -f "$LOG_FILE" ] && rm $LOG_FILE;
-
- if [ "$LANG" = "java" ] ; then
- suffix=".javac"
- elif [ "$LANG" = "java5" ] ; then
- suffix=".javac5";
- else
- suffix=".scalac"
- fi
+ suffix=".$COMPILER"
file=`echo $source | sed -e "s#$PREFIX/##g"`;
if [ "$LEVEL" = "info" ] || [ "$LEVEL" = "verbose" ] ; then
@@ -144,22 +141,22 @@ test_compile() {
printf "\\n";
printf "Compile $file ($info) with unknown option '-dd'\\n"
- test_run "env CLASSPATH= $SCALAC -dd $OUTPUT_DIR $source 2>> $LOG_FILE";
+ test_run "env CLASSPATH= $COMPILER_COMMAND -dd $OUTPUT_DIR $source 2>> $LOG_FILE 1>> $LOG_FILE";
printf "Compile $file ($info) with no classpath information\\n"
- test_run "env CLASSPATH= $SCALAC -d $OUTPUT_DIR $source 2>> $LOG_FILE";
+ test_run "env CLASSPATH= $COMPILER_COMMAND -d $OUTPUT_DIR $source 2>> $LOG_FILE 1>> $LOG_FILE";
printf "Compile $file ($info) with variable CLASSPATH\\n"
- test_run "env CLASSPATH=$OUTPUT_DIR $SCALAC \
- -d $OUTPUT_DIR $source 2>> $LOG_FILE";
+ test_run "env CLASSPATH=$OUTPUT_DIR $COMPILER_COMMAND \
+ -d $OUTPUT_DIR $source 2>> $LOG_FILE 1>> $LOG_FILE";
printf "Compile $file ($info) with option -classpath\\n"
- test_run "env CLASSPATH= $SCALAC -classpath $OUTPUT_DIR \
- -d $OUTPUT_DIR $source 2>> $LOG_FILE";
+ test_run "env CLASSPATH= $COMPILER_COMMAND -classpath $OUTPUT_DIR \
+ -d $OUTPUT_DIR $source 2>> $LOG_FILE 1>> $LOG_FILE";
printf "Compile $file ($info) with current directory as default classpath\\n"
test_run "(cd $OUTPUT_DIR &&
- env CLASSPATH= $SCALAC $source 2>> $LOG_FILE)";
+ env CLASSPATH= $COMPILER_COMMAND $source 2>> $LOG_FILE 1>> $LOG_FILE)";
test_diff "$check$suffix" "$LOG_FILE";
@@ -173,6 +170,8 @@ test_execute() {
[ $# = 2 ] || abort "internal error";
main="$1"; shift 1;
check="$1"; shift 1;
+ suffix=".$LANG"
+
[ -f "$LOG_FILE" ] && rm $LOG_FILE;
printf "\\n";
@@ -190,40 +189,40 @@ test_execute() {
printf "Execute $main with current directory as default classpath\\n"
test_run "(cd $OUTPUT_DIR &&
- env CLASSPATH= $SCALA $main 3 2>> $LOG_FILE 1>> $LOG_FILE)";
+ env CLASSPATH= $RUNTIME_COMMAND $main 3 2>> $LOG_FILE 1>> $LOG_FILE)";
- test_diff "$check.scala" "$LOG_FILE";
+ test_diff "$check$suffix" "$LOG_FILE";
}
test_interpret() {
[ $# = 2 ] || abort "internal error";
main="$1"; shift 1;
check="$1"; shift 1;
- ([ "$LANG" = "java" ] || [ "$LANG" = "java5" ]) && return;
+ [ "$LANG" = "scala" ] || return;
[ -f "$LOG_FILE" ] && rm $LOG_FILE;
printf "\\n"
printf "Interpret $main with unknown option '-cpp'\\n"
test_run "(env CLASSPATH= \
- printf $main'.main(Array(\"0\"))\n:q' | $SCALAINT \
+ printf $main'.main(Array(\"0\"))\n:q' | $INTERPRETER_COMMAND \
-cpp $OUTPUT_DIR 2>> $LOG_FILE 1>> $LOG_FILE)";
printf "\\n" >> $LOG_FILE # newline
printf "Interpret $main with variable CLASSPATH\\n"
test_run "(env CLASSPATH=$OUTPUT_DIR \
- printf $main'.main(Array(\"1\"))\n:q' | $SCALAINT \
+ printf $main'.main(Array(\"1\"))\n:q' | $INTERPRETER_COMMAND \
2>> $LOG_FILE 1>> $LOG_FILE)";
printf "\\n" >> $LOG_FILE # newline
printf "Interpret $main with option -classpath\\n"
test_run "(env CLASSPATH= \
- printf $main'.main(Array(\"2\"))\n:q' | $SCALAINT \
+ printf $main'.main(Array(\"2\"))\n:q' | $INTERPRETER_COMMAND \
-classpath $OUTPUT_DIR 2>> $LOG_FILE 1>> $LOG_FILE)";
printf "\\n" >> $LOG_FILE # newline
printf "Interpret $main with current directory as default classpath\\n"
test_run "(cd $OUTPUT_DIR &&
- printf $main'.main(Array(\"3\"))\n:q' | $SCALAINT \
+ printf $main'.main(Array(\"3\"))\n:q' | $INTERPRETER_COMMAND \
2>> $LOG_FILE 1>> $LOG_FILE)";
printf "\\n" >> $LOG_FILE # newline
@@ -282,7 +281,8 @@ case `uname` in
esac;
DEBUG="";
-LANG="";
+LANG="scala";
+COMPILER="scalac";
LEVEL="";
while [ $# -gt 0 ]; do
case "$1" in
@@ -290,7 +290,9 @@ while [ $# -gt 0 ]; do
--quick ) BIN_DIR="$QUICK"; shift 1;;
--installed) BIN_DIR=""; shift 1;;
--info ) LEVEL="info"; shift 1;;
- --java ) LANG="java"; shift 1;;
+ --javac ) LANG="java"; COMPILER="javac"; shift 1;;
+ --jikes ) LANG="java"; COMPILER="jikes"; shift 1;;
+ --jredir=* ) JRE_DIR=`expr "$1" : "--jredir=\(.*\)"`; shift 1;;
--objdir=* ) OUTPUT_DIR=`expr "$1" : "--objdir=\(.*\)"`; shift 1;;
--verbose ) LEVEL="verbose"; shift 1;;
--help ) test_print_help; exit 0;;
@@ -300,31 +302,44 @@ while [ $# -gt 0 ]; do
esac;
done;
-SCALA="${BIN_DIR}scala"
-SCALAC="${BIN_DIR}scalac"
-SCALAINT="${BIN_DIR}scalaint"
-SUFFIX=".scala"
-
-if [ "$LANG" = "java" ] ; then
- SCALAC=`which javac`
- BIN_DIR=`dirname $SCALAC`
- SCALA=$BIN_DIR/java
+if [ "$LANG" = "scala" ]; then
+ RUNTIME_COMMAND="${BIN_DIR}scala"
+ COMPILER_COMMAND="${BIN_DIR}$COMPILER"
+ INTERPRETER_COMMAND="${BIN_DIR}scalaint"
+ SUFFIX=".scala"
+elif [ "$LANG" = "java" ]; then
+ RUNTIME_COMMAND=`which java`
+ COMPILER_COMMAND=`which $COMPILER`
+ BIN_DIR=`dirname $COMPILER_COMMAND`
SUFFIX=".java"
+else
+ abort "unknown language '$LANG'"
fi
-[ -x "$SCALAC" ] || ( printf "Command $SCALAC not found\\n"; exit 1 );
+[ -x "$COMPILER_COMMAND" ] || ( printf "Command $COMPILER_COMMAND not found\\n"; exit 1 );
printf_initialization "${COLOR:-many}";
printf_outline "Output directory is : $OUTPUT_DIR\\n";
-if [ "$LANG" = "java" ] ; then
- printf_outline "Java binaries in : $BIN_DIR\\n";
-else
- printf_outline "Scala binaries in : $BIN_DIR\\n";
-fi
+printf_outline "Compiler command is : $COMPILER_COMMAND\\n";
+printf_outline "Runtime command is : $RUNTIME_COMMAND\\n";
+
jvm_version=`${JAVACMD:=java} -version 2>&1 | head -3 | tail -1`
printf_outline "Java runtime is : $jvm_version\\n";
-
-[ `echo "$jvm_version" | grep -c "1.5"` = "1" ] && LANG="java5";
+if [ "$LANG" = "java" ]; then
+ [ `echo "$jvm_version" | grep -c "J9"` = "1" ] && LANG="j9vm";
+ if [ "$COMPILER" = "jikes" ]; then
+ if [ "$LANG" = "java" ]; then
+ jre_home=`dirname $SCALA`/..;
+ elif [ -n "$JRE_DIR" ]; then
+ jre_home=$JRE_DIR;
+ else
+ abort "Jikes requires Sun JVM (use option '--jredir')";
+ fi;
+ cpath=`find $jre_home -name "rt.jar"`;
+ COMPILER_COMMAND="${COMPILER_COMMAND} -bootclasspath $cpath";
+ fi;
+ [ `echo "$jvm_version" | grep -c "1.5"` = "1" ] && LANG="${LANG}5";
+fi
##############################################################################
# Variables
diff --git a/test/files/cli/test1/Main.check.j9vm5 b/test/files/cli/test1/Main.check.j9vm5
new file mode 100644
index 0000000000..de454ef478
--- /dev/null
+++ b/test/files/cli/test1/Main.check.j9vm5
@@ -0,0 +1,4 @@
+env: -cpp: No such file or directory
+env: test1.Main: No such file or directory
+env: -cp: No such file or directory
+1: test 3 passed
diff --git a/test/files/cli/test1/Main.check.jikes b/test/files/cli/test1/Main.check.jikes
new file mode 100644
index 0000000000..cd891689db
--- /dev/null
+++ b/test/files/cli/test1/Main.check.jikes
@@ -0,0 +1,3 @@
+Error: "-dd" is an invalid option.
+use: jikes [options] [@files] file.java...
+For more help, try -help or -version.
diff --git a/test/files/cli/test1/Main.check.scalac b/test/files/cli/test1/Main.check.scalac
index 42ef754181..3f3244da74 100644
--- a/test/files/cli/test1/Main.check.scalac
+++ b/test/files/cli/test1/Main.check.scalac
@@ -1,46 +1,48 @@
-scalac error: unknown option: '-dd'
- scalac -help gives more information
+Scala compiler error: unknown option: '-dd'
+ Scala compiler -help gives more information
Usage: scalac <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
one error found
diff --git a/test/files/cli/test1/Main.check.scalaint b/test/files/cli/test1/Main.check.scalaint
index 99224cae31..f19606ede5 100644
--- a/test/files/cli/test1/Main.check.scalaint
+++ b/test/files/cli/test1/Main.check.scalaint
@@ -1,46 +1,48 @@
scalaint: unknown option: '-cpp'
Usage: scalaint <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
This is an interpreter for Scala.
diff --git a/test/files/cli/test2/Main.check.j9vm5 b/test/files/cli/test2/Main.check.j9vm5
new file mode 100644
index 0000000000..8f4fdf8aa1
--- /dev/null
+++ b/test/files/cli/test2/Main.check.j9vm5
@@ -0,0 +1,4 @@
+env: -cpp: No such file or directory
+env: test2.Main: No such file or directory
+env: -cp: No such file or directory
+2: 1: test 3 passed
diff --git a/test/files/cli/test2/Main.check.jikes b/test/files/cli/test2/Main.check.jikes
new file mode 100644
index 0000000000..44131b22c2
--- /dev/null
+++ b/test/files/cli/test2/Main.check.jikes
@@ -0,0 +1,9 @@
+Error: "-dd" is an invalid option.
+use: jikes [options] [@files] file.java...
+For more help, try -help or -version.
+
+Found 1 semantic error compiling "files/cli/test2/Main.java":
+
+ 5. test1.Main.main(args);
+ ^---^
+*** Semantic Error: No accessible field named "test1" was found in type "test2.Main".
diff --git a/test/files/cli/test2/Main.check.scalac b/test/files/cli/test2/Main.check.scalac
index 2cf40d5de8..ab0b5c66da 100644
--- a/test/files/cli/test2/Main.check.scalac
+++ b/test/files/cli/test2/Main.check.scalac
@@ -1,47 +1,49 @@
-scalac error: unknown option: '-dd'
- scalac -help gives more information
+Scala compiler error: unknown option: '-dd'
+ Scala compiler -help gives more information
Usage: scalac <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
one error found
files/cli/test2/Main.scala:5 error: not found: value test1
diff --git a/test/files/cli/test2/Main.check.scalaint b/test/files/cli/test2/Main.check.scalaint
index 2719b50b7d..69bc170c4c 100644
--- a/test/files/cli/test2/Main.check.scalaint
+++ b/test/files/cli/test2/Main.check.scalaint
@@ -1,46 +1,48 @@
scalaint: unknown option: '-cpp'
Usage: scalaint <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
This is an interpreter for Scala.
diff --git a/test/files/cli/test3/Main.check.j9vm5 b/test/files/cli/test3/Main.check.j9vm5
new file mode 100644
index 0000000000..a094dc8daf
--- /dev/null
+++ b/test/files/cli/test3/Main.check.j9vm5
@@ -0,0 +1,5 @@
+env: -cpp: No such file or directory
+env: test3.Main: No such file or directory
+env: -cp: No such file or directory
+3: 1: test 3 passed
+3: 2: 1: test 3 passed
diff --git a/test/files/cli/test3/Main.check.jikes b/test/files/cli/test3/Main.check.jikes
new file mode 100644
index 0000000000..d183a014d9
--- /dev/null
+++ b/test/files/cli/test3/Main.check.jikes
@@ -0,0 +1,14 @@
+Error: "-dd" is an invalid option.
+use: jikes [options] [@files] file.java...
+For more help, try -help or -version.
+
+Found 2 semantic errors compiling "files/cli/test3/Main.java":
+
+ 5. test1.Main.main(args);
+ ^---^
+*** Semantic Error: No accessible field named "test1" was found in type "test3.Main".
+
+
+ 7. test2.Main.main(args);
+ ^---^
+*** Semantic Error: No accessible field named "test2" was found in type "test3.Main".
diff --git a/test/files/cli/test3/Main.check.scalac b/test/files/cli/test3/Main.check.scalac
index 71d2ab1cbd..ddddcb3d9a 100644
--- a/test/files/cli/test3/Main.check.scalac
+++ b/test/files/cli/test3/Main.check.scalac
@@ -1,47 +1,49 @@
-scalac error: unknown option: '-dd'
- scalac -help gives more information
+Scala compiler error: unknown option: '-dd'
+ Scala compiler -help gives more information
Usage: scalac <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
one error found
files/cli/test3/Main.scala:5 error: not found: value test1
diff --git a/test/files/cli/test3/Main.check.scalaint b/test/files/cli/test3/Main.check.scalaint
index 9b5d479db0..2fdf9c927a 100644
--- a/test/files/cli/test3/Main.check.scalaint
+++ b/test/files/cli/test3/Main.check.scalaint
@@ -1,46 +1,48 @@
scalaint: unknown option: '-cpp'
Usage: scalaint <options | source files>
where possible options include:
- -doc Generate documentation
- -g Generate debugging info
- -nowarn Generate no warnings
- -noassert Generate no assertions and assumptions
- -verbose Output messages about what the compiler is doing
- -classpath <path> Specify where to find user class files
- -sourcepath <path> Specify where to find input source files
- -bootclasspath <path> Override location of bootstrap class files
- -extdirs <dirs> Override location of installed extensions
- -d <directory> Specify where to place generated class files
- -encoding <encoding> Specify character encoding used by source files
- -target:<target> Specify which backend to use (jvm,msil)
- -migrate Assist in migrating from Scala version 1.0
- -debug Output debugging messages
- -statistics Print compiler statistics
- -explaintypes Explain type errors in more detail
- -resident Compiler stays resident, files to compile are read from standard input
- -uniqid Print identifiers with unique names (debugging option)
- -printtypes Print tree types (debugging option)
- -prompt Display a prompt after each error (debugging option)
- -noimports Compile without any implicit imports
- -nopredefs Compile without any implicit predefined values
- -skip:<phase> Skip <phase>
- -check:<phase> Check the tree at start of <phase>
- -print:<phase> Print out program after <phase>
- -printer:<printer> Printer to use (text,html)
- -printfile <file> Specify file in which to print trees
- -graph:<phase> Graph the program after <phase>
- -browse:<phase> Browse the abstract syntax tree after <phase>
- -stop:<phase> Stop after phase <phase>
- -log:<phase> Log operations in <phase>
- -version Print product version and exit
- -help Print a synopsis of standard options
- -Xinline Perform inlining when possible
- -Xshowcls <class> Show class info
- -Xshowobj <object> Show object info
- -Xshowicode Print the generated ICode
- -Xgadt enable gadt for classes
- -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
- -Xgenerics Use generic Java types
+ -doc Generate documentation
+ -g Generate debugging info
+ -nowarn Generate no warnings
+ -noassert Generate no assertions and assumptions
+ -verbose Output messages about what the compiler is doing
+ -classpath <path> Specify where to find user class files
+ -sourcepath <path> Specify where to find input source files
+ -bootclasspath <path> Override location of bootstrap class files
+ -extdirs <dirs> Override location of installed extensions
+ -d <directory> Specify where to place generated class files
+ -encoding <encoding> Specify character encoding used by source files
+ -windowtitle <windowtitle> Specify window title of generated HTML documentation
+ -documenttitle <documenttitle> Specify document title of generated HTML documentation
+ -target:<target> Specify which backend to use (jvm,msil)
+ -migrate Assist in migrating from Scala version 1.0
+ -debug Output debugging messages
+ -statistics Print compiler statistics
+ -explaintypes Explain type errors in more detail
+ -resident Compiler stays resident, files to compile are read from standard input
+ -uniqid Print identifiers with unique names (debugging option)
+ -printtypes Print tree types (debugging option)
+ -prompt Display a prompt after each error (debugging option)
+ -noimports Compile without any implicit imports
+ -nopredefs Compile without any implicit predefined values
+ -skip:<phase> Skip <phase>
+ -check:<phase> Check the tree at start of <phase>
+ -print:<phase> Print out program after <phase>
+ -printer:<printer> Printer to use (text,html)
+ -printfile <file> Specify file in which to print trees
+ -graph:<phase> Graph the program after <phase>
+ -browse:<phase> Browse the abstract syntax tree after <phase>
+ -stop:<phase> Stop after phase <phase>
+ -log:<phase> Log operations in <phase>
+ -version Print product version and exit
+ -help Print a synopsis of standard options
+ -Xinline Perform inlining when possible
+ -Xshowcls <class> Show class info
+ -Xshowobj <object> Show object info
+ -Xshowicode Print the generated ICode
+ -Xgadt enable gadt for classes
+ -Xlinearizer:<Xlinearizer> Linearizer to use (normal,dfs,rpo)
+ -Xgenerics Use generic Java types
This is an interpreter for Scala.