Skip to content

Commit

Permalink
TEST: test addition
Browse files Browse the repository at this point in the history
  • Loading branch information
egorklementev committed Feb 28, 2022
1 parent c7dc10b commit 0efbaa9
Show file tree
Hide file tree
Showing 69 changed files with 630 additions and 78 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<br>

[![Gradle Build](https://github.com/polystat/j2eo/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/polystat/j2eo/actions/workflows/gradle-build.yml)
![LINE](https://img.shields.io/badge/line--coverage-33,10%25-red.svg)
![BRANCH](https://img.shields.io/badge/branch--coverage-23,49%25-red.svg)
![COMPLEXITY](https://img.shields.io/badge/complexity-6,34-brightgreen.svg)
![LINE](https://img.shields.io/badge/line--coverage-35,45%25-red.svg)
![BRANCH](https://img.shields.io/badge/branch--coverage-25,44%25-red.svg)
![COMPLEXITY](https://img.shields.io/badge/complexity-6,02-brightgreen.svg)

This is a translator of **Java** programming language to [EOLANG](https://www.eolang.org) programming language.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
public class MultipleVarsSwitch {
public static void main(String[] args) {
int a = 5;
switch (a) {
case 0:
case 1:
case 2:
case 3:
System.out.println("not passed");
break;
default:
System.out.println("passed");
break;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class NestedIf {
public static void main(String[] args) {
boolean truth = true;
if (truth) {
if (truth) {
System.out.println("passed");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class IfElseIfElse {
public static void main(String[] args) {
boolean lie = false;
if (lie) {
System.out.println("not passed");
} else if (lie && false) {
System.out.println("not passed");
} else {
System.out.println("passed");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
public class SimpleIfElse {
public static void main(String[] args) {
boolean lie = false;
if (lie) {
System.out.println("not passed");
} else {
if (lie) {
System.out.println("not passed");
} else {
System.out.println("passed");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class ArrayPostfixIncrement {

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

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

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

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

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

public static void main(String[] args) {
int a = 5;
int b = a--;
int[] a = new int[] { -1 };
int b = -a[0];
System.out.println(b);
System.out.println("passed");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class ArrayBitwiseComplement {

public static void main(String[] args) {
int[] a = new int[] { 115 };
int b = ~a[0];
int c = (-a[0]) - 1;
System.out.println(b == c);
System.out.println("passed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class PrivateRecordClass {
public static void main(String[] args) {
Person p = new Person("Mike", "Innopolis");
System.out.println(p.name());
System.out.println(p.address());
System.out.println("passed");
}
}
private record Person (String name, String address) {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class ProtectedRecordClass {
public static void main(String[] args) {
Person p = new Person("Mike", "Innopolis");
System.out.println(p.name());
System.out.println(p.address());
System.out.println("passed");
}
}
protected record Person (String name, String address) {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class ProtectedRecordClass {
public static void main(String[] args) {
Person p = new Person("Mike", "Innopolis");
System.out.println(p.name());
System.out.println(p.address());
System.out.println("passed");
}
}
public record Person (String name, String address) {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class SimpleRecordClass {
public static void main(String[] args) {
Person p = new Person("Mike", "Innopolis");
System.out.println(p.name());
System.out.println(p.address());
System.out.println("passed");
}
}
record Person (String name, String address) {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public class DoubleGenericClass {

public static void main(String[] args) {
Generic<String, Integer> g = new Generic<String, Integer>();
g.method("passed", 123);
}
}

class Generic<T, K> {
void method(T arg1, K arg2) {
System.out.println((Integer)arg2);
System.out.println((String)arg1);

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

private static int var = 2;

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

protected static int var = 2;

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

public static int var = 2;

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

private static final int var = 2;

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

protected static final int var = 2;

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

public static final int var = 2;

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

private 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 ProtectedStaticMethod {

protected 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 PublicStaticMethod {

public 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,9 @@
public class PrivateGenericMethod {

private static <T> void method(T param) {}

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

protected static <T> void method(T param) {}

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

public static <T> void method(T param) {}

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

public static void main(String[] args) {
new Some(1, "some", new float[] { 1f });
System.out.println("passed");
}


}

class Some {
public Some(int a, String s, float[] f) {}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
public class SimpleConstructorParams {

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


}

class Some {
public Some(int a) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
public class PrivateConstructor {

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


}

class Some {
private Some(int a) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
public class ProtectedConstructor {

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


}

class Some {
protected Some(int a) {}
}
Loading

0 comments on commit 0efbaa9

Please sign in to comment.