test/script/basic/JDK-8061959.js

Mon, 03 Nov 2014 13:58:52 +0100

author
lagergren
date
Mon, 03 Nov 2014 13:58:52 +0100
changeset 1084
4ac6934c6cc2
permissions
-rw-r--r--

8061959: ArrayBuffer lacked static isViewMethod
Reviewed-by: attila, sundar

lagergren@1084 1 /*
lagergren@1084 2 * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
lagergren@1084 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
lagergren@1084 4 *
lagergren@1084 5 * This code is free software; you can redistribute it and/or modify it
lagergren@1084 6 * under the terms of the GNU General Public License version 2 only, as
lagergren@1084 7 * published by the Free Software Foundation.
lagergren@1084 8 *
lagergren@1084 9 * This code is distributed in the hope that it will be useful, but WITHOUT
lagergren@1084 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
lagergren@1084 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
lagergren@1084 12 * version 2 for more details (a copy is included in the LICENSE file that
lagergren@1084 13 * accompanied this code).
lagergren@1084 14 *
lagergren@1084 15 * You should have received a copy of the GNU General Public License version
lagergren@1084 16 * 2 along with this work; if not, write to the Free Software Foundation,
lagergren@1084 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
lagergren@1084 18 *
lagergren@1084 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
lagergren@1084 20 * or visit www.oracle.com if you need additional information or have any
lagergren@1084 21 * questions.
lagergren@1084 22 */
lagergren@1084 23
lagergren@1084 24 /**
lagergren@1084 25 * JDK-8061959 - Checks for the existence of ArrayBufferView
lagergren@1084 26 *
lagergren@1084 27 * @test
lagergren@1084 28 * @run
lagergren@1084 29 */
lagergren@1084 30
lagergren@1084 31 print(ArrayBuffer.isView(new Int8Array(4)));
lagergren@1084 32 print(ArrayBuffer.isView("gorilla"));
lagergren@1084 33 print(ArrayBuffer.isView());
lagergren@1084 34
lagergren@1084 35

mercurial