diff --git a/src/test/java/com/aparapi/runtime/ReturnInstantiatedArrayDirectlyTest.java b/src/test/java/com/aparapi/runtime/ReturnInstantiatedArrayDirectlyTest.java new file mode 100644 index 0000000000000000000000000000000000000000..c880f799a56d70ba4fb2624509f19226a2c797e1 --- /dev/null +++ b/src/test/java/com/aparapi/runtime/ReturnInstantiatedArrayDirectlyTest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016 - 2017 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.aparapi.runtime; + +import com.aparapi.Kernel; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.Arrays; + +import static org.junit.Assert.assertArrayEquals; + + +public class ReturnInstantiatedArrayDirectlyTest { + @Test + @Ignore("Knon bug, ignoring until fixed.") + public void test() { + ReturnDoubleArrayNew kernel = new ReturnDoubleArrayNew(); + kernel.execute(1); + } + + public class ReturnDoubleArrayNew extends Kernel { + + double[] returnDoubleArrayNew() { + return new double[1024]; + } + + public void run() { + returnDoubleArrayNew(); + } + } +}