Skip to content

Commit 784b6dd

Browse files
author
Daniel Kroening
authored
Merge pull request #2119 from svorenova/gs_tg1121_regression
Adding regression tests for multi-dimensional arrays [TG-1121]
2 parents 1b6a939 + 227e83d commit 784b6dd

20 files changed

+157
-0
lines changed
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public class A {
2+
public float a;
3+
}
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class FloatMultidim1 {
2+
public float[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
float[][] a1 = new float[y][2];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[j][1] = 1.0f;
12+
return a1;
13+
} else {
14+
return null;
15+
}
16+
}
17+
}
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class FloatMultidim2 {
2+
public float[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
float[][] a1 = new float[2][y];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[1][j] = 1.0f;
12+
return a1;
13+
} else {
14+
return new float[1][1];
15+
}
16+
}
17+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class RefMultidim1 {
2+
public A[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
A[][] a1 = new A[y][2];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[j][1] = new A();
12+
a1[j][1].a = 1.0f;
13+
return a1;
14+
} else {
15+
return null;
16+
}
17+
}
18+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class RefMultidim2 {
2+
public A[][] f(int y) {
3+
if (y > 0 && y < 5) {
4+
A[][] a1 = new A[2][y];
5+
int j;
6+
if (y > 1) {
7+
j = 1;
8+
} else {
9+
j = 0;
10+
}
11+
a1[1][j] = new A();
12+
a1[1][j].a = 1.0f;
13+
return a1;
14+
} else {
15+
return null;
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)