NASHORN-107.js revision 877:cf4d2252d444
1291406Sjhb/* 2291406Sjhb * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 3291406Sjhb * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4291406Sjhb * 5291406Sjhb * This code is free software; you can redistribute it and/or modify it 6291406Sjhb * under the terms of the GNU General Public License version 2 only, as 7291406Sjhb * published by the Free Software Foundation. 8291406Sjhb * 9291406Sjhb * This code is distributed in the hope that it will be useful, but WITHOUT 10291406Sjhb * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11291406Sjhb * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12291406Sjhb * version 2 for more details (a copy is included in the LICENSE file that 13291406Sjhb * accompanied this code). 14291406Sjhb * 15291406Sjhb * You should have received a copy of the GNU General Public License version 16291406Sjhb * 2 along with this work; if not, write to the Free Software Foundation, 17291406Sjhb * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18291406Sjhb * 19291406Sjhb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20291406Sjhb * or visit www.oracle.com if you need additional information or have any 21291406Sjhb * questions. 22291406Sjhb */ 23291406Sjhb 24291406Sjhb/** 25291406Sjhb * NASHORN-107 : toJSON of undefined should be "undefined" 26291406Sjhb * 27291406Sjhb * @test 28291406Sjhb * @run 29291406Sjhb */ 30291406Sjhb 31291406Sjhbif (JSON.stringify(undefined) !== undefined) { 32291406Sjhb fail("JSON.stringify(undefined) is not undefined"); 33291406Sjhb} 34291406Sjhb