[fix] Fix merge.
@@ -260,34 +260,6 @@ public class TestConditionals extends TornadoTestBase {
}
}
- @Test
- public void testSwitch6() {
- final int size = 10;
- int[] a = new int[size];
- int[] b = new int[size];
-
- Arrays.fill(a, 12);
- Arrays.fill(b, 22);
-
- new TaskSchedule("s0") //
- .task("t0", TestConditionals::switchStatement6, a) //
- .streamOut(a) //
- .execute();//
-
- new TaskSchedule("s0") //
- .task("t0", TestConditionals::switchStatement6, b) //
- .streamOut(b) //
- .execute();//
-
- for (int value : a) {
- assertEquals(10, value);
- }
-
- for (int value : b) {
- assertEquals(10, value);
- }
- }
-
public static void ternaryCondition(int[] a) {
for (@Parallel int i = 0; i < a.length; i++) {
a[i] = (a[i] == 20) ? 10 : 5;
@@ -368,30 +340,15 @@ public class TestConditionals extends TornadoTestBase {
}
}
- private static void switchStatement5(int[] a) {
- for (@Parallel int i = 0; i < a.length; i++) {
- int value = a[i];
- switch (value) {
- case 12:
- case 22:
- a[i] = 10;
- break;
- case 42:
- a[i] = 30;
- break;
- }
- }
- }
-
@Test
- public void testSwitch5() {
+ public void testSwitch6() {
final int size = 8192;
int[] a = new int[size];
Arrays.fill(a, 42);
new TaskSchedule("s0") //
- .task("t0", TestConditionals::switchStatement5, a) //
+ .task("t0", TestConditionals::switchStatement6, a) //
.streamOut(a).execute(); //
for (int value : a) {
@@ -400,14 +357,14 @@ public class TestConditionals extends TornadoTestBase {
}
@Test
- public void testSwitch6() {
+ public void testSwitch7() {
final int size = 8192;
int[] a = new int[size];
Arrays.fill(a, 12);
new TaskSchedule("s0") //
- .task("t0", TestConditionals::switchStatement5, a) //
+ .task("t0", TestConditionals::switchStatement6, a) //
.streamOut(a).execute(); //
for (int value : a) {
@@ -416,14 +373,14 @@ public class TestConditionals extends TornadoTestBase {
}
@Test
- public void testSwitch7() {
+ public void testSwitch8() {
final int size = 8192;
int[] a = new int[size];
Arrays.fill(a, 22);
new TaskSchedule("s0") //
- .task("t0", TestConditionals::switchStatement5, a) //
+ .task("t0", TestConditionals::switchStatement6, a) //
.streamOut(a).execute(); //
for (int value : a) {
