1892N/A * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. 1892N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1892N/A * This code is free software; you can redistribute it and/or modify it 1892N/A * under the terms of the GNU General Public License version 2 only, as 1892N/A * published by the Free Software Foundation. 1892N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1892N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1892N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1892N/A * version 2 for more details (a copy is included in the LICENSE file that 1892N/A * You should have received a copy of the GNU General Public License version 1892N/A * 2 along with this work; if not, write to the Free Software Foundation, 1892N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1892N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1892N/A * or visit www.oracle.com if you need additional information or have any 1892N/A * @summary Testing recognition of "NaN" and "Infinity" strings 1892N/A * 4428772 -- Establish invariant for Float & Double classes and 1892N/A * their string representations 1892N/A * Added capability for parse{Float, Double} and related methods 1892N/A * to recognize "NaN" and "Infinity" strings so that 1892N/A * parseDouble(toString(d)) will always return the original // Test valid NaN strings +
"'' did not parse as a NaN; returned " +
// Test valid Infinity strings "'' did not parse as infinity; returned " +
(
negative?
"positive instead of negative.":
"negative instead of positive."));
// Test almost valid strings +
"'' parsed as " + d +
".");