NASHORN-202.js revision 877:cf4d2252d444
1327952Sdim/* 2303231Sdim * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 3353358Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4353358Sdim * 5353358Sdim * This code is free software; you can redistribute it and/or modify it 6303231Sdim * under the terms of the GNU General Public License version 2 only, as 7303231Sdim * published by the Free Software Foundation. 8303231Sdim * 9303231Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 10303231Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11303231Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12303231Sdim * version 2 for more details (a copy is included in the LICENSE file that 13303231Sdim * accompanied this code). 14303231Sdim * 15303231Sdim * You should have received a copy of the GNU General Public License version 16303231Sdim * 2 along with this work; if not, write to the Free Software Foundation, 17360784Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18303231Sdim * 19303231Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20303231Sdim * or visit www.oracle.com if you need additional information or have any 21303231Sdim * questions. 22303231Sdim */ 23303231Sdim 24303231Sdim/** 25303231Sdim * NASHORN-202 : Date.prototype.toJSON should accept one (unused) argument 26303231Sdim * 27303231Sdim * @test 28303231Sdim * @run 29303231Sdim */ 30303231Sdim 31303231Sdimif (Date.prototype.toJSON.length !== 1) { 32303231Sdim throw new Error("Date.prototype.toJSON.length !== 1"); 33327952Sdim} 34303231Sdim