Wed, 05 Sep 2018 01:21:35 -0700
Added tag jdk8u192-b09 for changeset 456c0d45c43b
sundar@1515 | 1 | /* |
sundar@1515 | 2 | * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
sundar@1515 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
sundar@1515 | 4 | * |
sundar@1515 | 5 | * This code is free software; you can redistribute it and/or modify it |
sundar@1515 | 6 | * under the terms of the GNU General Public License version 2 only, as |
sundar@1515 | 7 | * published by the Free Software Foundation. |
sundar@1515 | 8 | * |
sundar@1515 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
sundar@1515 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
sundar@1515 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
sundar@1515 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
sundar@1515 | 13 | * accompanied this code). |
sundar@1515 | 14 | * |
sundar@1515 | 15 | * You should have received a copy of the GNU General Public License version |
sundar@1515 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
sundar@1515 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
sundar@1515 | 18 | * |
sundar@1515 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
sundar@1515 | 20 | * or visit www.oracle.com if you need additional information or have any |
sundar@1515 | 21 | * questions. |
sundar@1515 | 22 | */ |
sundar@1515 | 23 | |
sundar@1515 | 24 | /** |
sundar@1515 | 25 | * JDK-8133119: Error message associated with TypeError for call and new should include stringified Node |
sundar@1515 | 26 | * |
sundar@1515 | 27 | * @test |
sundar@1515 | 28 | * @run |
sundar@1515 | 29 | */ |
sundar@1515 | 30 | |
sundar@1515 | 31 | var obj = {} |
sundar@1515 | 32 | try { |
sundar@1515 | 33 | obj.func(); |
sundar@1515 | 34 | } catch (e) { |
sundar@1515 | 35 | print(e); |
sundar@1515 | 36 | } |
sundar@1515 | 37 | |
sundar@1515 | 38 | var arr = [33]; |
sundar@1515 | 39 | try { |
sundar@1515 | 40 | arr[0].func(); |
sundar@1515 | 41 | } catch (e) { |
sundar@1515 | 42 | print(e); |
sundar@1515 | 43 | } |
sundar@1515 | 44 | |
sundar@1515 | 45 | try { |
sundar@1515 | 46 | new obj.func(); |
sundar@1515 | 47 | } catch (e) { |
sundar@1515 | 48 | print(e); |
sundar@1515 | 49 | } |
sundar@1515 | 50 | |
sundar@1515 | 51 | try { |
sundar@1515 | 52 | new arr[0].func(); |
sundar@1515 | 53 | } catch (e) { |
sundar@1515 | 54 | print(e); |
sundar@1515 | 55 | } |
sundar@1515 | 56 | |
sundar@1515 | 57 | obj.foo = {} |
sundar@1515 | 58 | try { |
sundar@1515 | 59 | new obj.foo(); |
sundar@1515 | 60 | } catch (e) { |
sundar@1515 | 61 | print(e); |
sundar@1515 | 62 | } |
sundar@1515 | 63 | |
sundar@1515 | 64 | try { |
sundar@1515 | 65 | obj.foo(); |
sundar@1515 | 66 | } catch (e) { |
sundar@1515 | 67 | print(e); |
sundar@1515 | 68 | } |
sundar@1515 | 69 | |
sundar@1515 | 70 | var v = new java.util.Vector(); |
sundar@1515 | 71 | try { |
sundar@1515 | 72 | v(); |
sundar@1515 | 73 | } catch (e) { |
sundar@1515 | 74 | print(e); |
sundar@1515 | 75 | } |
sundar@1515 | 76 | |
sundar@1515 | 77 | try { |
sundar@1515 | 78 | new v(); |
sundar@1515 | 79 | } catch (e) { |
sundar@1515 | 80 | print(e); |
sundar@1515 | 81 | } |