Skip to content

Commit

Permalink
TEST: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
egorklementev committed Feb 27, 2022
1 parent b607141 commit fdc6a9c
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/eotree/data/EOBoolData.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package eotree.data

import java.util.*

/**
* EBNF representation:
* `
* TRUE | FALSE
` *
*/
class EOBoolData(var b: Boolean) : EOData() {
override fun generateEO(indent: Int): String {
return indent(indent) + b.toString().uppercase(Locale.getDefault())
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

public class SimpleLexicalLiterals {

public static void main(String[] args) {
int v1 = 5;
long v2 = 5L;
long v3 = 5l;
float v4 = 5.0f;
float v5 = 5.0F;
double v6 = 5.0;
boolean v7 = v1 == v2;
char v8 = '5';
String v9 = "5";
Object v10 = null;
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
public class SimpleClassMembers {
public static void main(String[] args) {
ColoredPoint c = new ColoredPoint(0, 0);
c.reset();
System.out.println("passed");
}
}

class Point {
int x, y;
private Point() { reset(); }
Point(int x, int y) { this.x = x; this.y = y; }
void reset() { this.x = 0; this.y = 0; }
}

class ColoredPoint extends Point {
int color;
ColoredPoint(int x, int y) { super(x, y); color = 0; }
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class SimpleMethod {

static void method () {}

public static void main(String[] args) {
method();
System.out.println("passed");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class SimpleParameterMethod {

static void method (String param) {}

public static void main(String[] args) {
method("param 1");
System.out.println("passed");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class FloatLiteral {

public static void main(String[] args) {
float a = 1f;
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class IntegerLiteral {

public static void main(String[] args) {
int a = 1;
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class MethodClassMember {

int func() { return 0; }

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class PrimitiveClassMember {

int a;

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleFieldInit {

int a = 2 + 2 * (2 - (2 - 2));

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleMethod{

int method() { return -1; }

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleParametrizedMethod {

void method(int a, int b) {}

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleVoidMethod{

void method() {}

public static void main(String[] args) {
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleInnerClass {

public static void main(String[] args) {
System.out.println("passed");
}

class InnerClass {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SimpleInnerInterface {

public static void main(String[] args) {
System.out.println("passed");
}

interface InnerInterface {}
}

0 comments on commit fdc6a9c

Please sign in to comment.