Commit eac1252a authored by uwdkn's avatar uwdkn

Merge branch 'group1-more-semantic-tests' into 'master'

More semantic tests

See merge request !38
parents 474e08ac 4bca131e
class ArrayAccessNotAStatement {
public int[] test;
public static void main(String[] args) {
}
public void foo() {
test[1];
}
}
class Test {
public static void main(String[] args) {
int foo = 0;
int bar = foo[12];
}
}
class Test {
public static void main(String[] args) {
}
public void foo(int a) {
a = 5;
}
}
class BooleanConstantNotAStatement {
public static void main(String[] args) {
true;
}
}
class Test {
public static void main(String[] args) {
Test test = new Test();
if (null == test) {
return;
}
}
}
class Test {
public static void main(String[] args) {
Test test = new Test();
if (test == null) {
return;
}
}
}
class Test {
public static void main(String[] args) {
}
public void test() {
Foo foo = new Foo();
foo.bar(this);
}
}
class Foo {
public void bar(Test test) {
test.test();
}
}
class FieldAccessNotAStatement {
public int test;
public static void main(String[] args) {
test;
}
}
class FieldAccessWithoutThis {
public static void main(String[] args) {
new FieldAccessWithoutThis().test();
}
public int field;
public void test() {
field = 10;
}
}
class Test {
public static void main(String[] args) {
foo();
}
public void foo() {
}
}
class IllegalThisInStaticMethod {
public static void main(String[] args) {
IllegalThisInStaticMethod a = this;
}
}
class IntegerConstantNotAStatement {
public static void main(String[] args) {
1;
}
}
class IntegerTooLarge {
public static void main(String[] args) {
int large = 100000000000;
}
}
class InvalidAssignToMainParameter {
public static void main(String[] test) {
test = new String[5];
}
}
class String {
}
class Test {
public static void main(String[] args) {
if (1234) {
return;
}
}
}
class Test {
public static void main(String[] args) {
while (1234) {
return;
}
}
}
class InvalidNullInteger {
public static void main(String[] args) {
int notNull = null;
}
}
class Test {
public static void main(String[] args) {
Test test = new Test();
if (test) {
return;
}
}
}
class Test {
public static void main(String[] args) {
Test test = new Test();
while (test) {
return;
}
}
}
class Test {
public static void main(String[] args) {
new Test().foo();
}
public void foo() {
this = new Test();
}
}
class Test {
public static void main(String[] args) {
int test = !1;
}
}
class Test {
public static void main(String[] args) {
boolean test = -false;
}
}
class Test {
public static void main(String[] args) {
Test[][][] a = new Test[1][][];
Test[][] b = a[0];
Test[] c = b[0];
Test d = c[0];
}
}
class Test {
public static void main(String[] args) {
Test[][] test = new Test[1][];
}
}
class NotAStatementInElse {
public static void main(String[] args) {
}
public void foo() {
if (true) {
bar();
} else 1 && 1;
}
public void bar() {
}
}
class NotAStatementInIf {
public static void main(String[] args) {
}
public void foo() {
if (true) 1;
}
}
class NotAStatementInWhile {
public static void main(String[] args) {
}
public void foo() {
int a = 5;
while (true) a;
}
}
class NotAStatementNestedFunctionCall {
public static void main(String[] args) {
}
public void foo() {
true && bar();
}
public void bar() {
}
}
class NullConstantNotAStatement {
public static void main(String[] args) {
null;
}
}
class RedefineMainParameter {
public static void main(String[] args) {
int args = 0;
}
}
class TooManyArguments {
public static void main(String[] args) {
}
public void test() {
foo (1,2,3);
}
public void foo(int a) {
}
}
class UndefinedClass {
public Undefined test;
public static void main(String[] args) {
}
}
class UndefinedField {
public static void main(String[] args) {
new UndefinedField().undefined = 5;
}
}
class UndefinedMethod {
public static void main(String[] args) {
}
public void foo() {
undefined();
}
}
class UndefinedMethodOnClass {
public static void main(String[] args) {
new UndefinedMethodOnClass().undefined();
}
}
class UnexpectedReturnValue {
public static void main(String[] args) {
}
public void test() {
return 1;
}
}
class VariableAccessNotAStatement {
public static void main(String[] args) {
int test = 5;
test;
}
}
class VariableCanBeUninitialized {
public static void main(String[] args) {
Foo foo;
foo.bar();
}
}
class Foo {
public void bar() {
}
}
class Test {
public static void main(String[] args) {
void[] test;
}
}
class VoidCannotBeArrayType {
public static void main(String[] args) {
void[] invalid = new void[5];
}
}
class WrongArgumentType {
public static void main(String[] args) {
}
public void test() {
foo (1);
}
public void foo(boolean a) {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment