# pth test script
#
# This file is a test script for pth (Polyglot Test Harness). It
# conforms to the following grammar.
#
#      ScriptFile   ::= CompilerTest+
#      CompilerTest ::= ExtClassName ["CmdLineArgs"] { FileTest [; FileTest]* }
#                    |  javac ["CmdLineArgs"] { FileTestNoFailure [; FileTestNoFailure]* }
#      FileTest     ::= Filenames [Description] [FailureSet]
#      FileTestNoFailure ::= Filenames [Description]
#      Filenames    ::= Filename [Filename]*
#      Description  ::= LitString
#      FailureSet   ::= Failure [, Failure]*
#      Failure      ::= ( ErrorKind )
#                    |  ( ErrorKind, "RegExp" )
#                    |  ( "RegExp" )
#                    |  ( )
#      ErrorKind    :   one of, or a unique prefix of one of the following 
#                       strings: "Warning", "Internal Error", "I/O Error", 
#                       "Lexical Error", "Syntax Error", "Semantic Error"
#                       or "Post-compiler Error".
#      Filename     :   the name of a file. Is interpreted from the 
#                       directory where pth is run.
#      LitString    :   a literal string, enclosed in quotes.
#      RegExp       :   a regular expression, as in java.util.regex; 
#                       is always enclosed in quotes.
#      CmdLineArgs  :   additional command line args for the Polyglot 
#                       compiler; is always enclosed in quotes.

# Compile some java classes first
#javac "-d java-out -cp ." {
#}
 
polyglot.ext.jl7.JL7ExtensionInfo "-d out -classpath java-out -assert -noserial -postopts \"-source 1.7 -Xlint\\:-options\" -morepermissiveinference" {
	Diamond01.jl7;
	Diamond02.jl7 (Semantic, "type arguments cannot be used");
	Diamond03.jl7 (Semantic, "anonymous class");
	Diamond04.jl7 (Semantic, "not generic");
	Diamond05.jl7 (Semantic, "not generic");
	Diamond06.jl7;
	Diamond07.jl7;
	Diamond08.jl7;
	Diamond09.jl7;
	Diamond10.jl7;
	FloatLit01.jl7;
	IntLit01.jl7;
	IntLit02.jl7 (Syntax), (Syntax),(Syntax),(Syntax);
	IntLit02a.jl7 (Syntax);
	IntLit02b.jl7 ("Could not find") , ("Could not find"); // 2 errors
	IntLit02c.jl7 (Syntax);
	IntLit03.jl7;
	IntLit04.jl7 ("out of range"),("unexpected .* literal"), 
	             ("out of range"),("unexpected .* literal"), 
	             ("out of range"),("out of range"),("out of range"),
	             ("out of range"),("unexpected .* literal"), 
	             ("out of range"),("unexpected .* literal"); // 11 errors
	MultiCatch01.jl7;
	MultiCatch02.jl7 (Semantic);
	MultiCatch03.jl7 (Semantic);
	MultiCatch04.jl7 (Semantic);
	MultiCatch05.jl7;
	Rethrow01.jl7;
	Rethrow02.jl7;
	Rethrow03.jl7 (Semantic);
	Switch01.jl7;
	Switch02.jl7;
	TryWithResources01.jl7;
	TryWithResources02.jl7 (Semantic, "multiply defined");
	TryWithResources03.jl7 (Semantic, "AutoCloseable");
	TryWithResources04.jl7;
	TryWithResources05.jl7;
	TryWithResources06.jl7 (Semantic, "exception .* caught or declared");
	TryWithResources07.jl7 (Semantic, "exception .* caught or declared");
	TryWithResources08.jl7;
}
