NASHORN-337.js revision 2:da1e581c933b
118316Swollman/*
218316Swollman * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
318316Swollman * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
418316Swollman *
518316Swollman * This code is free software; you can redistribute it and/or modify it
618316Swollman * under the terms of the GNU General Public License version 2 only, as
718316Swollman * published by the Free Software Foundation.
818316Swollman *
918316Swollman * This code is distributed in the hope that it will be useful, but WITHOUT
1018316Swollman * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1118316Swollman * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1218316Swollman * version 2 for more details (a copy is included in the LICENSE file that
1318316Swollman * accompanied this code).
1418316Swollman *
1518316Swollman * You should have received a copy of the GNU General Public License version
1618316Swollman * 2 along with this work; if not, write to the Free Software Foundation,
1718316Swollman * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1818316Swollman *
1918316Swollman * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2018316Swollman * or visit www.oracle.com if you need additional information or have any
2118316Swollman * questions.
2218316Swollman */
2318316Swollman
2418316Swollman/**
2518316Swollman * NASHORN-337 - Erroneous DCMPL/DCMPG instructions were generated
2618316Swollman *
2718316Swollman * @test
2846303Smarkm * @run
2950476Speter */
3018316Swollman
3118316Swollmanvar x;
3218316Swollman
3318316Swollmanprint("Value: " + x);
3418316Swollmanprint("Numerical Value: " + (+x));
3518316Swollmanprint("Boolean Value(>0): " + ((+x) > 0));
3618316Swollmanprint("Boolean Value(<0): " + ((+x) < 0));
37126250Sbmsprint("Boolean Value(==0): " + ((+x) == 0));
3864483Ssheldonh
39126250Sbmsprint("NaN > 0? " + (NaN > 0));
40126250Sbmsprint("NaN < 0? " + (NaN < 0));
41126250Sbmsprint("NaN == 0? " + (NaN == 0));
42126250Sbms
43126250Sbms
4446303Smarkm