attila@1539: /* sundar@1827: * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. attila@1539: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. attila@1539: * attila@1539: * This code is free software; you can redistribute it and/or modify it attila@1539: * under the terms of the GNU General Public License version 2 only, as attila@1539: * published by the Free Software Foundation. attila@1539: * attila@1539: * This code is distributed in the hope that it will be useful, but WITHOUT attila@1539: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or attila@1539: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License attila@1539: * version 2 for more details (a copy is included in the LICENSE file that attila@1539: * accompanied this code). attila@1539: * attila@1539: * You should have received a copy of the GNU General Public License version attila@1539: * 2 along with this work; if not, write to the Free Software Foundation, attila@1539: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. attila@1539: * attila@1539: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA attila@1539: * or visit www.oracle.com if you need additional information or have any attila@1539: * questions. attila@1539: */ attila@1539: attila@1539: /** attila@1539: * JDK-8134939: Improve toString method of Dynalink OverloadedDynamicMethod attila@1539: * attila@1539: * @test attila@1539: * @run attila@1539: */ attila@1539: attila@1539: var overloadedSetter = new (Java.type("jdk.nashorn.test.models.OverloadedSetter")); attila@1539: attila@1539: Assert.assertEquals(String(overloadedSetter.foo), attila@1539: "[jdk.internal.dynalink.beans.OverloadedDynamicMethod\n" + attila@1539: " String jdk.nashorn.test.models.OverloadedSetter.foo(String)\n" + attila@1539: " void jdk.nashorn.test.models.OverloadedSetter.foo(int)\n" + attila@1539: "]"); attila@1539: attila@1539: Assert.assertEquals(String(overloadedSetter.setColor), attila@1539: "[jdk.internal.dynalink.beans.OverloadedDynamicMethod\n" + attila@1539: " void jdk.nashorn.test.models.OverloadedSetter.setColor(int)\n" + attila@1539: " void jdk.nashorn.test.models.OverloadedSetter.setColor(String)\n" + attila@1539: "]");