Skip to content

Commit

Permalink
Added java token position tests from J_APPLY to J_ASSIGN
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoOfTwelve committed Sep 3, 2024
1 parent 644cdb8 commit dfd455a
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
>class Apply {
> public static void main(String[] args) {
> System.out.println("Test");
$ | J_APPLY 18
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
>class Apply {
> public static void main(String[] args) {
> new String("test").length();
$ | J_APPLY 6
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
>import java.io.File;
>
>class Apply {
> public static void main(String[] args) {
> File file = new File("test");
> file.getName().length();
$ | J_APPLY 12
$ | J_APPLY 6
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
>class Apply {
> public static void main(String[] args) {
> int[] data = new int[]{1,2,3,4};
$ | J_ARRAY_INIT_BEGIN 1
$ | J_ARRAY_INIT_END 1
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
>@SuppressWarnings({"Test1", "Test2"})
$ | J_ARRAY_INIT_BEGIN 1
$ | J_ARRAY_INIT_END 1
>class Apply {
> public static void main(String[] args) {
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
>class Apply {
> public static void main(String[] args) {
> assert true;
$ | J_ASSERT 6
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
>class Apply {
> public static void main(String[] args) {
> assert args.length == 0;
$ | J_ASSERT 6
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
>class Apply {
> public static void main(String[] args) {
> int i = 1;
$ | J_ASSIGN 3
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
>class Apply {
> public static void main(String[] args) {
> int i = 1;
> i = 2;
$ | J_ASSIGN 3
> }
>}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
>class Apply {
> public static void main(String[] args) {
> int i = 1;
> i = (int) Math.random();
$ | J_ASSIGN 3
> }
>}

0 comments on commit dfd455a

Please sign in to comment.