< prev index next >

test/jdk/java/foreign/arraystructs/TestArrayStructs.java

Print this page

  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=specialized
 26  * @enablePreview
 27  * @library ../
 28  * @requires jdk.foreign.linker != "UNSUPPORTED"
 29  * @requires (!(os.name == "Mac OS X" & os.arch == "aarch64") | jdk.foreign.linker != "FALLBACK")
 30  * @modules java.base/jdk.internal.foreign
 31  * @run testng/othervm
 32  *   --enable-native-access=ALL-UNNAMED
 33  *   -Djdk.internal.foreign.DowncallLinker.USE_SPEC=true
 34  *   -Djdk.internal.foreign.UpcallLinker.USE_SPEC=true
 35  *   TestArrayStructs
 36  */
 37 
 38 /*
 39  * @test id=interpreted
 40  * @enablePreview
 41  * @library ../
 42  * @requires jdk.foreign.linker != "UNSUPPORTED"
 43  * @requires (!(os.name == "Mac OS X" & os.arch == "aarch64") | jdk.foreign.linker != "FALLBACK")
 44  * @modules java.base/jdk.internal.foreign
 45  * @run testng/othervm
 46  *   --enable-native-access=ALL-UNNAMED
 47  *   -Djdk.internal.foreign.DowncallLinker.USE_SPEC=false
 48  *   -Djdk.internal.foreign.UpcallLinker.USE_SPEC=false
 49  *   TestArrayStructs
 50  */
 51 
 52 import org.testng.annotations.DataProvider;
 53 import org.testng.annotations.Test;
 54 
 55 import java.lang.foreign.Arena;
 56 import java.lang.foreign.FunctionDescriptor;
 57 import java.lang.foreign.MemoryLayout;
 58 import java.lang.foreign.MemorySegment;
 59 import java.lang.foreign.StructLayout;
 60 import java.lang.invoke.MethodHandle;
 61 import java.util.ArrayList;
 62 import java.util.Collections;

  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=specialized

 26  * @library ../

 27  * @requires (!(os.name == "Mac OS X" & os.arch == "aarch64") | jdk.foreign.linker != "FALLBACK")
 28  * @modules java.base/jdk.internal.foreign
 29  * @run testng/othervm
 30  *   --enable-native-access=ALL-UNNAMED
 31  *   -Djdk.internal.foreign.DowncallLinker.USE_SPEC=true
 32  *   -Djdk.internal.foreign.UpcallLinker.USE_SPEC=true
 33  *   TestArrayStructs
 34  */
 35 
 36 /*
 37  * @test id=interpreted

 38  * @library ../

 39  * @requires (!(os.name == "Mac OS X" & os.arch == "aarch64") | jdk.foreign.linker != "FALLBACK")
 40  * @modules java.base/jdk.internal.foreign
 41  * @run testng/othervm
 42  *   --enable-native-access=ALL-UNNAMED
 43  *   -Djdk.internal.foreign.DowncallLinker.USE_SPEC=false
 44  *   -Djdk.internal.foreign.UpcallLinker.USE_SPEC=false
 45  *   TestArrayStructs
 46  */
 47 
 48 import org.testng.annotations.DataProvider;
 49 import org.testng.annotations.Test;
 50 
 51 import java.lang.foreign.Arena;
 52 import java.lang.foreign.FunctionDescriptor;
 53 import java.lang.foreign.MemoryLayout;
 54 import java.lang.foreign.MemorySegment;
 55 import java.lang.foreign.StructLayout;
 56 import java.lang.invoke.MethodHandle;
 57 import java.util.ArrayList;
 58 import java.util.Collections;
< prev index next >