From 595f5a808ebde82ac0ff3a1f847a00362796c6a6 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 26 Jan 2016 09:18:51 +0000 Subject: [PATCH 01/17] 8148154: Integrate JOpt Simple for internal usage by JDK tools Reviewed-by: alanb, redestad, rriggs --- .../joptsimple/AbstractOptionSpec.java | 183 ++++++ .../joptsimple/AlternativeLongOptionSpec.java | 81 +++ .../ArgumentAcceptingOptionSpec.java | 360 +++++++++++ .../jdk/internal/joptsimple/ArgumentList.java | 89 +++ .../joptsimple/BuiltinHelpFormatter.java | 282 +++++++++ .../internal/joptsimple/HelpFormatter.java | 75 +++ .../IllegalOptionSpecificationException.java | 76 +++ .../MissingRequiredOptionException.java | 76 +++ .../MultipleArgumentsForOptionException.java | 76 +++ .../joptsimple/NoArgumentOptionSpec.java | 112 ++++ .../joptsimple/NonOptionArgumentSpec.java | 200 ++++++ .../OptionArgumentConversionException.java | 80 +++ .../internal/joptsimple/OptionDeclarer.java | 135 ++++ .../internal/joptsimple/OptionDescriptor.java | 131 ++++ .../internal/joptsimple/OptionException.java | 121 ++++ ...ptionMissingRequiredArgumentException.java | 76 +++ .../jdk/internal/joptsimple/OptionParser.java | 580 ++++++++++++++++++ .../joptsimple/OptionParserState.java | 106 ++++ .../jdk/internal/joptsimple/OptionSet.java | 351 +++++++++++ .../jdk/internal/joptsimple/OptionSpec.java | 128 ++++ .../joptsimple/OptionSpecBuilder.java | 225 +++++++ .../joptsimple/OptionSpecTokenizer.java | 156 +++++ .../OptionalArgumentOptionSpec.java | 99 +++ .../jdk/internal/joptsimple/ParserRules.java | 114 ++++ .../classes/jdk/internal/joptsimple/README | 3 + .../RequiredArgumentOptionSpec.java | 82 +++ ...acceptableNumberOfNonOptionsException.java | 84 +++ .../UnconfiguredOptionException.java | 82 +++ .../UnrecognizedOptionException.java | 76 +++ .../joptsimple/ValueConversionException.java | 84 +++ .../internal/joptsimple/ValueConverter.java | 88 +++ .../joptsimple/internal/AbbreviationMap.java | 264 ++++++++ .../internal/joptsimple/internal/Classes.java | 105 ++++ .../internal/joptsimple/internal/Columns.java | 137 +++++ .../ConstructorInvokingValueConverter.java | 86 +++ .../MethodInvokingValueConverter.java | 88 +++ .../internal/joptsimple/internal/Objects.java | 76 +++ .../joptsimple/internal/Reflection.java | 176 ++++++ .../internal/ReflectionException.java | 69 +++ .../jdk/internal/joptsimple/internal/Row.java | 85 +++ .../internal/joptsimple/internal/Rows.java | 132 ++++ .../internal/joptsimple/internal/Strings.java | 147 +++++ .../joptsimple/util/DateConverter.java | 130 ++++ .../joptsimple/util/InetAddressConverter.java | 85 +++ .../joptsimple/util/KeyValuePair.java | 113 ++++ .../joptsimple/util/RegexMatcher.java | 113 ++++ 46 files changed, 6217 insertions(+) create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AbstractOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AlternativeLongOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentAcceptingOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentList.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/BuiltinHelpFormatter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/HelpFormatter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/IllegalOptionSpecificationException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MissingRequiredOptionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MultipleArgumentsForOptionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NoArgumentOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NonOptionArgumentSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionArgumentConversionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDeclarer.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDescriptor.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionMissingRequiredArgumentException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParser.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParserState.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSet.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecBuilder.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecTokenizer.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionalArgumentOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ParserRules.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/README create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/RequiredArgumentOptionSpec.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnacceptableNumberOfNonOptionsException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnconfiguredOptionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnrecognizedOptionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConversionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConverter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/AbbreviationMap.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Classes.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Columns.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ConstructorInvokingValueConverter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/MethodInvokingValueConverter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Objects.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Reflection.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ReflectionException.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Row.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Rows.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Strings.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/DateConverter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/InetAddressConverter.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/KeyValuePair.java create mode 100644 jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/RegexMatcher.java diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AbstractOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AbstractOptionSpec.java new file mode 100644 index 00000000000..0d39af447f7 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AbstractOptionSpec.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import static java.util.Collections.*; + +import jdk.internal.joptsimple.internal.Reflection; +import jdk.internal.joptsimple.internal.ReflectionException; + +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + * @param represents the type of the arguments this option accepts + * @author Paul Holser + */ +abstract class AbstractOptionSpec implements OptionSpec, OptionDescriptor { + private final List options = new ArrayList(); + private final String description; + private boolean forHelp; + + protected AbstractOptionSpec( String option ) { + this( singletonList( option ), EMPTY ); + } + + protected AbstractOptionSpec( Collection options, String description ) { + arrangeOptions( options ); + + this.description = description; + } + + public final Collection options() { + return unmodifiableList( options ); + } + + public final List values( OptionSet detectedOptions ) { + return detectedOptions.valuesOf( this ); + } + + public final V value( OptionSet detectedOptions ) { + return detectedOptions.valueOf( this ); + } + + public String description() { + return description; + } + + public final AbstractOptionSpec forHelp() { + forHelp = true; + return this; + } + + public final boolean isForHelp() { + return forHelp; + } + + public boolean representsNonOptions() { + return false; + } + + protected abstract V convert( String argument ); + + protected V convertWith( ValueConverter converter, String argument ) { + try { + return Reflection.convertWith( converter, argument ); + } + catch ( ReflectionException ex ) { + throw new OptionArgumentConversionException( options(), argument, ex ); + } + catch ( ValueConversionException ex ) { + throw new OptionArgumentConversionException( options(), argument, ex ); + } + } + + protected String argumentTypeIndicatorFrom( ValueConverter converter ) { + if ( converter == null ) + return null; + + String pattern = converter.valuePattern(); + return pattern == null ? converter.valueType().getName() : pattern; + } + + abstract void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, + String detectedArgument ); + + private void arrangeOptions( Collection unarranged ) { + if ( unarranged.size() == 1 ) { + options.addAll( unarranged ); + return; + } + + List shortOptions = new ArrayList(); + List longOptions = new ArrayList(); + + for ( String each : unarranged ) { + if ( each.length() == 1 ) + shortOptions.add( each ); + else + longOptions.add( each ); + } + + sort( shortOptions ); + sort( longOptions ); + + options.addAll( shortOptions ); + options.addAll( longOptions ); + } + + @Override + public boolean equals( Object that ) { + if ( !( that instanceof AbstractOptionSpec ) ) + return false; + + AbstractOptionSpec other = (AbstractOptionSpec) that; + return options.equals( other.options ); + } + + @Override + public int hashCode() { + return options.hashCode(); + } + + @Override + public String toString() { + return options.toString(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AlternativeLongOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AlternativeLongOptionSpec.java new file mode 100644 index 00000000000..12532c6b3bc --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/AlternativeLongOptionSpec.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static java.util.Collections.*; + +import static jdk.internal.joptsimple.ParserRules.*; + +/** + * Represents the "-W" form of long option specification. + * + * @author Paul Holser + */ +class AlternativeLongOptionSpec extends ArgumentAcceptingOptionSpec { + AlternativeLongOptionSpec() { + super( singletonList( RESERVED_FOR_EXTENSIONS ), true, "Alternative form of long options" ); + + describedAs( "opt=value" ); + } + + @Override + protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) { + if ( !arguments.hasMore() ) + throw new OptionMissingRequiredArgumentException( options() ); + + arguments.treatNextAsLongOption(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentAcceptingOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentAcceptingOptionSpec.java new file mode 100644 index 00000000000..ffb083746e9 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentAcceptingOptionSpec.java @@ -0,0 +1,360 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.StringTokenizer; + +import static java.util.Collections.*; + +import static jdk.internal.joptsimple.internal.Objects.*; +import static jdk.internal.joptsimple.internal.Reflection.*; +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + *

Specification of an option that accepts an argument.

+ * + *

Instances are returned from {@link OptionSpecBuilder} methods to allow the formation of parser directives as + * sentences in a "fluent interface" language. For example:

+ * + *
+ *   
+ *   OptionParser parser = new OptionParser();
+ *   parser.accepts( "c" ).withRequiredArg().ofType( Integer.class );
+ *   
+ * 
+ * + *

If no methods are invoked on an instance of this class, then that instance's option will treat its argument as + * a {@link String}.

+ * + * @param represents the type of the arguments this option accepts + * @author Paul Holser + */ +public abstract class ArgumentAcceptingOptionSpec extends AbstractOptionSpec { + private static final char NIL_VALUE_SEPARATOR = '\u0000'; + + private boolean optionRequired; + private final boolean argumentRequired; + private ValueConverter converter; + private String argumentDescription = ""; + private String valueSeparator = String.valueOf( NIL_VALUE_SEPARATOR ); + private final List defaultValues = new ArrayList(); + + ArgumentAcceptingOptionSpec( String option, boolean argumentRequired ) { + super( option ); + + this.argumentRequired = argumentRequired; + } + + ArgumentAcceptingOptionSpec( Collection options, boolean argumentRequired, String description ) { + super( options, description ); + + this.argumentRequired = argumentRequired; + } + + /** + *

Specifies a type to which arguments of this spec's option are to be converted.

+ * + *

JOpt Simple accepts types that have either:

+ * + *
    + *
  1. a public static method called {@code valueOf} which accepts a single argument of type {@link String} + * and whose return type is the same as the class on which the method is declared. The {@code java.lang} + * primitive wrapper classes have such methods.
  2. + * + *
  3. a public constructor which accepts a single argument of type {@link String}.
  4. + *
+ * + *

This class converts arguments using those methods in that order; that is, {@code valueOf} would be invoked + * before a one-{@link String}-arg constructor would.

+ * + *

Invoking this method will trump any previous calls to this method or to + * {@link #withValuesConvertedBy(ValueConverter)}.

+ * + * @param represents the runtime class of the desired option argument type + * @param argumentType desired type of arguments to this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if the type is {@code null} + * @throws IllegalArgumentException if the type does not have the standard conversion methods + */ + public final ArgumentAcceptingOptionSpec ofType( Class argumentType ) { + return withValuesConvertedBy( findConverter( argumentType ) ); + } + + /** + *

Specifies a converter to use to translate arguments of this spec's option into Java objects. This is useful + * when converting to types that do not have the requisite factory method or constructor for + * {@link #ofType(Class)}.

+ * + *

Invoking this method will trump any previous calls to this method or to {@link #ofType(Class)}. + * + * @param represents the runtime class of the desired option argument type + * @param aConverter the converter to use + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if the converter is {@code null} + */ + @SuppressWarnings( "unchecked" ) + public final ArgumentAcceptingOptionSpec withValuesConvertedBy( ValueConverter aConverter ) { + if ( aConverter == null ) + throw new NullPointerException( "illegal null converter" ); + + converter = (ValueConverter) aConverter; + return (ArgumentAcceptingOptionSpec) this; + } + + /** + *

Specifies a description for the argument of the option that this spec represents. This description is used + * when generating help information about the parser.

+ * + * @param description describes the nature of the argument of this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + */ + public final ArgumentAcceptingOptionSpec describedAs( String description ) { + argumentDescription = description; + return this; + } + + /** + *

Specifies a value separator for the argument of the option that this spec represents. This allows a single + * option argument to represent multiple values for the option. For example:

+ * + *
+     *   
+     *   parser.accepts( "z" ).withRequiredArg()
+     *       .withValuesSeparatedBy( ',' );
+     *   OptionSet options = parser.parse( new String[] { "-z", "foo,bar,baz", "-z",
+     *       "fizz", "-z", "buzz" } );
+     *   
+     * 
+ * + *

Then {@code options.valuesOf( "z" )} would yield the list {@code [foo, bar, baz, fizz, buzz]}.

+ * + *

You cannot use Unicode U+0000 as the separator.

+ * + * @param separator a character separator + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws IllegalArgumentException if the separator is Unicode U+0000 + */ + public final ArgumentAcceptingOptionSpec withValuesSeparatedBy( char separator ) { + if ( separator == NIL_VALUE_SEPARATOR ) + throw new IllegalArgumentException( "cannot use U+0000 as separator" ); + + valueSeparator = String.valueOf( separator ); + return this; + } + + /** + *

Specifies a value separator for the argument of the option that this spec represents. This allows a single + * option argument to represent multiple values for the option. For example:

+ * + *
+     *   
+     *   parser.accepts( "z" ).withRequiredArg()
+     *       .withValuesSeparatedBy( ":::" );
+     *   OptionSet options = parser.parse( new String[] { "-z", "foo:::bar:::baz", "-z",
+     *       "fizz", "-z", "buzz" } );
+     *   
+     * 
+ * + *

Then {@code options.valuesOf( "z" )} would yield the list {@code [foo, bar, baz, fizz, buzz]}.

+ * + *

You cannot use Unicode U+0000 in the separator.

+ * + * @param separator a string separator + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws IllegalArgumentException if the separator contains Unicode U+0000 + */ + public final ArgumentAcceptingOptionSpec withValuesSeparatedBy( String separator ) { + if ( separator.indexOf( NIL_VALUE_SEPARATOR ) != -1 ) + throw new IllegalArgumentException( "cannot use U+0000 in separator" ); + + valueSeparator = separator; + return this; + } + + /** + * Specifies a set of default values for the argument of the option that this spec represents. + * + * @param value the first in the set of default argument values for this spec's option + * @param values the (optional) remainder of the set of default argument values for this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if {@code value}, {@code values}, or any elements of {@code values} are + * {@code null} + */ + @SuppressWarnings("unchecked") + public ArgumentAcceptingOptionSpec defaultsTo( V value, V... values ) { + addDefaultValue( value ); + defaultsTo( values ); + + return this; + } + + /** + * Specifies a set of default values for the argument of the option that this spec represents. + * + * @param values the set of default argument values for this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if {@code values} or any elements of {@code values} are {@code null} + */ + public ArgumentAcceptingOptionSpec defaultsTo( V[] values ) { + for ( V each : values ) + addDefaultValue( each ); + + return this; + } + + /** + * Marks this option as required. An {@link OptionException} will be thrown when + * {@link OptionParser#parse(java.lang.String...)} is called, if an option is marked as required and not specified + * on the command line. + * + * @return self, so that the caller can add clauses to the fluent interface sentence + */ + public ArgumentAcceptingOptionSpec required() { + optionRequired = true; + return this; + } + + public boolean isRequired() { + return optionRequired; + } + + private void addDefaultValue( V value ) { + ensureNotNull( value ); + defaultValues.add( value ); + } + + @Override + final void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, + String detectedArgument ) { + + if ( isNullOrEmpty( detectedArgument ) ) + detectOptionArgument( parser, arguments, detectedOptions ); + else + addArguments( detectedOptions, detectedArgument ); + } + + protected void addArguments( OptionSet detectedOptions, String detectedArgument ) { + StringTokenizer lexer = new StringTokenizer( detectedArgument, valueSeparator ); + if ( !lexer.hasMoreTokens() ) + detectedOptions.addWithArgument( this, detectedArgument ); + else { + while ( lexer.hasMoreTokens() ) + detectedOptions.addWithArgument( this, lexer.nextToken() ); + } + } + + protected abstract void detectOptionArgument( OptionParser parser, ArgumentList arguments, + OptionSet detectedOptions ); + + @Override + protected final V convert( String argument ) { + return convertWith( converter, argument ); + } + + protected boolean canConvertArgument( String argument ) { + StringTokenizer lexer = new StringTokenizer( argument, valueSeparator ); + + try { + while ( lexer.hasMoreTokens() ) + convert( lexer.nextToken() ); + return true; + } + catch ( OptionException ignored ) { + return false; + } + } + + protected boolean isArgumentOfNumberType() { + return converter != null && Number.class.isAssignableFrom( converter.valueType() ); + } + + public boolean acceptsArguments() { + return true; + } + + public boolean requiresArgument() { + return argumentRequired; + } + + public String argumentDescription() { + return argumentDescription; + } + + public String argumentTypeIndicator() { + return argumentTypeIndicatorFrom( converter ); + } + + public List defaultValues() { + return unmodifiableList( defaultValues ); + } + + @Override + public boolean equals( Object that ) { + if ( !super.equals( that ) ) + return false; + + ArgumentAcceptingOptionSpec other = (ArgumentAcceptingOptionSpec) that; + return requiresArgument() == other.requiresArgument(); + } + + @Override + public int hashCode() { + return super.hashCode() ^ ( argumentRequired ? 0 : 1 ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentList.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentList.java new file mode 100644 index 00000000000..e8cf157f99c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ArgumentList.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static jdk.internal.joptsimple.ParserRules.*; + +/** + *

Wrapper for an array of command line arguments.

+ * + * @author Paul Holser + */ +class ArgumentList { + private final String[] arguments; + private int currentIndex; + + ArgumentList( String... arguments ) { + this.arguments = arguments.clone(); + } + + boolean hasMore() { + return currentIndex < arguments.length; + } + + String next() { + return arguments[ currentIndex++ ]; + } + + String peek() { + return arguments[ currentIndex ]; + } + + void treatNextAsLongOption() { + if ( HYPHEN_CHAR != arguments[ currentIndex ].charAt( 0 ) ) + arguments[ currentIndex ] = DOUBLE_HYPHEN + arguments[ currentIndex ]; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/BuiltinHelpFormatter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/BuiltinHelpFormatter.java new file mode 100644 index 00000000000..ba72af36f90 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/BuiltinHelpFormatter.java @@ -0,0 +1,282 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; + +import jdk.internal.joptsimple.internal.Rows; +import jdk.internal.joptsimple.internal.Strings; + +import static jdk.internal.joptsimple.ParserRules.*; +import static jdk.internal.joptsimple.internal.Classes.*; +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + *

A help formatter that allows configuration of overall row width and column separator width.

+ * + *

The formatter produces a two-column output. The left column is for the options, and the right column for their + * descriptions. The formatter will allow as much space as possible for the descriptions, by minimizing the option + * column's width, no greater than slightly less than half the overall desired width.

+ * + * @author Paul Holser + */ +public class BuiltinHelpFormatter implements HelpFormatter { + private final Rows nonOptionRows; + private final Rows optionRows; + + /** + * Makes a formatter with a pre-configured overall row width and column separator width. + */ + BuiltinHelpFormatter() { + this( 80, 2 ); + } + + /** + * Makes a formatter with a given overall row width and column separator width. + * + * @param desiredOverallWidth how many characters wide to make the overall help display + * @param desiredColumnSeparatorWidth how many characters wide to make the separation between option column and + * description column + */ + public BuiltinHelpFormatter( int desiredOverallWidth, int desiredColumnSeparatorWidth ) { + nonOptionRows = new Rows( desiredOverallWidth * 2, 0 ); + optionRows = new Rows( desiredOverallWidth, desiredColumnSeparatorWidth ); + } + + public String format( Map options ) { + Comparator comparator = + new Comparator() { + public int compare( OptionDescriptor first, OptionDescriptor second ) { + return first.options().iterator().next().compareTo( second.options().iterator().next() ); + } + }; + + Set sorted = new TreeSet( comparator ); + sorted.addAll( options.values() ); + + addRows( sorted ); + + return formattedHelpOutput(); + } + + private String formattedHelpOutput() { + StringBuilder formatted = new StringBuilder(); + String nonOptionDisplay = nonOptionRows.render(); + if ( !Strings.isNullOrEmpty( nonOptionDisplay ) ) + formatted.append( nonOptionDisplay ).append( LINE_SEPARATOR ); + formatted.append( optionRows.render() ); + + return formatted.toString(); + } + + private void addRows( Collection options ) { + addNonOptionsDescription( options ); + + if ( options.isEmpty() ) + optionRows.add( "No options specified", "" ); + else { + addHeaders( options ); + addOptions( options ); + } + + fitRowsToWidth(); + } + + private void addNonOptionsDescription( Collection options ) { + OptionDescriptor nonOptions = findAndRemoveNonOptionsSpec( options ); + if ( shouldShowNonOptionArgumentDisplay( nonOptions ) ) { + nonOptionRows.add( "Non-option arguments:", "" ); + nonOptionRows.add(createNonOptionArgumentsDisplay(nonOptions), ""); + } + } + + private boolean shouldShowNonOptionArgumentDisplay( OptionDescriptor nonOptions ) { + return !Strings.isNullOrEmpty( nonOptions.description() ) + || !Strings.isNullOrEmpty( nonOptions.argumentTypeIndicator() ) + || !Strings.isNullOrEmpty( nonOptions.argumentDescription() ); + } + + private String createNonOptionArgumentsDisplay(OptionDescriptor nonOptions) { + StringBuilder buffer = new StringBuilder(); + maybeAppendOptionInfo( buffer, nonOptions ); + maybeAppendNonOptionsDescription( buffer, nonOptions ); + + return buffer.toString(); + } + + private void maybeAppendNonOptionsDescription( StringBuilder buffer, OptionDescriptor nonOptions ) { + buffer.append( buffer.length() > 0 && !Strings.isNullOrEmpty( nonOptions.description() ) ? " -- " : "" ) + .append( nonOptions.description() ); + } + + private OptionDescriptor findAndRemoveNonOptionsSpec( Collection options ) { + for ( Iterator it = options.iterator(); it.hasNext(); ) { + OptionDescriptor next = it.next(); + if ( next.representsNonOptions() ) { + it.remove(); + return next; + } + } + + throw new AssertionError( "no non-options argument spec" ); + } + + private void addHeaders( Collection options ) { + if ( hasRequiredOption( options ) ) { + optionRows.add("Option (* = required)", "Description"); + optionRows.add("---------------------", "-----------"); + } else { + optionRows.add("Option", "Description"); + optionRows.add("------", "-----------"); + } + } + + private boolean hasRequiredOption( Collection options ) { + for ( OptionDescriptor each : options ) { + if ( each.isRequired() ) + return true; + } + + return false; + } + + private void addOptions( Collection options ) { + for ( OptionDescriptor each : options ) { + if ( !each.representsNonOptions() ) + optionRows.add( createOptionDisplay( each ), createDescriptionDisplay( each ) ); + } + } + + private String createOptionDisplay( OptionDescriptor descriptor ) { + StringBuilder buffer = new StringBuilder( descriptor.isRequired() ? "* " : "" ); + + for ( Iterator i = descriptor.options().iterator(); i.hasNext(); ) { + String option = i.next(); + buffer.append( option.length() > 1 ? DOUBLE_HYPHEN : HYPHEN ); + buffer.append( option ); + + if ( i.hasNext() ) + buffer.append( ", " ); + } + + maybeAppendOptionInfo( buffer, descriptor ); + + return buffer.toString(); + } + + private void maybeAppendOptionInfo( StringBuilder buffer, OptionDescriptor descriptor ) { + String indicator = extractTypeIndicator( descriptor ); + String description = descriptor.argumentDescription(); + if ( indicator != null || !isNullOrEmpty( description ) ) + appendOptionHelp( buffer, indicator, description, descriptor.requiresArgument() ); + } + + private String extractTypeIndicator( OptionDescriptor descriptor ) { + String indicator = descriptor.argumentTypeIndicator(); + + if ( !isNullOrEmpty( indicator ) && !String.class.getName().equals( indicator ) ) + return shortNameOf( indicator ); + + return null; + } + + private void appendOptionHelp( StringBuilder buffer, String typeIndicator, String description, boolean required ) { + if ( required ) + appendTypeIndicator( buffer, typeIndicator, description, '<', '>' ); + else + appendTypeIndicator( buffer, typeIndicator, description, '[', ']' ); + } + + private void appendTypeIndicator( StringBuilder buffer, String typeIndicator, String description, + char start, char end ) { + buffer.append( ' ' ).append( start ); + if ( typeIndicator != null ) + buffer.append( typeIndicator ); + + if ( !Strings.isNullOrEmpty( description ) ) { + if ( typeIndicator != null ) + buffer.append( ": " ); + + buffer.append( description ); + } + + buffer.append( end ); + } + + private String createDescriptionDisplay( OptionDescriptor descriptor ) { + List defaultValues = descriptor.defaultValues(); + if ( defaultValues.isEmpty() ) + return descriptor.description(); + + String defaultValuesDisplay = createDefaultValuesDisplay( defaultValues ); + return ( descriptor.description() + ' ' + surround( "default: " + defaultValuesDisplay, '(', ')' ) ).trim(); + } + + private String createDefaultValuesDisplay( List defaultValues ) { + return defaultValues.size() == 1 ? defaultValues.get( 0 ).toString() : defaultValues.toString(); + } + + private void fitRowsToWidth() { + nonOptionRows.fitToWidth(); + optionRows.fitToWidth(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/HelpFormatter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/HelpFormatter.java new file mode 100644 index 00000000000..e5dd316f1d7 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/HelpFormatter.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Map; + +/** + *

Represents objects charged with taking a set of option descriptions and producing some help text from them.

+ * + * @author Paul Holser + */ +public interface HelpFormatter { + /** + * Produces help text, given a set of option descriptors. + * + * @param options descriptors for the configured options of a parser + * @return text to be used as help + * @see OptionParser#printHelpOn(java.io.Writer) + * @see OptionParser#formatHelpWith(HelpFormatter) + */ + String format( Map options ); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/IllegalOptionSpecificationException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/IllegalOptionSpecificationException.java new file mode 100644 index 00000000000..8696bf1a150 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/IllegalOptionSpecificationException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static java.util.Collections.*; + +/** + * Thrown when the option parser is asked to recognize an option with illegal characters in it. + * + * @author Paul Holser + */ +class IllegalOptionSpecificationException extends OptionException { + private static final long serialVersionUID = -1L; + + IllegalOptionSpecificationException( String option ) { + super( singletonList( option ) ); + } + + @Override + public String getMessage() { + return singleOptionMessage() + " is not a legal option character"; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MissingRequiredOptionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MissingRequiredOptionException.java new file mode 100644 index 00000000000..2c997e2052c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MissingRequiredOptionException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Thrown when an option is marked as required, but not specified on the command line. + * + * @author Emils Solmanis + */ +class MissingRequiredOptionException extends OptionException { + private static final long serialVersionUID = -1L; + + protected MissingRequiredOptionException( Collection options ) { + super( options ); + } + + @Override + public String getMessage() { + return "Missing required option(s) " + multipleOptionMessage(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MultipleArgumentsForOptionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MultipleArgumentsForOptionException.java new file mode 100644 index 00000000000..e96cea33918 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/MultipleArgumentsForOptionException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Thrown when asking an {@link OptionSet} for a single argument of an option when many have been specified. + * + * @author Paul Holser + */ +class MultipleArgumentsForOptionException extends OptionException { + private static final long serialVersionUID = -1L; + + MultipleArgumentsForOptionException( Collection options ) { + super( options ); + } + + @Override + public String getMessage() { + return "Found multiple arguments for option " + multipleOptionMessage() + ", but you asked for only one"; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NoArgumentOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NoArgumentOptionSpec.java new file mode 100644 index 00000000000..9647ff1bad2 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NoArgumentOptionSpec.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; +import java.util.List; + +import static java.util.Collections.*; + +/** + * A specification for an option that does not accept arguments. + * + * @author Paul Holser + */ +class NoArgumentOptionSpec extends AbstractOptionSpec { + NoArgumentOptionSpec( String option ) { + this( singletonList( option ), "" ); + } + + NoArgumentOptionSpec( Collection options, String description ) { + super( options, description ); + } + + @Override + void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, + String detectedArgument ) { + + detectedOptions.add( this ); + } + + public boolean acceptsArguments() { + return false; + } + + public boolean requiresArgument() { + return false; + } + + public boolean isRequired() { + return false; + } + + public String argumentDescription() { + return ""; + } + + public String argumentTypeIndicator() { + return ""; + } + + @Override + protected Void convert( String argument ) { + return null; + } + + public List defaultValues() { + return emptyList(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NonOptionArgumentSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NonOptionArgumentSpec.java new file mode 100644 index 00000000000..8124a05e366 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/NonOptionArgumentSpec.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.List; + +import static java.util.Arrays.*; +import static java.util.Collections.*; +import static jdk.internal.joptsimple.internal.Reflection.*; + +/** + *

Specification of a command line's non-option arguments.

+ * + *

Instances are returned from {@link OptionParser} methods to allow the formation of parser directives as + * sentences in a "fluent interface" language. For example:

+ * + *
+ *   
+ *   OptionParser parser = new OptionParser();
+ *   parser.nonOptions( "files to be processed" ).ofType( File.class );
+ *   
+ * 
+ * + *

If no methods are invoked on an instance of this class, then that instance's option will treat the non-option + * arguments as {@link String}s.

+ * + * @param represents the type of the non-option arguments + * @author Paul Holser + */ +public class NonOptionArgumentSpec extends AbstractOptionSpec { + static final String NAME = "[arguments]"; + + private ValueConverter converter; + private String argumentDescription = ""; + + NonOptionArgumentSpec() { + this(""); + } + + NonOptionArgumentSpec( String description ) { + super( asList( NAME ), description ); + } + + /** + *

Specifies a type to which the non-option arguments are to be converted.

+ * + *

JOpt Simple accepts types that have either:

+ * + *
    + *
  1. a public static method called {@code valueOf} which accepts a single argument of type {@link String} + * and whose return type is the same as the class on which the method is declared. The {@code java.lang} + * primitive wrapper classes have such methods.
  2. + * + *
  3. a public constructor which accepts a single argument of type {@link String}.
  4. + *
+ * + *

This class converts arguments using those methods in that order; that is, {@code valueOf} would be invoked + * before a one-{@link String}-arg constructor would.

+ * + *

Invoking this method will trump any previous calls to this method or to + * {@link #withValuesConvertedBy(ValueConverter)}.

+ * + * @param represents the runtime class of the desired option argument type + * @param argumentType desired type of arguments to this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if the type is {@code null} + * @throws IllegalArgumentException if the type does not have the standard conversion methods + */ + @SuppressWarnings( "unchecked" ) + public NonOptionArgumentSpec ofType( Class argumentType ) { + converter = (ValueConverter) findConverter( argumentType ); + return (NonOptionArgumentSpec) this; + } + + /** + *

Specifies a converter to use to translate non-option arguments into Java objects. This is useful + * when converting to types that do not have the requisite factory method or constructor for + * {@link #ofType(Class)}.

+ * + *

Invoking this method will trump any previous calls to this method or to {@link #ofType(Class)}. + * + * @param represents the runtime class of the desired non-option argument type + * @param aConverter the converter to use + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws NullPointerException if the converter is {@code null} + */ + @SuppressWarnings( "unchecked" ) + public final NonOptionArgumentSpec withValuesConvertedBy( ValueConverter aConverter ) { + if ( aConverter == null ) + throw new NullPointerException( "illegal null converter" ); + + converter = (ValueConverter) aConverter; + return (NonOptionArgumentSpec) this; + } + + /** + *

Specifies a description for the non-option arguments that this spec represents. This description is used + * when generating help information about the parser.

+ * + * @param description describes the nature of the argument of this spec's option + * @return self, so that the caller can add clauses to the fluent interface sentence + */ + public NonOptionArgumentSpec describedAs( String description ) { + argumentDescription = description; + return this; + } + + @Override + protected final V convert( String argument ) { + return convertWith( converter, argument ); + } + + @Override + void handleOption( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, + String detectedArgument ) { + + detectedOptions.addWithArgument( this, detectedArgument ); + } + + public List defaultValues() { + return emptyList(); + } + + public boolean isRequired() { + return false; + } + + public boolean acceptsArguments() { + return false; + } + + public boolean requiresArgument() { + return false; + } + + public String argumentDescription() { + return argumentDescription; + } + + public String argumentTypeIndicator() { + return argumentTypeIndicatorFrom( converter ); + } + + public boolean representsNonOptions() { + return true; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionArgumentConversionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionArgumentConversionException.java new file mode 100644 index 00000000000..063b97200f8 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionArgumentConversionException.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Thrown when a problem occurs converting an argument of an option from {@link String} to another type. + * + * @author Paul Holser + */ +class OptionArgumentConversionException extends OptionException { + private static final long serialVersionUID = -1L; + + private final String argument; + + OptionArgumentConversionException( Collection options, String argument, Throwable cause ) { + super( options, cause ); + + this.argument = argument; + } + + @Override + public String getMessage() { + return "Cannot parse argument '" + argument + "' of option " + multipleOptionMessage(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDeclarer.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDeclarer.java new file mode 100644 index 00000000000..2a85e25901a --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDeclarer.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Trains the option parser. This interface aids integration with other code which may expose declaration of options but + * not actual command-line parsing. + * + * @author Paul Holser + * @see OptionParser + */ +public interface OptionDeclarer { + /** + * Tells the parser to recognize the given option. + * + *

This method returns an instance of {@link OptionSpecBuilder} to allow the formation of parser directives + * as sentences in a fluent interface language. For example:

+ * + *

+     *   OptionDeclarer parser = new OptionParser();
+     *   parser.accepts( "c" ).withRequiredArg().ofType( Integer.class );
+     * 
+ * + *

If no methods are invoked on the returned {@link OptionSpecBuilder}, then the parser treats the option as + * accepting no argument.

+ * + * @param option the option to recognize + * @return an object that can be used to flesh out more detail about the option + * @throws OptionException if the option contains illegal characters + * @throws NullPointerException if the option is {@code null} + */ + OptionSpecBuilder accepts( String option ); + + /** + * Tells the parser to recognize the given option. + * + * @see #accepts(String) + * @param option the option to recognize + * @param description a string that describes the purpose of the option. This is used when generating help + * information about the parser. + * @return an object that can be used to flesh out more detail about the option + * @throws OptionException if the option contains illegal characters + * @throws NullPointerException if the option is {@code null} + */ + OptionSpecBuilder accepts( String option, String description ); + + /** + * Tells the parser to recognize the given options, and treat them as synonymous. + * + * @see #accepts(String) + * @param options the options to recognize and treat as synonymous + * @return an object that can be used to flesh out more detail about the options + * @throws OptionException if any of the options contain illegal characters + * @throws NullPointerException if the option list or any of its elements are {@code null} + */ + OptionSpecBuilder acceptsAll( Collection options ); + + /** + * Tells the parser to recognize the given options, and treat them as synonymous. + * + * @see #acceptsAll(Collection) + * @param options the options to recognize and treat as synonymous + * @param description a string that describes the purpose of the option. This is used when generating help + * information about the parser. + * @return an object that can be used to flesh out more detail about the options + * @throws OptionException if any of the options contain illegal characters + * @throws NullPointerException if the option list or any of its elements are {@code null} + * @throws IllegalArgumentException if the option list is empty + */ + OptionSpecBuilder acceptsAll( Collection options, String description ); + + /** + * Gives an object that represents an access point for non-option arguments on a command line. + * + * @return an object that can be used to flesh out more detail about the non-option arguments + */ + NonOptionArgumentSpec nonOptions(); + + /** + * Gives an object that represents an access point for non-option arguments on a command line. + * + * @see #nonOptions() + * @param description a string that describes the purpose of the non-option arguments. This is used when generating + * help information about the parser. + * @return an object that can be used to flesh out more detail about the non-option arguments + */ + NonOptionArgumentSpec nonOptions( String description ); + + /** + * Tells the parser whether or not to behave "POSIX-ly correct"-ly. + * + * @param setting {@code true} if the parser should behave "POSIX-ly correct"-ly + */ + void posixlyCorrect( boolean setting ); + + /** + *

Tells the parser to treat unrecognized options as non-option arguments.

+ * + *

If not called, then the parser raises an {@link OptionException} when it encounters an unrecognized + * option.

+ */ + void allowsUnrecognizedOptions(); + + /** + * Tells the parser either to recognize or ignore "-W"-style long options. + * + * @param recognize {@code true} if the parser is to recognize the special style of long options + */ + void recognizeAlternativeLongOptions( boolean recognize ); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDescriptor.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDescriptor.java new file mode 100644 index 00000000000..4a6694814f3 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionDescriptor.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; +import java.util.List; + +/** + * Describes options that an option parser recognizes, in ways that might be useful to {@linkplain HelpFormatter + * help screens}. + * + * @author Paul Holser + */ +public interface OptionDescriptor { + /** + * A set of options that are mutually synonymous. + * + * @return synonymous options + */ + Collection options(); + + /** + * Description of this option's purpose. + * + * @return a description for the option + */ + String description(); + + /** + * What values will the option take if none are specified on the command line? + * + * @return any default values for the option + */ + List defaultValues(); + + /** + * Is this option {@linkplain ArgumentAcceptingOptionSpec#required() required} on a command line? + * + * @return whether the option is required + */ + boolean isRequired(); + + /** + * Does this option {@linkplain ArgumentAcceptingOptionSpec accept arguments}? + * + * @return whether the option accepts arguments + */ + boolean acceptsArguments(); + + /** + * Does this option {@linkplain OptionSpecBuilder#withRequiredArg() require an argument}? + * + * @return whether the option requires an argument + */ + boolean requiresArgument(); + + /** + * Gives a short {@linkplain ArgumentAcceptingOptionSpec#describedAs(String) description} of the option's argument. + * + * @return a description for the option's argument + */ + String argumentDescription(); + + /** + * Gives an indication of the {@linkplain ArgumentAcceptingOptionSpec#ofType(Class) expected type} of the option's + * argument. + * + * @return a description for the option's argument type + */ + String argumentTypeIndicator(); + + /** + * Tells whether this object represents the non-option arguments of a command line. + * + * @return {@code true} if this represents non-option arguments + */ + boolean representsNonOptions(); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionException.java new file mode 100644 index 00000000000..15977b63801 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionException.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import static java.util.Collections.*; + +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + * Thrown when a problem occurs during option parsing. + * + * @author Paul Holser + */ +public abstract class OptionException extends RuntimeException { + private static final long serialVersionUID = -1L; + + private final List options = new ArrayList(); + + protected OptionException( Collection options ) { + this.options.addAll( options ); + } + + protected OptionException( Collection options, Throwable cause ) { + super( cause ); + + this.options.addAll( options ); + } + + /** + * Gives the option being considered when the exception was created. + * + * @return the option being considered when the exception was created + */ + public Collection options() { + return unmodifiableCollection( options ); + } + + protected final String singleOptionMessage() { + return singleOptionMessage( options.get( 0 ) ); + } + + protected final String singleOptionMessage( String option ) { + return SINGLE_QUOTE + option + SINGLE_QUOTE; + } + + protected final String multipleOptionMessage() { + StringBuilder buffer = new StringBuilder( "[" ); + + for ( Iterator iter = options.iterator(); iter.hasNext(); ) { + buffer.append( singleOptionMessage( iter.next() ) ); + if ( iter.hasNext() ) + buffer.append( ", " ); + } + + buffer.append( ']' ); + + return buffer.toString(); + } + + static OptionException unrecognizedOption( String option ) { + return new UnrecognizedOptionException( option ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionMissingRequiredArgumentException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionMissingRequiredArgumentException.java new file mode 100644 index 00000000000..f667b446527 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionMissingRequiredArgumentException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Thrown when the option parser discovers an option that requires an argument, but that argument is missing. + * + * @author Paul Holser + */ +class OptionMissingRequiredArgumentException extends OptionException { + private static final long serialVersionUID = -1L; + + OptionMissingRequiredArgumentException( Collection options ) { + super( options ); + } + + @Override + public String getMessage() { + return "Option " + multipleOptionMessage() + " requires an argument"; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParser.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParser.java new file mode 100644 index 00000000000..c6c319a329a --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParser.java @@ -0,0 +1,580 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import jdk.internal.joptsimple.internal.AbbreviationMap; +import jdk.internal.joptsimple.util.KeyValuePair; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import static java.util.Collections.*; +import static jdk.internal.joptsimple.OptionException.*; +import static jdk.internal.joptsimple.OptionParserState.*; +import static jdk.internal.joptsimple.ParserRules.*; + +/** + *

Parses command line arguments, using a syntax that attempts to take from the best of POSIX {@code getopt()} + * and GNU {@code getopt_long()}.

+ * + *

This parser supports short options and long options.

+ * + *
    + *
  • Short options begin with a single hyphen ("-") followed by a single letter or digit, + * or question mark ("?"), or dot (".").
  • + * + *
  • Short options can accept single arguments. The argument can be made required or optional. The option's + * argument can occur: + *
      + *
    • in the slot after the option, as in -d /tmp
    • + *
    • right up against the option, as in -d/tmp
    • + *
    • right up against the option separated by an equals sign ("="), as in -d=/tmp
    • + *
    + * To specify n arguments for an option, specify the option n times, once for each argument, + * as in -d /tmp -d /var -d /opt; or, when using the + * {@linkplain ArgumentAcceptingOptionSpec#withValuesSeparatedBy(char) "separated values"} clause of the "fluent + * interface" (see below), give multiple values separated by a given character as a single argument to the + * option.
  • + * + *
  • Short options can be clustered, so that -abc is treated as -a -b -c. If a short option + * in the cluster can accept an argument, the remaining characters are interpreted as the argument for that + * option.
  • + * + *
  • An argument consisting only of two hyphens ("--") signals that the remaining arguments are to be + * treated as non-options.
  • + * + *
  • An argument consisting only of a single hyphen is considered a non-option argument (though it can be an + * argument of an option). Many Unix programs treat single hyphens as stand-ins for the standard input or standard + * output streams.
  • + * + *
  • Long options begin with two hyphens ("--"), followed by multiple letters, digits, + * hyphens, question marks, or dots. A hyphen cannot be the first character of a long option specification when + * configuring the parser.
  • + * + *
  • You can abbreviate long options, so long as the abbreviation is unique.
  • + * + *
  • Long options can accept single arguments. The argument can be made required or optional. The option's + * argument can occur: + *
      + *
    • in the slot after the option, as in --directory /tmp
    • + *
    • right up against the option separated by an equals sign ("="), as in + * --directory=/tmp + *
    + * Specify multiple arguments for a long option in the same manner as for short options (see above).
  • + * + *
  • You can use a single hyphen ("-") instead of a double hyphen ("--") for a long + * option.
  • + * + *
  • The option -W is reserved. If you tell the parser to {@linkplain + * #recognizeAlternativeLongOptions(boolean) recognize alternative long options}, then it will treat, for example, + * -W foo=bar as the long option foo with argument bar, as though you had written + * --foo=bar.
  • + * + *
  • You can specify -W as a valid short option, or use it as an abbreviation for a long option, but + * {@linkplain #recognizeAlternativeLongOptions(boolean) recognizing alternative long options} will always supersede + * this behavior.
  • + * + *
  • You can specify a given short or long option multiple times on a single command line. The parser collects + * any arguments specified for those options as a list.
  • + * + *
  • If the parser detects an option whose argument is optional, and the next argument "looks like" an option, + * that argument is not treated as the argument to the option, but as a potentially valid option. If, on the other + * hand, the optional argument is typed as a derivative of {@link Number}, then that argument is treated as the + * negative number argument of the option, even if the parser recognizes the corresponding numeric option. + * For example: + *
    
    + *     OptionParser parser = new OptionParser();
    + *     parser.accepts( "a" ).withOptionalArg().ofType( Integer.class );
    + *     parser.accepts( "2" );
    + *     OptionSet options = parser.parse( "-a", "-2" );
    + *   
    + * In this case, the option set contains "a" with argument -2, not both "a" and + * "2". Swapping the elements in the args array gives the latter.
  • + *
+ * + *

There are two ways to tell the parser what options to recognize:

+ * + *
    + *
  1. A "fluent interface"-style API for specifying options, available since version 2. Sentences in this fluent + * interface language begin with a call to {@link #accepts(String) accepts} or {@link #acceptsAll(Collection) + * acceptsAll} methods; calls on the ensuing chain of objects describe whether the options can take an argument, + * whether the argument is required or optional, to what type arguments of the options should be converted if any, + * etc. Since version 3, these calls return an instance of {@link OptionSpec}, which can subsequently be used to + * retrieve the arguments of the associated option in a type-safe manner.
  2. + * + *
  3. Since version 1, a more concise way of specifying short options has been to use the special {@linkplain + * #OptionParser(String) constructor}. Arguments of options specified in this manner will be of type {@link String}. + * Here are the rules for the format of the specification strings this constructor accepts: + * + *
      + *
    • Any letter or digit is treated as an option character.
    • + * + *
    • An option character can be immediately followed by an asterisk (*) to indicate that the option is a + * "help" option.
    • + * + *
    • If an option character (with possible trailing asterisk) is followed by a single colon (":"), + * then the option requires an argument.
    • + * + *
    • If an option character (with possible trailing asterisk) is followed by two colons ("::"), + * then the option accepts an optional argument.
    • + * + *
    • Otherwise, the option character accepts no argument.
    • + * + *
    • If the option specification string begins with a plus sign ("+"), the parser will behave + * "POSIX-ly correct".
    • + * + *
    • If the option specification string contains the sequence "W;" (capital W followed by a + * semicolon), the parser will recognize the alternative form of long options.
    • + *
    + *
  4. + *
+ * + *

Each of the options in a list of options given to {@link #acceptsAll(Collection) acceptsAll} is treated as a + * synonym of the others. For example: + *

+ *     
+ *     OptionParser parser = new OptionParser();
+ *     parser.acceptsAll( asList( "w", "interactive", "confirmation" ) );
+ *     OptionSet options = parser.parse( "-w" );
+ *     
+ *   
+ * In this case, options.{@link OptionSet#has(String) has} would answer {@code true} when given arguments + * "w", "interactive", and "confirmation". The {@link OptionSet} would give the same + * responses to these arguments for its other methods as well.

+ * + *

By default, as with GNU {@code getopt()}, the parser allows intermixing of options and non-options. If, however, + * the parser has been created to be "POSIX-ly correct", then the first argument that does not look lexically like an + * option, and is not a required argument of a preceding option, signals the end of options. You can still bind + * optional arguments to their options using the abutting (for short options) or = syntax.

+ * + *

Unlike GNU {@code getopt()}, this parser does not honor the environment variable {@code POSIXLY_CORRECT}. + * "POSIX-ly correct" parsers are configured by either:

+ * + *
    + *
  1. using the method {@link #posixlyCorrect(boolean)}, or
  2. + * + *
  3. using the {@linkplain #OptionParser(String) constructor} with an argument whose first character is a plus sign + * ("+")
  4. + *
+ * + * @author Paul Holser + * @see The GNU C Library + */ +public class OptionParser implements OptionDeclarer { + private final AbbreviationMap> recognizedOptions; + private final Map, Set>> requiredIf; + private final Map, Set>> requiredUnless; + private OptionParserState state; + private boolean posixlyCorrect; + private boolean allowsUnrecognizedOptions; + private HelpFormatter helpFormatter = new BuiltinHelpFormatter(); + + /** + * Creates an option parser that initially recognizes no options, and does not exhibit "POSIX-ly correct" + * behavior. + */ + public OptionParser() { + recognizedOptions = new AbbreviationMap>(); + requiredIf = new HashMap, Set>>(); + requiredUnless = new HashMap, Set>>(); + state = moreOptions( false ); + + recognize( new NonOptionArgumentSpec() ); + } + + /** + * Creates an option parser and configures it to recognize the short options specified in the given string. + * + * Arguments of options specified this way will be of type {@link String}. + * + * @param optionSpecification an option specification + * @throws NullPointerException if {@code optionSpecification} is {@code null} + * @throws OptionException if the option specification contains illegal characters or otherwise cannot be + * recognized + */ + public OptionParser( String optionSpecification ) { + this(); + + new OptionSpecTokenizer( optionSpecification ).configure( this ); + } + + public OptionSpecBuilder accepts( String option ) { + return acceptsAll( singletonList( option ) ); + } + + public OptionSpecBuilder accepts( String option, String description ) { + return acceptsAll( singletonList( option ), description ); + } + + public OptionSpecBuilder acceptsAll( Collection options ) { + return acceptsAll( options, "" ); + } + + public OptionSpecBuilder acceptsAll( Collection options, String description ) { + if ( options.isEmpty() ) + throw new IllegalArgumentException( "need at least one option" ); + + ensureLegalOptions( options ); + + return new OptionSpecBuilder( this, options, description ); + } + + public NonOptionArgumentSpec nonOptions() { + NonOptionArgumentSpec spec = new NonOptionArgumentSpec(); + + recognize( spec ); + + return spec; + } + + public NonOptionArgumentSpec nonOptions( String description ) { + NonOptionArgumentSpec spec = new NonOptionArgumentSpec( description ); + + recognize( spec ); + + return spec; + } + + public void posixlyCorrect( boolean setting ) { + posixlyCorrect = setting; + state = moreOptions( setting ); + } + + boolean posixlyCorrect() { + return posixlyCorrect; + } + + public void allowsUnrecognizedOptions() { + allowsUnrecognizedOptions = true; + } + + boolean doesAllowsUnrecognizedOptions() { + return allowsUnrecognizedOptions; + } + + public void recognizeAlternativeLongOptions( boolean recognize ) { + if ( recognize ) + recognize( new AlternativeLongOptionSpec() ); + else + recognizedOptions.remove( String.valueOf( RESERVED_FOR_EXTENSIONS ) ); + } + + void recognize( AbstractOptionSpec spec ) { + recognizedOptions.putAll( spec.options(), spec ); + } + + /** + * Writes information about the options this parser recognizes to the given output sink. + * + * The output sink is flushed, but not closed. + * + * @param sink the sink to write information to + * @throws IOException if there is a problem writing to the sink + * @throws NullPointerException if {@code sink} is {@code null} + * @see #printHelpOn(Writer) + */ + public void printHelpOn( OutputStream sink ) throws IOException { + printHelpOn( new OutputStreamWriter( sink ) ); + } + + /** + * Writes information about the options this parser recognizes to the given output sink. + * + * The output sink is flushed, but not closed. + * + * @param sink the sink to write information to + * @throws IOException if there is a problem writing to the sink + * @throws NullPointerException if {@code sink} is {@code null} + * @see #printHelpOn(OutputStream) + */ + public void printHelpOn( Writer sink ) throws IOException { + sink.write( helpFormatter.format( recognizedOptions.toJavaUtilMap() ) ); + sink.flush(); + } + + /** + * Tells the parser to use the given formatter when asked to {@linkplain #printHelpOn(java.io.Writer) print help}. + * + * @param formatter the formatter to use for printing help + * @throws NullPointerException if the formatter is {@code null} + */ + public void formatHelpWith( HelpFormatter formatter ) { + if ( formatter == null ) + throw new NullPointerException(); + + helpFormatter = formatter; + } + + /** + * Retrieves all the options which have been configured for the parser. + * + * @return a {@link Map} containing all the configured options and their corresponding {@link OptionSpec} + */ + public Map> recognizedOptions() { + return new HashMap>( recognizedOptions.toJavaUtilMap() ); + } + + /** + * Parses the given command line arguments according to the option specifications given to the parser. + * + * @param arguments arguments to parse + * @return an {@link OptionSet} describing the parsed options, their arguments, and any non-option arguments found + * @throws OptionException if problems are detected while parsing + * @throws NullPointerException if the argument list is {@code null} + */ + public OptionSet parse( String... arguments ) { + ArgumentList argumentList = new ArgumentList( arguments ); + OptionSet detected = new OptionSet( recognizedOptions.toJavaUtilMap() ); + detected.add( recognizedOptions.get( NonOptionArgumentSpec.NAME ) ); + + while ( argumentList.hasMore() ) + state.handleArgument( this, argumentList, detected ); + + reset(); + + ensureRequiredOptions( detected ); + + return detected; + } + + private void ensureRequiredOptions( OptionSet options ) { + Collection missingRequiredOptions = missingRequiredOptions( options ); + boolean helpOptionPresent = isHelpOptionPresent( options ); + + if ( !missingRequiredOptions.isEmpty() && !helpOptionPresent ) + throw new MissingRequiredOptionException( missingRequiredOptions ); + } + + private Collection missingRequiredOptions( OptionSet options ) { + Collection missingRequiredOptions = new HashSet(); + + for ( AbstractOptionSpec each : recognizedOptions.toJavaUtilMap().values() ) { + if ( each.isRequired() && !options.has( each ) ) + missingRequiredOptions.addAll( each.options() ); + } + + for ( Map.Entry, Set>> eachEntry : requiredIf.entrySet() ) { + AbstractOptionSpec required = specFor( eachEntry.getKey().iterator().next() ); + + if ( optionsHasAnyOf( options, eachEntry.getValue() ) && !options.has( required ) ) { + missingRequiredOptions.addAll( required.options() ); + } + } + + for ( Map.Entry, Set>> eachEntry : requiredUnless.entrySet() ) { + AbstractOptionSpec required = specFor( eachEntry.getKey().iterator().next() ); + + if ( !optionsHasAnyOf( options, eachEntry.getValue() ) && !options.has( required ) ) { + missingRequiredOptions.addAll( required.options() ); + } + } + + return missingRequiredOptions; + } + + private boolean optionsHasAnyOf( OptionSet options, Collection> specs ) { + for ( OptionSpec each : specs ) { + if ( options.has( each ) ) + return true; + } + + return false; + } + + private boolean isHelpOptionPresent( OptionSet options ) { + boolean helpOptionPresent = false; + for ( AbstractOptionSpec each : recognizedOptions.toJavaUtilMap().values() ) { + if ( each.isForHelp() && options.has( each ) ) { + helpOptionPresent = true; + break; + } + } + return helpOptionPresent; + } + + void handleLongOptionToken( String candidate, ArgumentList arguments, OptionSet detected ) { + KeyValuePair optionAndArgument = parseLongOptionWithArgument( candidate ); + + if ( !isRecognized( optionAndArgument.key ) ) + throw unrecognizedOption( optionAndArgument.key ); + + AbstractOptionSpec optionSpec = specFor( optionAndArgument.key ); + optionSpec.handleOption( this, arguments, detected, optionAndArgument.value ); + } + + void handleShortOptionToken( String candidate, ArgumentList arguments, OptionSet detected ) { + KeyValuePair optionAndArgument = parseShortOptionWithArgument( candidate ); + + if ( isRecognized( optionAndArgument.key ) ) { + specFor( optionAndArgument.key ).handleOption( this, arguments, detected, optionAndArgument.value ); + } + else + handleShortOptionCluster( candidate, arguments, detected ); + } + + private void handleShortOptionCluster( String candidate, ArgumentList arguments, OptionSet detected ) { + char[] options = extractShortOptionsFrom( candidate ); + validateOptionCharacters( options ); + + for ( int i = 0; i < options.length; i++ ) { + AbstractOptionSpec optionSpec = specFor( options[ i ] ); + + if ( optionSpec.acceptsArguments() && options.length > i + 1 ) { + String detectedArgument = String.valueOf( options, i + 1, options.length - 1 - i ); + optionSpec.handleOption( this, arguments, detected, detectedArgument ); + break; + } + + optionSpec.handleOption( this, arguments, detected, null ); + } + } + + void handleNonOptionArgument( String candidate, ArgumentList arguments, OptionSet detectedOptions ) { + specFor( NonOptionArgumentSpec.NAME ).handleOption( this, arguments, detectedOptions, candidate ); + } + + void noMoreOptions() { + state = OptionParserState.noMoreOptions(); + } + + boolean looksLikeAnOption( String argument ) { + return isShortOptionToken( argument ) || isLongOptionToken( argument ); + } + + boolean isRecognized( String option ) { + return recognizedOptions.contains( option ); + } + + void requiredIf( Collection precedentSynonyms, String required ) { + requiredIf( precedentSynonyms, specFor( required ) ); + } + + void requiredIf( Collection precedentSynonyms, OptionSpec required ) { + putRequiredOption( precedentSynonyms, required, requiredIf ); + } + + void requiredUnless( Collection precedentSynonyms, String required ) { + requiredUnless( precedentSynonyms, specFor( required ) ); + } + + void requiredUnless( Collection precedentSynonyms, OptionSpec required ) { + putRequiredOption( precedentSynonyms, required, requiredUnless ); + } + + private void putRequiredOption( Collection precedentSynonyms, OptionSpec required, + Map, Set>> target ) { + + for ( String each : precedentSynonyms ) { + AbstractOptionSpec spec = specFor( each ); + if ( spec == null ) + throw new UnconfiguredOptionException( precedentSynonyms ); + } + + Set> associated = target.get( precedentSynonyms ); + if ( associated == null ) { + associated = new HashSet>(); + target.put( precedentSynonyms, associated ); + } + + associated.add( required ); + } + + private AbstractOptionSpec specFor( char option ) { + return specFor( String.valueOf( option ) ); + } + + private AbstractOptionSpec specFor( String option ) { + return recognizedOptions.get( option ); + } + + private void reset() { + state = moreOptions( posixlyCorrect ); + } + + private static char[] extractShortOptionsFrom( String argument ) { + char[] options = new char[ argument.length() - 1 ]; + argument.getChars( 1, argument.length(), options, 0 ); + + return options; + } + + private void validateOptionCharacters( char[] options ) { + for ( char each : options ) { + String option = String.valueOf( each ); + + if ( !isRecognized( option ) ) + throw unrecognizedOption( option ); + + if ( specFor( option ).acceptsArguments() ) + return; + } + } + + private static KeyValuePair parseLongOptionWithArgument( String argument ) { + return KeyValuePair.valueOf( argument.substring( 2 ) ); + } + + private static KeyValuePair parseShortOptionWithArgument( String argument ) { + return KeyValuePair.valueOf( argument.substring( 1 ) ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParserState.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParserState.java new file mode 100644 index 00000000000..7fdbcbf3618 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionParserState.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static jdk.internal.joptsimple.ParserRules.*; + +/** + * Abstraction of parser state; mostly serves to model how a parser behaves depending on whether end-of-options + * has been detected. + * + * @author Paul Holser + */ +abstract class OptionParserState { + static OptionParserState noMoreOptions() { + return new OptionParserState() { + @Override + protected void handleArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) { + parser.handleNonOptionArgument( arguments.next(), arguments, detectedOptions ); + } + }; + } + + static OptionParserState moreOptions( final boolean posixlyCorrect ) { + return new OptionParserState() { + @Override + protected void handleArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) { + String candidate = arguments.next(); + try { + if ( isOptionTerminator( candidate ) ) { + parser.noMoreOptions(); + return; + } else if ( isLongOptionToken( candidate ) ) { + parser.handleLongOptionToken( candidate, arguments, detectedOptions ); + return; + } else if ( isShortOptionToken( candidate ) ) { + parser.handleShortOptionToken( candidate, arguments, detectedOptions ); + return; + } + } catch ( UnrecognizedOptionException e ) { + if ( !parser.doesAllowsUnrecognizedOptions() ) + throw e; + } + + if ( posixlyCorrect ) + parser.noMoreOptions(); + + parser.handleNonOptionArgument( candidate, arguments, detectedOptions ); + } + }; + } + + protected abstract void handleArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSet.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSet.java new file mode 100644 index 00000000000..71061156fa0 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSet.java @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.*; + +import static java.util.Collections.*; + +import static jdk.internal.joptsimple.internal.Objects.*; + +/** + * Representation of a group of detected command line options, their arguments, and non-option arguments. + * + * @author Paul Holser + */ +public class OptionSet { + private final List> detectedSpecs; + private final Map> detectedOptions; + private final Map, List> optionsToArguments; + private final Map> recognizedSpecs; + private final Map> defaultValues; + + /* + * Package-private because clients don't create these. + */ + OptionSet( Map> recognizedSpecs ) { + detectedSpecs = new ArrayList>(); + detectedOptions = new HashMap>(); + optionsToArguments = new IdentityHashMap, List>(); + defaultValues = defaultValues( recognizedSpecs ); + this.recognizedSpecs = recognizedSpecs; + } + + /** + * Tells whether any options were detected. + * + * @return {@code true} if any options were detected + */ + public boolean hasOptions() { + return !detectedOptions.isEmpty(); + } + + /** + * Tells whether the given option was detected. + * + * @param option the option to search for + * @return {@code true} if the option was detected + * @see #has(OptionSpec) + */ + public boolean has( String option ) { + return detectedOptions.containsKey( option ); + } + + /** + * Tells whether the given option was detected. + * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + *

Specifying a {@linkplain ArgumentAcceptingOptionSpec#defaultsTo(Object, Object[])} default argument value} + * for an option does not cause this method to return {@code true} if the option was not detected on the command + * line.

+ * + * @param option the option to search for + * @return {@code true} if the option was detected + * @see #has(String) + */ + public boolean has( OptionSpec option ) { + return optionsToArguments.containsKey( option ); + } + + /** + * Tells whether there are any arguments associated with the given option. + * + * @param option the option to search for + * @return {@code true} if the option was detected and at least one argument was detected for the option + * @see #hasArgument(OptionSpec) + */ + public boolean hasArgument( String option ) { + AbstractOptionSpec spec = detectedOptions.get( option ); + return spec != null && hasArgument( spec ); + } + + /** + * Tells whether there are any arguments associated with the given option. + * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + *

Specifying a {@linkplain ArgumentAcceptingOptionSpec#defaultsTo(Object, Object[]) default argument value} + * for an option does not cause this method to return {@code true} if the option was not detected on the command + * line, or if the option can take an optional argument but did not have one on the command line.

+ * + * @param option the option to search for + * @return {@code true} if the option was detected and at least one argument was detected for the option + * @throws NullPointerException if {@code option} is {@code null} + * @see #hasArgument(String) + */ + public boolean hasArgument( OptionSpec option ) { + ensureNotNull( option ); + + List values = optionsToArguments.get( option ); + return values != null && !values.isEmpty(); + } + + /** + * Gives the argument associated with the given option. If the option was given an argument type, the argument + * will take on that type; otherwise, it will be a {@link String}. + * + *

Specifying a {@linkplain ArgumentAcceptingOptionSpec#defaultsTo(Object, Object[]) default argument value} + * for an option will cause this method to return that default value even if the option was not detected on the + * command line, or if the option can take an optional argument but did not have one on the command line.

+ * + * @param option the option to search for + * @return the argument of the given option; {@code null} if no argument is present, or that option was not + * detected + * @throws NullPointerException if {@code option} is {@code null} + * @throws OptionException if more than one argument was detected for the option + */ + public Object valueOf( String option ) { + ensureNotNull( option ); + + AbstractOptionSpec spec = detectedOptions.get( option ); + if ( spec == null ) { + List defaults = defaultValuesFor( option ); + return defaults.isEmpty() ? null : defaults.get( 0 ); + } + + return valueOf( spec ); + } + + /** + * Gives the argument associated with the given option. + * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + * @param represents the type of the arguments the given option accepts + * @param option the option to search for + * @return the argument of the given option; {@code null} if no argument is present, or that option was not + * detected + * @throws OptionException if more than one argument was detected for the option + * @throws NullPointerException if {@code option} is {@code null} + * @throws ClassCastException if the arguments of this option are not of the expected type + */ + public V valueOf( OptionSpec option ) { + ensureNotNull( option ); + + List values = valuesOf( option ); + switch ( values.size() ) { + case 0: + return null; + case 1: + return values.get( 0 ); + default: + throw new MultipleArgumentsForOptionException( option.options() ); + } + } + + /** + *

Gives any arguments associated with the given option. If the option was given an argument type, the + * arguments will take on that type; otherwise, they will be {@link String}s.

+ * + * @param option the option to search for + * @return the arguments associated with the option, as a list of objects of the type given to the arguments; an + * empty list if no such arguments are present, or if the option was not detected + * @throws NullPointerException if {@code option} is {@code null} + */ + public List valuesOf( String option ) { + ensureNotNull( option ); + + AbstractOptionSpec spec = detectedOptions.get( option ); + return spec == null ? defaultValuesFor( option ) : valuesOf( spec ); + } + + /** + *

Gives any arguments associated with the given option. If the option was given an argument type, the + * arguments will take on that type; otherwise, they will be {@link String}s.

+ * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + * @param represents the type of the arguments the given option accepts + * @param option the option to search for + * @return the arguments associated with the option; an empty list if no such arguments are present, or if the + * option was not detected + * @throws NullPointerException if {@code option} is {@code null} + * @throws OptionException if there is a problem converting the option's arguments to the desired type; for + * example, if the type does not implement a correct conversion constructor or method + */ + public List valuesOf( OptionSpec option ) { + ensureNotNull( option ); + + List values = optionsToArguments.get( option ); + if ( values == null || values.isEmpty() ) + return defaultValueFor( option ); + + AbstractOptionSpec spec = (AbstractOptionSpec) option; + List convertedValues = new ArrayList(); + for ( String each : values ) + convertedValues.add( spec.convert( each ) ); + + return unmodifiableList( convertedValues ); + } + + /** + * Gives the set of options that were detected, in the form of {@linkplain OptionSpec}s, in the order in which the + * options were found on the command line. + * + * @return the set of detected command line options + */ + public List> specs() { + List> specs = detectedSpecs; + specs.remove( detectedOptions.get( NonOptionArgumentSpec.NAME ) ); + + return unmodifiableList( specs ); + } + + /** + * Gives all declared options as a map of string to {@linkplain OptionSpec}. + * + * @return the declared options as a map + */ + public Map, List> asMap() { + Map, List> map = new HashMap, List>(); + for ( AbstractOptionSpec spec : recognizedSpecs.values() ) + if ( !spec.representsNonOptions() ) + map.put( spec, valuesOf( spec ) ); + return unmodifiableMap( map ); + } + + /** + * @return the detected non-option arguments + */ + public List nonOptionArguments() { + return unmodifiableList( valuesOf( detectedOptions.get( NonOptionArgumentSpec.NAME ) ) ); + } + + void add( AbstractOptionSpec spec ) { + addWithArgument( spec, null ); + } + + void addWithArgument( AbstractOptionSpec spec, String argument ) { + detectedSpecs.add( spec ); + + for ( String each : spec.options() ) + detectedOptions.put( each, spec ); + + List optionArguments = optionsToArguments.get( spec ); + + if ( optionArguments == null ) { + optionArguments = new ArrayList(); + optionsToArguments.put( spec, optionArguments ); + } + + if ( argument != null ) + optionArguments.add( argument ); + } + + @Override + public boolean equals( Object that ) { + if ( this == that ) + return true; + + if ( that == null || !getClass().equals( that.getClass() ) ) + return false; + + OptionSet other = (OptionSet) that; + Map, List> thisOptionsToArguments = + new HashMap, List>( optionsToArguments ); + Map, List> otherOptionsToArguments = + new HashMap, List>( other.optionsToArguments ); + return detectedOptions.equals( other.detectedOptions ) + && thisOptionsToArguments.equals( otherOptionsToArguments ); + } + + @Override + public int hashCode() { + Map, List> thisOptionsToArguments = + new HashMap, List>( optionsToArguments ); + return detectedOptions.hashCode() ^ thisOptionsToArguments.hashCode(); + } + + @SuppressWarnings( "unchecked" ) + private List defaultValuesFor( String option ) { + if ( defaultValues.containsKey( option ) ) + return (List) defaultValues.get( option ); + + return emptyList(); + } + + private List defaultValueFor( OptionSpec option ) { + return defaultValuesFor( option.options().iterator().next() ); + } + + private static Map> defaultValues( Map> recognizedSpecs ) { + Map> defaults = new HashMap>(); + for ( Map.Entry> each : recognizedSpecs.entrySet() ) + defaults.put( each.getKey(), each.getValue().defaultValues() ); + return defaults; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpec.java new file mode 100644 index 00000000000..666230b05d4 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpec.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; +import java.util.List; + +/** + * Describes options that an option parser recognizes. + * + *

Instances of this interface are returned by the "fluent interface" methods to allow retrieval of option arguments + * in a type-safe manner. Here's an example:

+ * + *

+ *     OptionParser parser = new OptionParser();
+ *     OptionSpec<Integer> count =
+ *         parser.accepts( "count" ).withRequiredArg().ofType( Integer.class );
+ *     OptionSet options = parser.parse( "--count", "2" );
+ *     assert options.has( count );
+ *     int countValue = options.valueOf( count );
+ *     assert countValue == count.value( options );
+ *     List<Integer> countValues = options.valuesOf( count );
+ *     assert countValues.equals( count.values( options ) );
+ * 
+ * + * @param represents the type of the arguments this option accepts + * @author Paul Holser + */ +public interface OptionSpec { + /** + * Gives any arguments associated with the given option in the given set of detected options. + * + *

Specifying a {@linkplain ArgumentAcceptingOptionSpec#defaultsTo(Object, Object[]) default argument value} + * for this option will cause this method to return that default value even if this option was not detected on the + * command line, or if this option can take an optional argument but did not have one on the command line.

+ * + * @param detectedOptions the detected options to search in + * @return the arguments associated with this option; an empty list if no such arguments are present, or if this + * option was not detected + * @throws OptionException if there is a problem converting this option's arguments to the desired type; for + * example, if the type does not implement a correct conversion constructor or method + * @throws NullPointerException if {@code detectedOptions} is {@code null} + * @see OptionSet#valuesOf(OptionSpec) + */ + List values( OptionSet detectedOptions ); + + /** + * Gives the argument associated with the given option in the given set of detected options. + * + *

Specifying a {@linkplain ArgumentAcceptingOptionSpec#defaultsTo(Object, Object[]) default argument value} + * for this option will cause this method to return that default value even if this option was not detected on the + * command line, or if this option can take an optional argument but did not have one on the command line.

+ * + * @param detectedOptions the detected options to search in + * @return the argument of the this option; {@code null} if no argument is present, or that option was not detected + * @throws OptionException if more than one argument was detected for the option + * @throws NullPointerException if {@code detectedOptions} is {@code null} + * @throws ClassCastException if the arguments of this option are not of the expected type + * @see OptionSet#valueOf(OptionSpec) + */ + V value( OptionSet detectedOptions ); + + /** + * @return the string representations of this option + */ + Collection options(); + + /** + * Tells whether this option is designated as a "help" option. The presence of a "help" option on a command line + * means that missing "required" options will not cause parsing to fail. + * + * @return whether this option is designated as a "help" option + */ + boolean isForHelp(); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecBuilder.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecBuilder.java new file mode 100644 index 00000000000..4f171091ec0 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Allows callers to specify whether a given option accepts arguments (required or optional). + * + *

Instances are returned from {@link OptionParser#accepts(String)} to allow the formation of parser directives as + * sentences in a "fluent interface" language. For example:

+ * + *

+ *   OptionParser parser = new OptionParser();
+ *   parser.accepts( "c" ).withRequiredArg().ofType( Integer.class );
+ * 
+ * + *

If no methods are invoked on an instance of this class, then that instance's option will accept no argument.

+ * + *

Note that you should not use the fluent interface clauses in a way that would defeat the typing of option + * arguments:

+ * + *

+ *   OptionParser parser = new OptionParser();
+ *   ArgumentAcceptingOptionSpec<String> optionC =
+ *       parser.accepts( "c" ).withRequiredArg();
+ *   optionC.ofType( Integer.class );  // DON'T THROW AWAY THE TYPE!
+ *
+ *   String value = parser.parse( "-c", "2" ).valueOf( optionC );  // ClassCastException
+ * 
+ * + * @author Paul Holser + */ +public class OptionSpecBuilder extends NoArgumentOptionSpec { + private final OptionParser parser; + + OptionSpecBuilder( OptionParser parser, Collection options, String description ) { + super( options, description ); + + this.parser = parser; + attachToParser(); + } + + private void attachToParser() { + parser.recognize( this ); + } + + /** + * Informs an option parser that this builder's option requires an argument. + * + * @return a specification for the option + */ + public ArgumentAcceptingOptionSpec withRequiredArg() { + ArgumentAcceptingOptionSpec newSpec = + new RequiredArgumentOptionSpec( options(), description() ); + parser.recognize( newSpec ); + + return newSpec; + } + + /** + * Informs an option parser that this builder's option accepts an optional argument. + * + * @return a specification for the option + */ + public ArgumentAcceptingOptionSpec withOptionalArg() { + ArgumentAcceptingOptionSpec newSpec = + new OptionalArgumentOptionSpec( options(), description() ); + parser.recognize( newSpec ); + + return newSpec; + } + + /** + *

Informs an option parser that this builder's option is required if the given option is present on the command + * line.

+ * + *

For a given option, you should not mix this with {@link #requiredUnless(String, String...) + * requiredUnless} to avoid conflicts.

+ * + * @param dependent an option whose presence on a command line makes this builder's option required + * @param otherDependents other options whose presence on a command line makes this builder's option required + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws OptionException if any of the dependent options haven't been configured in the parser yet + */ + public OptionSpecBuilder requiredIf( String dependent, String... otherDependents ) { + List dependents = validatedDependents( dependent, otherDependents ); + for ( String each : dependents ) { + parser.requiredIf( options(), each ); + } + + return this; + } + + /** + *

Informs an option parser that this builder's option is required if the given option is present on the command + * line.

+ * + *

For a given option, you should not mix this with {@link #requiredUnless(OptionSpec, OptionSpec[]) + * requiredUnless} to avoid conflicts.

+ * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + * @param dependent the option whose presence on a command line makes this builder's option required + * @param otherDependents other options whose presence on a command line makes this builder's option required + * @return self, so that the caller can add clauses to the fluent interface sentence + */ + public OptionSpecBuilder requiredIf( OptionSpec dependent, OptionSpec... otherDependents ) { + parser.requiredIf( options(), dependent ); + for ( OptionSpec each : otherDependents ) + parser.requiredIf( options(), each ); + + return this; + } + + /** + *

Informs an option parser that this builder's option is required if the given option is absent on the command + * line.

+ * + *

For a given option, you should not mix this with {@link #requiredIf(OptionSpec, OptionSpec[]) + * requiredIf} to avoid conflicts.

+ * + * @param dependent an option whose absence on a command line makes this builder's option required + * @param otherDependents other options whose absence on a command line makes this builder's option required + * @return self, so that the caller can add clauses to the fluent interface sentence + * @throws OptionException if any of the dependent options haven't been configured in the parser yet + */ + public OptionSpecBuilder requiredUnless( String dependent, String... otherDependents ) { + List dependents = validatedDependents( dependent, otherDependents ); + for ( String each : dependents ) { + parser.requiredUnless( options(), each ); + } + return this; + } + + /** + *

Informs an option parser that this builder's option is required if the given option is absent on the command + * line.

+ * + *

For a given option, you should not mix this with {@link #requiredIf(OptionSpec, OptionSpec[]) + * requiredIf} to avoid conflicts.

+ * + *

This method recognizes only instances of options returned from the fluent interface methods.

+ * + * @param dependent the option whose absence on a command line makes this builder's option required + * @param otherDependents other options whose absence on a command line makes this builder's option required + * @return self, so that the caller can add clauses to the fluent interface sentence + */ + public OptionSpecBuilder requiredUnless( OptionSpec dependent, OptionSpec... otherDependents ) { + parser.requiredUnless( options(), dependent ); + for ( OptionSpec each : otherDependents ) + parser.requiredUnless( options(), each ); + + return this; + } + + private List validatedDependents( String dependent, String... otherDependents ) { + List dependents = new ArrayList(); + dependents.add( dependent ); + Collections.addAll( dependents, otherDependents ); + + for ( String each : dependents ) { + if ( !parser.isRecognized( each ) ) + throw new UnconfiguredOptionException( each ); + } + + return dependents; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecTokenizer.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecTokenizer.java new file mode 100644 index 00000000000..d878daba6eb --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionSpecTokenizer.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.NoSuchElementException; + +import static jdk.internal.joptsimple.ParserRules.*; + +/** + * Tokenizes a short option specification string. + * + * @author Paul Holser + */ +class OptionSpecTokenizer { + private static final char POSIXLY_CORRECT_MARKER = '+'; + private static final char HELP_MARKER = '*'; + + private String specification; + private int index; + + OptionSpecTokenizer( String specification ) { + if ( specification == null ) + throw new NullPointerException( "null option specification" ); + + this.specification = specification; + } + + boolean hasMore() { + return index < specification.length(); + } + + AbstractOptionSpec next() { + if ( !hasMore() ) + throw new NoSuchElementException(); + + + String optionCandidate = String.valueOf( specification.charAt( index ) ); + index++; + + AbstractOptionSpec spec; + if ( RESERVED_FOR_EXTENSIONS.equals( optionCandidate ) ) { + spec = handleReservedForExtensionsToken(); + + if ( spec != null ) + return spec; + } + + ensureLegalOption( optionCandidate ); + + if ( hasMore() ) { + boolean forHelp = false; + if ( specification.charAt( index ) == HELP_MARKER ) { + forHelp = true; + ++index; + } + spec = hasMore() && specification.charAt( index ) == ':' + ? handleArgumentAcceptingOption( optionCandidate ) + : new NoArgumentOptionSpec( optionCandidate ); + if ( forHelp ) + spec.forHelp(); + } else + spec = new NoArgumentOptionSpec( optionCandidate ); + + return spec; + } + + void configure( OptionParser parser ) { + adjustForPosixlyCorrect( parser ); + + while ( hasMore() ) + parser.recognize( next() ); + } + + private void adjustForPosixlyCorrect( OptionParser parser ) { + if ( POSIXLY_CORRECT_MARKER == specification.charAt( 0 ) ) { + parser.posixlyCorrect( true ); + specification = specification.substring( 1 ); + } + } + + private AbstractOptionSpec handleReservedForExtensionsToken() { + if ( !hasMore() ) + return new NoArgumentOptionSpec( RESERVED_FOR_EXTENSIONS ); + + if ( specification.charAt( index ) == ';' ) { + ++index; + return new AlternativeLongOptionSpec(); + } + + return null; + } + + private AbstractOptionSpec handleArgumentAcceptingOption( String candidate ) { + index++; + + if ( hasMore() && specification.charAt( index ) == ':' ) { + index++; + return new OptionalArgumentOptionSpec( candidate ); + } + + return new RequiredArgumentOptionSpec( candidate ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionalArgumentOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionalArgumentOptionSpec.java new file mode 100644 index 00000000000..894e00e3a29 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/OptionalArgumentOptionSpec.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Specification of an option that accepts an optional argument. + * + * @param represents the type of the arguments this option accepts + * @author Paul Holser + */ +class OptionalArgumentOptionSpec extends ArgumentAcceptingOptionSpec { + OptionalArgumentOptionSpec( String option ) { + super( option, false ); + } + + OptionalArgumentOptionSpec( Collection options, String description ) { + super( options, false, description ); + } + + @Override + protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) { + if ( arguments.hasMore() ) { + String nextArgument = arguments.peek(); + + if ( !parser.looksLikeAnOption( nextArgument ) ) + handleOptionArgument( parser, detectedOptions, arguments ); + else if ( isArgumentOfNumberType() && canConvertArgument( nextArgument ) ) + addArguments( detectedOptions, arguments.next() ); + else + detectedOptions.add( this ); + } + else + detectedOptions.add( this ); + } + + private void handleOptionArgument( OptionParser parser, OptionSet detectedOptions, ArgumentList arguments ) { + if ( parser.posixlyCorrect() ) { + detectedOptions.add( this ); + parser.noMoreOptions(); + } + else + addArguments( detectedOptions, arguments.next() ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ParserRules.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ParserRules.java new file mode 100644 index 00000000000..e981d878adc --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ParserRules.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +import static java.lang.Character.*; + +/** + * Can tell whether or not options are well-formed. + * + * @author Paul Holser + */ +final class ParserRules { + static final char HYPHEN_CHAR = '-'; + static final String HYPHEN = String.valueOf( HYPHEN_CHAR ); + static final String DOUBLE_HYPHEN = "--"; + static final String OPTION_TERMINATOR = DOUBLE_HYPHEN; + static final String RESERVED_FOR_EXTENSIONS = "W"; + + private ParserRules() { + throw new UnsupportedOperationException(); + } + + static boolean isShortOptionToken( String argument ) { + return argument.startsWith( HYPHEN ) + && !HYPHEN.equals( argument ) + && !isLongOptionToken( argument ); + } + + static boolean isLongOptionToken( String argument ) { + return argument.startsWith( DOUBLE_HYPHEN ) && !isOptionTerminator( argument ); + } + + static boolean isOptionTerminator( String argument ) { + return OPTION_TERMINATOR.equals( argument ); + } + + static void ensureLegalOption( String option ) { + if ( option.startsWith( HYPHEN ) ) + throw new IllegalOptionSpecificationException( String.valueOf( option ) ); + + for ( int i = 0; i < option.length(); ++i ) + ensureLegalOptionCharacter( option.charAt( i ) ); + } + + static void ensureLegalOptions( Collection options ) { + for ( String each : options ) + ensureLegalOption( each ); + } + + private static void ensureLegalOptionCharacter( char option ) { + if ( !( isLetterOrDigit( option ) || isAllowedPunctuation( option ) ) ) + throw new IllegalOptionSpecificationException( String.valueOf( option ) ); + } + + private static boolean isAllowedPunctuation( char option ) { + String allowedPunctuation = "?." + HYPHEN_CHAR; + return allowedPunctuation.indexOf( option ) != -1; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/README b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/README new file mode 100644 index 00000000000..ad0d0f64db5 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/README @@ -0,0 +1,3 @@ +JOpt Simple, Version 4.6 +https://pholser.github.io/jopt-simple/ + diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/RequiredArgumentOptionSpec.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/RequiredArgumentOptionSpec.java new file mode 100644 index 00000000000..9972f8d1cff --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/RequiredArgumentOptionSpec.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +/** + * Specification of an option that accepts a required argument. + * + * @param represents the type of the arguments this option accepts + * @author Paul Holser + */ +class RequiredArgumentOptionSpec extends ArgumentAcceptingOptionSpec { + RequiredArgumentOptionSpec( String option ) { + super( option, true ); + } + + RequiredArgumentOptionSpec( Collection options, String description ) { + super( options, true, description ); + } + + @Override + protected void detectOptionArgument( OptionParser parser, ArgumentList arguments, OptionSet detectedOptions ) { + if ( !arguments.hasMore() ) + throw new OptionMissingRequiredArgumentException( options() ); + + addArguments( detectedOptions, arguments.next() ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnacceptableNumberOfNonOptionsException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnacceptableNumberOfNonOptionsException.java new file mode 100644 index 00000000000..c5775fb3458 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnacceptableNumberOfNonOptionsException.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static java.util.Collections.*; + +/** + * Thrown when the option parser detects an unacceptable number of {@code linkplain NonOptionArgumentSpec + * non-option arguments}. + * + * @author Paul Holser + */ +class UnacceptableNumberOfNonOptionsException extends OptionException { + private static final long serialVersionUID = -1L; + private final int minimum; + private final int maximum; + private final int actual; + + UnacceptableNumberOfNonOptionsException( int minimum, int maximum, int actual ) { + super( singletonList( NonOptionArgumentSpec.NAME ) ); + + this.minimum = minimum; + this.maximum = maximum; + this.actual = actual; + } + + @Override + public String getMessage() { + return String.format( "actual = %d, minimum = %d, maximum = %d", actual, minimum, maximum ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnconfiguredOptionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnconfiguredOptionException.java new file mode 100644 index 00000000000..0783b7a684b --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnconfiguredOptionException.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import java.util.Collection; + +import static java.util.Collections.*; + +/** + * Thrown when an option parser refers to an option that is not in fact configured already on the parser. + * + * @author Paul Holser + */ +class UnconfiguredOptionException extends OptionException { + private static final long serialVersionUID = -1L; + + UnconfiguredOptionException( String option ) { + this( singletonList( option ) ); + } + + UnconfiguredOptionException( Collection options ) { + super( options ); + } + + @Override + public String getMessage() { + return "Option " + multipleOptionMessage() + " has not been configured on this parser"; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnrecognizedOptionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnrecognizedOptionException.java new file mode 100644 index 00000000000..b9ec16abb0a --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/UnrecognizedOptionException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +import static java.util.Collections.*; + +/** + * Thrown when the option parser encounters an unrecognized option. + * + * @author Paul Holser + */ +class UnrecognizedOptionException extends OptionException { + private static final long serialVersionUID = -1L; + + UnrecognizedOptionException( String option ) { + super( singletonList( option ) ); + } + + @Override + public String getMessage() { + return singleOptionMessage() + " is not a recognized option"; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConversionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConversionException.java new file mode 100644 index 00000000000..3ea4938d21c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConversionException.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +/** + * Thrown by {@link ValueConverter}s when problems occur in converting string values to other Java types. + * + * @author Paul Holser + */ +public class ValueConversionException extends RuntimeException { + private static final long serialVersionUID = -1L; + + /** + * Creates a new exception with the specified detail message. + * + * @param message the detail message + */ + public ValueConversionException( String message ) { + this( message, null ); + } + + /** + * Creates a new exception with the specified detail message and cause. + * + * @param message the detail message + * @param cause the original exception + */ + public ValueConversionException( String message, Throwable cause ) { + super( message, cause ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConverter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConverter.java new file mode 100644 index 00000000000..db08b2550d1 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/ValueConverter.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple; + +/** + * Instances of this interface are used to convert arguments of options into specific Java types. + * + * @param constraint on the type of values being converted to + * @author Paul Holser + */ +public interface ValueConverter { + /** + * Converts the given string value into a Java type. + * + * @param value the string to convert + * @return the converted value + * @throws ValueConversionException if a problem occurs while converting the value + */ + V convert( String value ); + + /** + * Gives the class of the type of values this converter converts to. + * + * @return the target class for conversion + */ + Class valueType(); + + /** + * Gives a string that describes the pattern of the values this converter expects, if any. For example, a date + * converter can respond with a {@link java.text.SimpleDateFormat date format string}. + * + * @return a value pattern, or {@code null} if there's nothing interesting here + */ + String valuePattern(); +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/AbbreviationMap.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/AbbreviationMap.java new file mode 100644 index 00000000000..2646b7372b7 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/AbbreviationMap.java @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.util.Map; +import java.util.TreeMap; + +/** + *

A map whose keys are strings; when a key/value pair is added to the map, the longest unique abbreviations of that + * key are added as well, and associated with the value. Thus:

+ * + *
+ *   
+ *   abbreviations.put( "good", "bye" );
+ *   
+ * 
+ * + *

would make it such that you could retrieve the value {@code "bye"} from the map using the keys {@code "good"}, + * {@code "goo"}, {@code "go"}, and {@code "g"}. A subsequent invocation of:

+ *
+ *   
+ *   abbreviations.put( "go", "fish" );
+ *   
+ * 
+ * + *

would make it such that you could retrieve the value {@code "bye"} using the keys {@code "good"} and + * {@code "goo"}, and the value {@code "fish"} using the key {@code "go"}. The key {@code "g"} would yield + * {@code null}, since it would no longer be a unique abbreviation.

+ * + *

The data structure is much like a "trie".

+ * + * @param a constraint on the types of the values in the map + * @author Paul Holser + * @see Perl's Text::Abbrev module + */ +public class AbbreviationMap { + private String key; + private V value; + private final Map> children = new TreeMap>(); + private int keysBeyond; + + /** + *

Tells whether the given key is in the map, or whether the given key is a unique + * abbreviation of a key that is in the map.

+ * + * @param aKey key to look up + * @return {@code true} if {@code key} is present in the map + * @throws NullPointerException if {@code key} is {@code null} + */ + public boolean contains( String aKey ) { + return get( aKey ) != null; + } + + /** + *

Answers the value associated with the given key. The key can be a unique + * abbreviation of a key that is in the map.

+ * + * @param aKey key to look up + * @return the value associated with {@code aKey}; or {@code null} if there is no + * such value or {@code aKey} is not a unique abbreviation of a key in the map + * @throws NullPointerException if {@code aKey} is {@code null} + */ + public V get( String aKey ) { + char[] chars = charsOf( aKey ); + + AbbreviationMap child = this; + for ( char each : chars ) { + child = child.children.get( each ); + if ( child == null ) + return null; + } + + return child.value; + } + + /** + *

Associates a given value with a given key. If there was a previous + * association, the old value is replaced with the new one.

+ * + * @param aKey key to create in the map + * @param newValue value to associate with the key + * @throws NullPointerException if {@code aKey} or {@code newValue} is {@code null} + * @throws IllegalArgumentException if {@code aKey} is a zero-length string + */ + public void put( String aKey, V newValue ) { + if ( newValue == null ) + throw new NullPointerException(); + if ( aKey.length() == 0 ) + throw new IllegalArgumentException(); + + char[] chars = charsOf( aKey ); + add( chars, newValue, 0, chars.length ); + } + + /** + *

Associates a given value with a given set of keys. If there was a previous + * association, the old value is replaced with the new one.

+ * + * @param keys keys to create in the map + * @param newValue value to associate with the key + * @throws NullPointerException if {@code keys} or {@code newValue} is {@code null} + * @throws IllegalArgumentException if any of {@code keys} is a zero-length string + */ + public void putAll( Iterable keys, V newValue ) { + for ( String each : keys ) + put( each, newValue ); + } + + private boolean add( char[] chars, V newValue, int offset, int length ) { + if ( offset == length ) { + value = newValue; + boolean wasAlreadyAKey = key != null; + key = new String( chars ); + return !wasAlreadyAKey; + } + + char nextChar = chars[ offset ]; + AbbreviationMap child = children.get( nextChar ); + if ( child == null ) { + child = new AbbreviationMap(); + children.put( nextChar, child ); + } + + boolean newKeyAdded = child.add( chars, newValue, offset + 1, length ); + + if ( newKeyAdded ) + ++keysBeyond; + + if ( key == null ) + value = keysBeyond > 1 ? null : newValue; + + return newKeyAdded; + } + + /** + *

If the map contains the given key, dissociates the key from its value.

+ * + * @param aKey key to remove + * @throws NullPointerException if {@code aKey} is {@code null} + * @throws IllegalArgumentException if {@code aKey} is a zero-length string + */ + public void remove( String aKey ) { + if ( aKey.length() == 0 ) + throw new IllegalArgumentException(); + + char[] keyChars = charsOf( aKey ); + remove( keyChars, 0, keyChars.length ); + } + + private boolean remove( char[] aKey, int offset, int length ) { + if ( offset == length ) + return removeAtEndOfKey(); + + char nextChar = aKey[ offset ]; + AbbreviationMap child = children.get( nextChar ); + if ( child == null || !child.remove( aKey, offset + 1, length ) ) + return false; + + --keysBeyond; + if ( child.keysBeyond == 0 ) + children.remove( nextChar ); + if ( keysBeyond == 1 && key == null ) + setValueToThatOfOnlyChild(); + + return true; + } + + private void setValueToThatOfOnlyChild() { + Map.Entry> entry = children.entrySet().iterator().next(); + AbbreviationMap onlyChild = entry.getValue(); + value = onlyChild.value; + } + + private boolean removeAtEndOfKey() { + if ( key == null ) + return false; + + key = null; + if ( keysBeyond == 1 ) + setValueToThatOfOnlyChild(); + else + value = null; + + return true; + } + + /** + * Gives a Java map representation of this abbreviation map. + * + * @return a Java map corresponding to this abbreviation map + */ + public Map toJavaUtilMap() { + Map mappings = new TreeMap(); + addToMappings( mappings ); + return mappings; + } + + private void addToMappings( Map mappings ) { + if ( key != null ) + mappings.put( key, value ); + + for ( AbbreviationMap each : children.values() ) + each.addToMappings( mappings ); + } + + private static char[] charsOf( String aKey ) { + char[] chars = new char[ aKey.length() ]; + aKey.getChars( 0, aKey.length(), chars, 0 ); + return chars; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Classes.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Classes.java new file mode 100644 index 00000000000..f75025ccd19 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Classes.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author Paul Holser + */ +public final class Classes { + private static final Map, Class> WRAPPERS = new HashMap, Class>( 13 ); + + static { + WRAPPERS.put( boolean.class, Boolean.class ); + WRAPPERS.put( byte.class, Byte.class ); + WRAPPERS.put( char.class, Character.class ); + WRAPPERS.put( double.class, Double.class ); + WRAPPERS.put( float.class, Float.class ); + WRAPPERS.put( int.class, Integer.class ); + WRAPPERS.put( long.class, Long.class ); + WRAPPERS.put( short.class, Short.class ); + WRAPPERS.put( void.class, Void.class ); + } + + private Classes() { + throw new UnsupportedOperationException(); + } + + /** + * Gives the "short version" of the given class name. Somewhat naive to inner classes. + * + * @param className class name to chew on + * @return the short name of the class + */ + public static String shortNameOf( String className ) { + return className.substring( className.lastIndexOf( '.' ) + 1 ); + } + + /** + * Gives the primitive wrapper class for the given class. If the given class is not + * {@linkplain Class#isPrimitive() primitive}, returns the class itself. + * + * @param generic class type + * @param clazz the class to check + * @return primitive wrapper type if {@code clazz} is primitive, otherwise {@code clazz} + */ + @SuppressWarnings( "unchecked" ) + public static Class wrapperOf( Class clazz ) { + return clazz.isPrimitive() ? (Class) WRAPPERS.get( clazz ) : clazz; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Columns.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Columns.java new file mode 100644 index 00000000000..a3859f7d1cf --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Columns.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.text.BreakIterator; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import static java.text.BreakIterator.*; + +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + * @author Paul Holser + */ +class Columns { + private static final int INDENT_WIDTH = 2; + + private final int optionWidth; + private final int descriptionWidth; + + Columns( int optionWidth, int descriptionWidth ) { + this.optionWidth = optionWidth; + this.descriptionWidth = descriptionWidth; + } + + List fit( Row row ) { + List options = piecesOf( row.option, optionWidth ); + List descriptions = piecesOf( row.description, descriptionWidth ); + + List rows = new ArrayList(); + for ( int i = 0; i < Math.max( options.size(), descriptions.size() ); ++i ) + rows.add( new Row( itemOrEmpty( options, i ), itemOrEmpty( descriptions, i ) ) ); + + return rows; + } + + private static String itemOrEmpty( List items, int index ) { + return index >= items.size() ? "" : items.get( index ); + } + + private List piecesOf( String raw, int width ) { + List pieces = new ArrayList(); + + for ( String each : raw.trim().split( LINE_SEPARATOR ) ) + pieces.addAll( piecesOfEmbeddedLine( each, width ) ); + + return pieces; + } + + private List piecesOfEmbeddedLine( String line, int width ) { + List pieces = new ArrayList(); + + BreakIterator words = BreakIterator.getLineInstance( Locale.US ); + words.setText( line ); + + StringBuilder nextPiece = new StringBuilder(); + + int start = words.first(); + for ( int end = words.next(); end != DONE; start = end, end = words.next() ) + nextPiece = processNextWord( line, nextPiece, start, end, width, pieces ); + + if ( nextPiece.length() > 0 ) + pieces.add( nextPiece.toString() ); + + return pieces; + } + + private StringBuilder processNextWord( String source, StringBuilder nextPiece, int start, int end, int width, + List pieces ) { + StringBuilder augmented = nextPiece; + + String word = source.substring( start, end ); + if ( augmented.length() + word.length() > width ) { + pieces.add( augmented.toString().replaceAll( "\\s+$", "" ) ); + augmented = new StringBuilder( repeat( ' ', INDENT_WIDTH ) ).append( word ); + } + else + augmented.append( word ); + + return augmented; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ConstructorInvokingValueConverter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ConstructorInvokingValueConverter.java new file mode 100644 index 00000000000..720c6e4b8c2 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ConstructorInvokingValueConverter.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.lang.reflect.Constructor; + +import jdk.internal.joptsimple.ValueConverter; + +import static jdk.internal.joptsimple.internal.Reflection.*; + +/** + * @param constraint on the type of values being converted to + * @author Paul Holser + */ +class ConstructorInvokingValueConverter implements ValueConverter { + private final Constructor ctor; + + ConstructorInvokingValueConverter( Constructor ctor ) { + this.ctor = ctor; + } + + public V convert( String value ) { + return instantiate( ctor, value ); + } + + public Class valueType() { + return ctor.getDeclaringClass(); + } + + public String valuePattern() { + return null; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/MethodInvokingValueConverter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/MethodInvokingValueConverter.java new file mode 100644 index 00000000000..599728bb67b --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/MethodInvokingValueConverter.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.lang.reflect.Method; + +import jdk.internal.joptsimple.ValueConverter; + +import static jdk.internal.joptsimple.internal.Reflection.*; + +/** + * @param constraint on the type of values being converted to + * @author Paul Holser + */ +class MethodInvokingValueConverter implements ValueConverter { + private final Method method; + private final Class clazz; + + MethodInvokingValueConverter( Method method, Class clazz ) { + this.method = method; + this.clazz = clazz; + } + + public V convert( String value ) { + return clazz.cast( invoke( method, value ) ); + } + + public Class valueType() { + return clazz; + } + + public String valuePattern() { + return null; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Objects.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Objects.java new file mode 100644 index 00000000000..2c2b696cd0a --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Objects.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +/** + * @author Paul Holser + */ +public final class Objects { + private Objects() { + throw new UnsupportedOperationException(); + } + + /** + * Rejects {@code null} references. + * + * @param target reference to check + * @throws NullPointerException if {@code target} is {@code null} + */ + public static void ensureNotNull( Object target ) { + if ( target == null ) + throw new NullPointerException(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Reflection.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Reflection.java new file mode 100644 index 00000000000..240ad24394c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Reflection.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import static java.lang.reflect.Modifier.*; + +import jdk.internal.joptsimple.ValueConverter; + +import static jdk.internal.joptsimple.internal.Classes.*; + +/** + * Helper methods for reflection. + * + * @author Paul Holser + */ +public final class Reflection { + private Reflection() { + throw new UnsupportedOperationException(); + } + + /** + * Finds an appropriate value converter for the given class. + * + * @param a constraint on the class object to introspect + * @param clazz class to introspect on + * @return a converter method or constructor + */ + public static ValueConverter findConverter( Class clazz ) { + Class maybeWrapper = wrapperOf( clazz ); + + ValueConverter valueOf = valueOfConverter( maybeWrapper ); + if ( valueOf != null ) + return valueOf; + + ValueConverter constructor = constructorConverter( maybeWrapper ); + if ( constructor != null ) + return constructor; + + throw new IllegalArgumentException( clazz + " is not a value type" ); + } + + private static ValueConverter valueOfConverter( Class clazz ) { + try { + Method valueOf = clazz.getDeclaredMethod( "valueOf", String.class ); + if ( meetsConverterRequirements( valueOf, clazz ) ) + return new MethodInvokingValueConverter( valueOf, clazz ); + + return null; + } + catch ( NoSuchMethodException ignored ) { + return null; + } + } + + private static ValueConverter constructorConverter( Class clazz ) { + try { + return new ConstructorInvokingValueConverter( clazz.getConstructor( String.class ) ); + } + catch ( NoSuchMethodException ignored ) { + return null; + } + } + + /** + * Invokes the given constructor with the given arguments. + * + * @param constraint on the type of the objects yielded by the constructor + * @param constructor constructor to invoke + * @param args arguments to hand to the constructor + * @return the result of invoking the constructor + * @throws ReflectionException in lieu of the gaggle of reflection-related exceptions + */ + public static T instantiate( Constructor constructor, Object... args ) { + try { + return constructor.newInstance( args ); + } + catch ( Exception ex ) { + throw reflectionException( ex ); + } + } + + /** + * Invokes the given static method with the given arguments. + * + * @param method method to invoke + * @param args arguments to hand to the method + * @return the result of invoking the method + * @throws ReflectionException in lieu of the gaggle of reflection-related exceptions + */ + public static Object invoke( Method method, Object... args ) { + try { + return method.invoke( null, args ); + } + catch ( Exception ex ) { + throw reflectionException( ex ); + } + } + + @SuppressWarnings( "unchecked" ) + public static V convertWith( ValueConverter converter, String raw ) { + return converter == null ? (V) raw : converter.convert( raw ); + } + + private static boolean meetsConverterRequirements( Method method, Class expectedReturnType ) { + int modifiers = method.getModifiers(); + return isPublic( modifiers ) && isStatic( modifiers ) && expectedReturnType.equals( method.getReturnType() ); + } + + private static RuntimeException reflectionException( Exception ex ) { + if ( ex instanceof IllegalArgumentException ) + return new ReflectionException( ex ); + if ( ex instanceof InvocationTargetException ) + return new ReflectionException( ex.getCause() ); + if ( ex instanceof RuntimeException ) + return (RuntimeException) ex; + + return new ReflectionException( ex ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ReflectionException.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ReflectionException.java new file mode 100644 index 00000000000..3e98d8f244c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/ReflectionException.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +/** + * This unchecked exception wraps reflection-oriented exceptions. + * + * @author Paul Holser + */ +public class ReflectionException extends RuntimeException { + private static final long serialVersionUID = -2L; + + ReflectionException( Throwable cause ) { + super( cause ); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Row.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Row.java new file mode 100644 index 00000000000..0ce8bcf0cc9 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Row.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +/** + * @author Paul Holser + */ +class Row { + final String option; + final String description; + + Row( String option, String description ) { + this.option = option; + this.description = description; + } + + @Override + public boolean equals( Object that ) { + if ( that == this ) + return true; + if ( that == null || !getClass().equals( that.getClass() ) ) + return false; + + Row other = (Row) that; + return option.equals( other.option ) && description.equals( other.description ); + } + + @Override + public int hashCode() { + return option.hashCode() ^ description.hashCode(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Rows.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Rows.java new file mode 100644 index 00000000000..0d0e4c2d0e0 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Rows.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.util.LinkedHashSet; +import java.util.Set; + +import static java.lang.Math.*; + +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + * @author Paul Holser + */ +public class Rows { + private final int overallWidth; + private final int columnSeparatorWidth; + private final Set rows = new LinkedHashSet(); + private int widthOfWidestOption; + private int widthOfWidestDescription; + + public Rows( int overallWidth, int columnSeparatorWidth ) { + this.overallWidth = overallWidth; + this.columnSeparatorWidth = columnSeparatorWidth; + } + + public void add( String option, String description ) { + add( new Row( option, description ) ); + } + + private void add( Row row ) { + rows.add( row ); + widthOfWidestOption = max( widthOfWidestOption, row.option.length() ); + widthOfWidestDescription = max( widthOfWidestDescription, row.description.length() ); + } + + private void reset() { + rows.clear(); + widthOfWidestOption = 0; + widthOfWidestDescription = 0; + } + + public void fitToWidth() { + Columns columns = new Columns( optionWidth(), descriptionWidth() ); + + Set fitted = new LinkedHashSet(); + for ( Row each : rows ) + fitted.addAll( columns.fit( each ) ); + + reset(); + + for ( Row each : fitted ) + add( each ); + } + + public String render() { + StringBuilder buffer = new StringBuilder(); + + for ( Row each : rows ) { + pad( buffer, each.option, optionWidth() ).append( repeat( ' ', columnSeparatorWidth ) ); + pad( buffer, each.description, descriptionWidth() ).append( LINE_SEPARATOR ); + } + + return buffer.toString(); + } + + private int optionWidth() { + return min( ( overallWidth - columnSeparatorWidth ) / 2, widthOfWidestOption ); + } + + private int descriptionWidth() { + return min( ( overallWidth - columnSeparatorWidth ) / 2, widthOfWidestDescription ); + } + + private StringBuilder pad( StringBuilder buffer, String s, int length ) { + buffer.append( s ).append( repeat( ' ', length - s.length() ) ); + return buffer; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Strings.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Strings.java new file mode 100644 index 00000000000..038b3f0ce6b --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/internal/Strings.java @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.internal; + +import java.util.Iterator; +import java.util.List; + +import static java.lang.System.*; +import static java.util.Arrays.*; + +/** + * @author Paul Holser + */ +public final class Strings { + public static final String EMPTY = ""; + public static final String SINGLE_QUOTE = "'"; + public static final String LINE_SEPARATOR = getProperty( "line.separator" ); + + private Strings() { + throw new UnsupportedOperationException(); + } + + /** + * Gives a string consisting of the given character repeated the given number of times. + * + * @param ch the character to repeat + * @param count how many times to repeat the character + * @return the resultant string + */ + public static String repeat( char ch, int count ) { + StringBuilder buffer = new StringBuilder(); + + for ( int i = 0; i < count; ++i ) + buffer.append( ch ); + + return buffer.toString(); + } + + /** + * Tells whether the given string is either {@code} or consists solely of whitespace characters. + * + * @param target string to check + * @return {@code true} if the target string is null or empty + */ + public static boolean isNullOrEmpty( String target ) { + return target == null || EMPTY.equals( target ); + } + + + /** + * Gives a string consisting of a given string prepended and appended with surrounding characters. + * + * @param target a string + * @param begin character to prepend + * @param end character to append + * @return the surrounded string + */ + public static String surround( String target, char begin, char end ) { + return begin + target + end; + } + + /** + * Gives a string consisting of the elements of a given array of strings, each separated by a given separator + * string. + * + * @param pieces the strings to join + * @param separator the separator + * @return the joined string + */ + public static String join( String[] pieces, String separator ) { + return join( asList( pieces ), separator ); + } + + /** + * Gives a string consisting of the string representations of the elements of a given array of objects, + * each separated by a given separator string. + * + * @param pieces the elements whose string representations are to be joined + * @param separator the separator + * @return the joined string + */ + public static String join( List pieces, String separator ) { + StringBuilder buffer = new StringBuilder(); + + for ( Iterator iter = pieces.iterator(); iter.hasNext(); ) { + buffer.append( iter.next() ); + + if ( iter.hasNext() ) + buffer.append( separator ); + } + + return buffer.toString(); + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/DateConverter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/DateConverter.java new file mode 100644 index 00000000000..f90585300d1 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/DateConverter.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.util; + +import java.text.DateFormat; +import java.text.ParsePosition; +import java.text.SimpleDateFormat; +import java.util.Date; + +import jdk.internal.joptsimple.ValueConversionException; +import jdk.internal.joptsimple.ValueConverter; + +/** + * Converts values to {@link Date}s using a {@link DateFormat} object. + * + * @author Paul Holser + */ +public class DateConverter implements ValueConverter { + private final DateFormat formatter; + + /** + * Creates a converter that uses the given date formatter/parser. + * + * @param formatter the formatter/parser to use + * @throws NullPointerException if {@code formatter} is {@code null} + */ + public DateConverter( DateFormat formatter ) { + if ( formatter == null ) + throw new NullPointerException( "illegal null formatter" ); + + this.formatter = formatter; + } + + /** + * Creates a converter that uses a {@link SimpleDateFormat} with the given date/time pattern. The date formatter + * created is not {@link SimpleDateFormat#setLenient(boolean) lenient}. + * + * @param pattern expected date/time pattern + * @return the new converter + * @throws NullPointerException if {@code pattern} is {@code null} + * @throws IllegalArgumentException if {@code pattern} is invalid + */ + public static DateConverter datePattern( String pattern ) { + SimpleDateFormat formatter = new SimpleDateFormat( pattern ); + formatter.setLenient( false ); + + return new DateConverter( formatter ); + } + + public Date convert( String value ) { + ParsePosition position = new ParsePosition( 0 ); + + Date date = formatter.parse( value, position ); + if ( position.getIndex() != value.length() ) + throw new ValueConversionException( message( value ) ); + + return date; + } + + public Class valueType() { + return Date.class; + } + + public String valuePattern() { + return formatter instanceof SimpleDateFormat + ? ( (SimpleDateFormat) formatter ).toPattern() + : ""; + } + + private String message( String value ) { + String message = "Value [" + value + "] does not match date/time pattern"; + if ( formatter instanceof SimpleDateFormat ) + message += " [" + ( (SimpleDateFormat) formatter ).toPattern() + ']'; + + return message; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/InetAddressConverter.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/InetAddressConverter.java new file mode 100644 index 00000000000..c6c7366509c --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/InetAddressConverter.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.util; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +import jdk.internal.joptsimple.ValueConversionException; +import jdk.internal.joptsimple.ValueConverter; + +/** + * Converts values to {@link java.net.InetAddress} using {@link InetAddress#getByName(String) getByName}. + * + * @author Raymund F\u00FCl\u00F6p + */ +public class InetAddressConverter implements ValueConverter { + public InetAddress convert( String value ) { + try { + return InetAddress.getByName( value ); + } catch ( UnknownHostException e ) { + throw new ValueConversionException( "Cannot convert value [" + value + " into an InetAddress", e ); + } + } + + public Class valueType() { + return InetAddress.class; + } + + public String valuePattern() { + return null; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/KeyValuePair.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/KeyValuePair.java new file mode 100644 index 00000000000..430e0c89b75 --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/KeyValuePair.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.util; + +import static jdk.internal.joptsimple.internal.Strings.*; + +/** + *

A simple string key/string value pair.

+ * + *

This is useful as an argument type for options whose values take on the form key=value, such as JVM + * command line system properties.

+ * + * @author Paul Holser + */ +public final class KeyValuePair { + public final String key; + public final String value; + + private KeyValuePair( String key, String value ) { + this.key = key; + this.value = value; + } + + /** + * Parses a string assumed to be of the form key=value into its parts. + * + * @param asString key-value string + * @return a key-value pair + * @throws NullPointerException if {@code stringRepresentation} is {@code null} + */ + public static KeyValuePair valueOf( String asString ) { + int equalsIndex = asString.indexOf( '=' ); + if ( equalsIndex == -1 ) + return new KeyValuePair( asString, EMPTY ); + + String aKey = asString.substring( 0, equalsIndex ); + String aValue = equalsIndex == asString.length() - 1 ? EMPTY : asString.substring( equalsIndex + 1 ); + + return new KeyValuePair( aKey, aValue ); + } + + @Override + public boolean equals( Object that ) { + if ( !( that instanceof KeyValuePair ) ) + return false; + + KeyValuePair other = (KeyValuePair) that; + return key.equals( other.key ) && value.equals( other.value ); + } + + @Override + public int hashCode() { + return key.hashCode() ^ value.hashCode(); + } + + @Override + public String toString() { + return key + '=' + value; + } +} diff --git a/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/RegexMatcher.java b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/RegexMatcher.java new file mode 100644 index 00000000000..b6ceee5557e --- /dev/null +++ b/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/RegexMatcher.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * The MIT License + * + * Copyright (c) 2004-2014 Paul R. Holser, Jr. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package jdk.internal.joptsimple.util; + +import java.util.regex.Pattern; + +import static java.util.regex.Pattern.*; + +import jdk.internal.joptsimple.ValueConversionException; +import jdk.internal.joptsimple.ValueConverter; + +/** + * Ensures that values entirely match a regular expression. + * + * @author Paul Holser + */ +public class RegexMatcher implements ValueConverter { + private final Pattern pattern; + + /** + * Creates a matcher that uses the given regular expression, modified by the given flags. + * + * @param pattern the regular expression pattern + * @param flags modifying regex flags + * @throws IllegalArgumentException if bit values other than those corresponding to the defined match flags are + * set in {@code flags} + * @throws java.util.regex.PatternSyntaxException if the expression's syntax is invalid + */ + public RegexMatcher( String pattern, int flags ) { + this.pattern = compile( pattern, flags ); + } + + /** + * Gives a matcher that uses the given regular expression. + * + * @param pattern the regular expression pattern + * @return the new converter + * @throws java.util.regex.PatternSyntaxException if the expression's syntax is invalid + */ + public static ValueConverter regex( String pattern ) { + return new RegexMatcher( pattern, 0 ); + } + + public String convert( String value ) { + if ( !pattern.matcher( value ).matches() ) { + throw new ValueConversionException( + "Value [" + value + "] did not match regex [" + pattern.pattern() + ']' ); + } + + return value; + } + + public Class valueType() { + return String.class; + } + + public String valuePattern() { + return pattern.pattern(); + } +} From b9687e112e20c2c78add37b1abd1281728148a83 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 26 Jan 2016 09:25:53 +0000 Subject: [PATCH 02/17] 8065076: java/net/SocketPermission/SocketPermissionTest.java fails intermittently Reviewed-by: coffeys, xiaofeya --- .../SocketPermissionTest.java | 393 +++++++++++------- jdk/test/java/net/SocketPermission/policy | 3 - 2 files changed, 248 insertions(+), 148 deletions(-) delete mode 100644 jdk/test/java/net/SocketPermission/policy diff --git a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java index 5cc25ab0c02..1b68415d028 100644 --- a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java +++ b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java @@ -25,8 +25,7 @@ * @test * @bug 8047031 * @summary SocketPermission tests for legacy socket types - * @library ../../../lib/testlibrary - * @run testng/othervm/policy=policy SocketPermissionTest + * @run testng/othervm SocketPermissionTest * @key intermittent */ import java.io.IOException; @@ -39,186 +38,279 @@ import java.net.Socket; import java.net.SocketPermission; import java.security.AccessControlContext; import java.security.AccessController; +import java.security.CodeSource; import java.security.Permission; +import java.security.PermissionCollection; import java.security.Permissions; -import java.security.PrivilegedAction; +import java.security.Policy; +import java.security.PrivilegedExceptionAction; import java.security.ProtectionDomain; -import java.util.Arrays; -import java.util.function.Function; -import java.util.function.IntConsumer; -import static jdk.testlibrary.Utils.getFreePort; + import org.testng.annotations.BeforeMethod; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import static org.testng.Assert.*; + +import static java.nio.charset.StandardCharsets.UTF_8; public class SocketPermissionTest { - private int freePort = -1; - - //positive tests - @Test(dataProvider = "positiveProvider") - public void testPositive(Function genAcc, IntConsumer func) { - String addr = "localhost:" + freePort; - AccessControlContext acc = genAcc.apply(addr); - AccessController.doPrivileged((PrivilegedAction) () -> { - func.accept(freePort); - return null; - }, acc); - } - - //negative tests - @Test(dataProvider = "negativeProvider", expectedExceptions = SecurityException.class) - public void testNegative(AccessControlContext acc, IntConsumer func) { - AccessController.doPrivileged((PrivilegedAction) () -> { - func.accept(freePort); - return null; - }, acc); - } @BeforeMethod - public void setFreePort() throws Exception { - freePort = getFreePort(); + public void setupSecurityManager() throws Exception { + // All permissions, a specific ACC will be used to when testing + // with a reduced permission set. + Policy.setPolicy(new Policy() { + final PermissionCollection perms = new Permissions(); + { perms.add(new java.security.AllPermission()); } + public PermissionCollection getPermissions(ProtectionDomain domain) { + return perms; + } + public PermissionCollection getPermissions(CodeSource codesource) { + return perms; + } + public boolean implies(ProtectionDomain domain, Permission perm) { + return perms.implies(perm); + } + } ); + System.setSecurityManager(new SecurityManager()); } - @DataProvider - public Object[][] positiveProvider() { - //test for SocketPermission "host:port","connect,resolve"; - Function generateAcc1 = (addr) -> getAccessControlContext( - new SocketPermission(addr, "listen, connect,resolve")); - IntConsumer func1 = (i) -> connectSocketTest(i); - IntConsumer func2 = (i) -> connectDatagramSocketTest(i); + static final AccessControlContext RESTRICTED_ACC = getAccessControlContext(); - //test for SocketPermission "localhost:1024-","accept"; - Function generateAcc2 = (addr) -> getAccessControlContext( - new SocketPermission(addr, "listen,connect,resolve"), - new SocketPermission("localhost:1024-", "accept")); - IntConsumer func3 = (i) -> acceptServerSocketTest(i); + @Test + public void connectSocketTest() throws Exception { + try (ServerSocket ss = new ServerSocket(0)) { + int port = ss.getLocalPort(); - //test for SocketPermission "229.227.226.221", "connect,accept" - Function generateAcc3 = (addr) -> getAccessControlContext( - new SocketPermission(addr, "listen,resolve"), - new SocketPermission("229.227.226.221", "connect,accept")); - IntConsumer func4 = (i) -> sendDatagramPacketTest(i); - IntConsumer func5 = (i) -> joinGroupMulticastTest(i); - - //test for SocketPermission "host:port", "listen" - Function generateAcc4 = (addr) -> getAccessControlContext( - new SocketPermission(addr, "listen")); - IntConsumer func6 = (i) -> listenDatagramSocketTest(i); - IntConsumer func7 = (i) -> listenMulticastSocketTest(i); - IntConsumer func8 = (i) -> listenServerSocketTest(i); - - return new Object[][]{ - {generateAcc1, func1}, - {generateAcc1, func2}, - {generateAcc2, func3}, - {generateAcc3, func4}, - {generateAcc3, func5}, - {generateAcc4, func6}, - {generateAcc4, func7}, - {generateAcc4, func8} - }; - } - - @DataProvider - public Object[][] negativeProvider() { - IntConsumer[] funcs = {i -> connectSocketTest(i), - i -> connectDatagramSocketTest(i), i -> acceptServerSocketTest(i), - i -> sendDatagramPacketTest(i), i -> joinGroupMulticastTest(i), - i -> listenDatagramSocketTest(i), i -> listenMulticastSocketTest(i), - i -> listenServerSocketTest(i)}; - return Arrays.stream(funcs).map(f -> { - //Construct an AccessControlContext without SocketPermission + String addr = "localhost:" + port; AccessControlContext acc = getAccessControlContext( - new java.io.FilePermission("<>", "read,write,execute,delete"), - new java.net.NetPermission("*"), - new java.util.PropertyPermission("*", "read,write"), - new java.lang.reflect.ReflectPermission("*"), - new java.lang.RuntimePermission("*"), - new java.security.SecurityPermission("*"), - new java.io.SerializablePermission("*")); - return new Object[]{acc, f}; - }).toArray(Object[][]::new); - } + new SocketPermission(addr, "listen,connect,resolve")); - public void connectSocketTest(int port) { - try (ServerSocket server = new ServerSocket(port); - Socket client = new Socket(InetAddress.getLocalHost(), port);) { - } catch (IOException ex) { - throw new RuntimeException(ex); + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (Socket client = new Socket(InetAddress.getLocalHost(), port)) { + } + return null; + }, acc); + + //Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + Socket client = new Socket(InetAddress.getLocalHost(), port); + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } } - public void connectDatagramSocketTest(int port) { - String msg = "Hello"; - try { - InetAddress me = InetAddress.getLocalHost(); - try (DatagramSocket ds = new DatagramSocket(port, me)) { - DatagramPacket dp = new DatagramPacket(msg.getBytes(), - msg.length(), me, port); + @Test + public void connectDatagramSocketTest() throws Exception { + byte[] msg = "Hello".getBytes(UTF_8); + InetAddress lh = InetAddress.getLocalHost(); + + try (DatagramSocket ds = new DatagramSocket(0)) { + int port = ds.getLocalPort(); + + String addr = lh.getHostAddress() + ":" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "connect,resolve")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + DatagramPacket dp = new DatagramPacket(msg, msg.length, lh, port); ds.send(dp); - } - } catch (IOException ex) { - throw new RuntimeException(ex); + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + DatagramPacket dp = new DatagramPacket(msg, msg.length, lh, port); + ds.send(dp); + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } } - public void acceptServerSocketTest(int port) { - try { - InetAddress me = InetAddress.getLocalHost(); - try (ServerSocket server = new ServerSocket(port)) { - Socket client = new Socket(me, port); - server.accept(); - } - } catch (IOException ex) { - throw new RuntimeException(ex); + @Test + public void acceptServerSocketTest() throws Exception { + try (ServerSocket ss = new ServerSocket(0)) { + int port = ss.getLocalPort(); + + String addr = "localhost:" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen,connect,resolve"), + new SocketPermission("localhost:1024-", "accept")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + InetAddress me = InetAddress.getLocalHost(); + try (Socket client = new Socket(me, port)) { + ss.accept(); + } + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + InetAddress me = InetAddress.getLocalHost(); + try (Socket client = new Socket(me, port)) { + ss.accept(); + } + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } } - public static void sendDatagramPacketTest(int port) { - String msg = "Hello"; - try { - InetAddress group = InetAddress.getByName("229.227.226.221"); - try (DatagramSocket s = new DatagramSocket(port)) { - DatagramPacket hi = new DatagramPacket(msg.getBytes(), - msg.length(), group, port); - s.send(hi); - } - } catch (IOException ex) { - throw new RuntimeException(ex); + @Test + public void sendDatagramPacketTest() throws Exception { + byte[] msg = "Hello".getBytes(UTF_8); + InetAddress group = InetAddress.getByName("229.227.226.221"); + + try (DatagramSocket ds = new DatagramSocket(0)) { + int port = ds.getLocalPort(); + + String addr = "localhost:" + port; + //test for SocketPermission "229.227.226.221", "connect,accept" + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen,resolve"), + new SocketPermission("229.227.226.221", "connect,accept")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + DatagramPacket hi = new DatagramPacket(msg, msg.length, group, port); + ds.send(hi); + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + DatagramPacket hi = new DatagramPacket(msg, msg.length, group, port); + ds.send(hi); + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } } - public void joinGroupMulticastTest(int port) { - try { - InetAddress group = InetAddress.getByName("229.227.226.221"); - try (MulticastSocket s = new MulticastSocket(port)) { + @Test + public void joinGroupMulticastTest() throws Exception { + InetAddress group = InetAddress.getByName("229.227.226.221"); + try (MulticastSocket s = new MulticastSocket(0)) { + int port = s.getLocalPort(); + + String addr = "localhost:" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen,resolve"), + new SocketPermission("229.227.226.221", "connect,accept")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { s.joinGroup(group); s.leaveGroup(group); - } - } catch (IOException ex) { - throw new RuntimeException(ex); + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + s.joinGroup(group); + s.leaveGroup(group); + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } + } - public void listenDatagramSocketTest(int port) { - try (DatagramSocket ds = new DatagramSocket(port)) { - } catch (IOException ex) { - throw new RuntimeException(ex); - } + @Test + public void listenDatagramSocketTest() throws Exception { + // the hardcoded port number doesn't really matter since we expect the + // security permission to be checked before the underlying operation. + int port = 8899; + String addr = "localhost:" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (DatagramSocket ds = new DatagramSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (DatagramSocket ds = new DatagramSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } - public void listenMulticastSocketTest(int port) { - try (MulticastSocket ms = new MulticastSocket(port)) { - } catch (IOException ex) { - throw new RuntimeException(ex); - } + @Test + public void listenMulticastSocketTest() throws Exception { + // the hardcoded port number doesn't really matter since we expect the + // security permission to be checked before the underlying operation. + int port = 8899; + String addr = "localhost:" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (MulticastSocket ms = new MulticastSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (MulticastSocket ms = new MulticastSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } } - public void listenServerSocketTest(int port) { - try (ServerSocket ms = new ServerSocket(port)) { - } catch (IOException ex) { - throw new RuntimeException(ex); - } + @Test + public void listenServerSocketTest() throws Exception { + // the hardcoded port number doesn't really matter since we expect the + // security permission to be checked before the underlying operation. + int port = 8899; + String addr = "localhost:" + port; + AccessControlContext acc = getAccessControlContext( + new SocketPermission(addr, "listen")); + + // Positive + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (ServerSocket ss = new ServerSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + return null; + }, acc); + + // Negative + try { + AccessController.doPrivileged((PrivilegedExceptionAction) () -> { + try (ServerSocket ss = new ServerSocket(port)) { } + catch (IOException intermittentlyExpected) { /* ignore */ } + fail("Expected SecurityException"); + return null; + }, RESTRICTED_ACC); + } catch (SecurityException expected) { } + } private static AccessControlContext getAccessControlContext(Permission... ps) { @@ -234,4 +326,15 @@ public class SocketPermissionTest { return new AccessControlContext(new ProtectionDomain[]{pd}); } + // Standalone entry point for running with, possibly older, JDKs. + public static void main(String[] args) throws Throwable { + SocketPermissionTest test = new SocketPermissionTest(); + test.setupSecurityManager(); + for (java.lang.reflect.Method m : SocketPermissionTest.class.getDeclaredMethods()) { + if (m.getAnnotation(Test.class) != null) { + System.out.println("Invoking " + m.getName()); + m.invoke(test); + } + } + } } diff --git a/jdk/test/java/net/SocketPermission/policy b/jdk/test/java/net/SocketPermission/policy deleted file mode 100644 index 2a71c848da8..00000000000 --- a/jdk/test/java/net/SocketPermission/policy +++ /dev/null @@ -1,3 +0,0 @@ -grant { - permission java.security.AllPermission; -}; From ff74b293048600a6890cf132d6db9e2cfa278114 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Tue, 26 Jan 2016 13:32:07 -0800 Subject: [PATCH 03/17] 8144539: Update PKCS11 tests to run with security manager Reviewed-by: valeriep, ascarpino --- .../security/pkcs11/Cipher/ReinitCipher.java | 17 +- .../pkcs11/Cipher/TestPKCS5PaddingError.java | 26 +-- .../security/pkcs11/Cipher/TestRSACipher.java | 24 +- .../pkcs11/Cipher/TestRSACipherWrap.java | 22 +- .../pkcs11/Cipher/TestRawRSACipher.java | 19 +- .../pkcs11/Cipher/TestSymmCiphers.java | 24 +- .../pkcs11/Cipher/TestSymmCiphersNoPad.java | 28 ++- .../security/pkcs11/KeyAgreement/TestDH.java | 24 +- .../pkcs11/KeyAgreement/TestInterop.java | 21 +- .../pkcs11/KeyAgreement/TestShort.java | 21 +- .../pkcs11/KeyGenerator/DESParity.java | 22 +- .../pkcs11/KeyGenerator/TestKeyGenerator.java | 18 +- .../pkcs11/KeyPairGenerator/TestDH2048.java | 17 +- jdk/test/sun/security/pkcs11/Mac/MacKAT.java | 7 +- .../sun/security/pkcs11/Mac/MacSameTest.java | 7 +- .../sun/security/pkcs11/Mac/ReinitMac.java | 17 +- .../pkcs11/MessageDigest/ByteBuffers.java | 16 +- .../pkcs11/MessageDigest/DigestKAT.java | 21 +- .../pkcs11/MessageDigest/ReinitDigest.java | 14 +- .../pkcs11/MessageDigest/TestCloning.java | 14 +- jdk/test/sun/security/pkcs11/PKCS11Test.java | 174 ++++++++++---- .../security/pkcs11/Secmod/AddPrivateKey.java | 32 ++- .../pkcs11/Secmod/AddTrustedCert.java | 28 ++- .../sun/security/pkcs11/Secmod/Crypto.java | 15 +- .../security/pkcs11/Secmod/GetPrivateKey.java | 25 +- .../pkcs11/Secmod/JksSetPrivateKey.java | 39 +++- .../security/pkcs11/Secmod/LoadKeystore.java | 10 +- .../security/pkcs11/Secmod/TrustAnchors.java | 25 +- jdk/test/sun/security/pkcs11/Secmod/policy | 6 + .../security/pkcs11/SecureRandom/Basic.java | 16 +- .../pkcs11/Signature/ByteBuffers.java | 23 +- .../security/pkcs11/Signature/TestDSA.java | 31 ++- .../pkcs11/Signature/TestDSAKeyLength.java | 24 +- .../pkcs11/Signature/TestRSAKeyLength.java | 24 +- .../security/pkcs11/ec/ReadCertificates.java | 54 +++-- .../sun/security/pkcs11/ec/ReadPKCS12.java | 83 ++++--- .../sun/security/pkcs11/ec/TestCurves.java | 45 ++-- jdk/test/sun/security/pkcs11/ec/TestECDH.java | 30 ++- .../sun/security/pkcs11/ec/TestECDH2.java | 40 ++-- .../sun/security/pkcs11/ec/TestECDSA.java | 45 ++-- .../sun/security/pkcs11/ec/TestECDSA2.java | 37 +-- .../sun/security/pkcs11/ec/TestECGenSpec.java | 21 +- .../security/pkcs11/ec/TestKeyFactory.java | 26 ++- jdk/test/sun/security/pkcs11/ec/policy | 7 + .../pkcs11/fips/TrustManagerTest.java | 37 +-- .../pkcs11/fips/TrustManagerTest.policy | 3 + jdk/test/sun/security/pkcs11/policy | 3 + jdk/test/sun/security/pkcs11/rsa/KeyWrap.java | 30 ++- .../sun/security/pkcs11/rsa/TestCACerts.java | 39 ++-- .../security/pkcs11/rsa/TestCACerts.policy | 7 + .../security/pkcs11/rsa/TestKeyFactory.java | 19 +- .../pkcs11/rsa/TestKeyPairGenerator.java | 24 +- .../pkcs11/rsa/TestKeyPairGenerator.policy | 4 + .../security/pkcs11/rsa/TestSignatures.java | 47 ++-- .../sun/security/pkcs11/rsa/rsakeys.ks.policy | 4 + .../security/pkcs11/sslecc/CipherTest.java | 32 ++- .../pkcs11/sslecc/ClientJSSEServerJSSE.java | 20 +- .../security/pkcs11/sslecc/JSSEServer.java | 27 ++- jdk/test/sun/security/pkcs11/sslecc/policy | 9 + .../security/pkcs11/tls/TestKeyMaterial.java | 216 +++++++++--------- .../pkcs11/tls/TestLeadingZeroesP11.java | 22 +- .../security/pkcs11/tls/TestMasterSecret.java | 161 ++++++------- .../pkcs11/tls/TestMasterSecret.policy | 8 + jdk/test/sun/security/pkcs11/tls/TestPRF.java | 168 +++++++------- .../security/pkcs11/tls/TestPremaster.java | 11 +- jdk/test/sun/security/pkcs11/tls/policy | 5 + 66 files changed, 1301 insertions(+), 834 deletions(-) create mode 100644 jdk/test/sun/security/pkcs11/Secmod/policy create mode 100644 jdk/test/sun/security/pkcs11/ec/policy create mode 100644 jdk/test/sun/security/pkcs11/fips/TrustManagerTest.policy create mode 100644 jdk/test/sun/security/pkcs11/policy create mode 100644 jdk/test/sun/security/pkcs11/rsa/TestCACerts.policy create mode 100644 jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.policy create mode 100644 jdk/test/sun/security/pkcs11/rsa/rsakeys.ks.policy create mode 100644 jdk/test/sun/security/pkcs11/sslecc/policy create mode 100644 jdk/test/sun/security/pkcs11/tls/TestMasterSecret.policy create mode 100644 jdk/test/sun/security/pkcs11/tls/policy diff --git a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java index 2cd68b44a9b..db7098e5fdf 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,21 +28,22 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm ReinitCipher + * @run main/othervm ReinitCipher sm */ -import java.util.*; - -import java.security.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.Provider; +import java.util.Random; +import javax.crypto.Cipher; +import javax.crypto.spec.SecretKeySpec; public class ReinitCipher extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new ReinitCipher()); + main(new ReinitCipher(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("Cipher", "ARCFOUR") == null) { System.out.println("Not supported by provider, skipping"); diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java b/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java index f0721daa2e5..5fa94cbfc54 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,16 +27,18 @@ * @summary Test internal PKCS5Padding impl with various error conditions. * @author Valerie Peng * @library .. + * @run main/othervm TestPKCS5PaddingError + * @run main/othervm TestPKCS5PaddingError sm */ -import java.io.*; -import java.nio.*; -import java.util.*; -import java.security.*; -import java.security.spec.AlgorithmParameterSpec; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; +import java.security.AlgorithmParameters; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; public class TestPKCS5PaddingError extends PKCS11Test { private static class CI { // class for holding Cipher Information @@ -62,10 +64,8 @@ public class TestPKCS5PaddingError extends PKCS11Test { private static StringBuffer debugBuf = new StringBuffer(); + @Override public void main(Provider p) throws Exception { - boolean status = true; - Random random = new Random(); - try { byte[] plainText = new byte[200]; @@ -127,6 +127,6 @@ public class TestPKCS5PaddingError extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestPKCS5PaddingError()); + main(new TestPKCS5PaddingError(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java index 876048f46cf..b9656a54086 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,20 +28,28 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm TestRSACipher + * @run main/othervm TestRSACipher sm */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.GeneralSecurityException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.util.Arrays; +import java.util.Random; +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; public class TestRSACipher extends PKCS11Test { private static final String[] RSA_ALGOS = { "RSA/ECB/PKCS1Padding", "RSA" }; + @Override public void main(Provider p) throws Exception { try { Cipher.getInstance(RSA_ALGOS[0], p); @@ -122,7 +130,7 @@ public class TestRSACipher extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestRSACipher()); + main(new TestRSACipher(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java index c00b39942cc..8637302b547 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,13 +27,20 @@ * @summary basic test for RSA cipher key wrapping functionality * @author Valerie Peng * @library .. + * @run main/othervm TestRSACipherWrap + * @run main/othervm TestRSACipherWrap sm */ -import java.io.*; -import java.util.*; -import java.security.*; - -import javax.crypto.*; +import java.security.GeneralSecurityException; +import java.security.InvalidParameterException; +import java.security.Key; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.util.Arrays; +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; public class TestRSACipherWrap extends PKCS11Test { @@ -41,6 +48,7 @@ public class TestRSACipherWrap extends PKCS11Test { private static final String[] RSA_ALGOS = { "RSA/ECB/PKCS1Padding", "RSA" }; + @Override public void main(Provider p) throws Exception { try { Cipher.getInstance(RSA_ALGOS[0], p); @@ -104,6 +112,6 @@ public class TestRSACipherWrap extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestRSACipherWrap()); + main(new TestRSACipherWrap(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java index 17ffe9553c2..cebe4224129 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,21 @@ * @author Valerie Peng * @library .. * @key randomness + * @run main/othervm TestRawRSACipher + * @run main/othervm TestRawRSACipher sm */ -import javax.crypto.*; -import java.io.*; -import javax.crypto.spec.SecretKeySpec; -import java.security.*; -import java.util.*; +import java.security.GeneralSecurityException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.util.Arrays; +import java.util.Random; +import javax.crypto.Cipher; public class TestRawRSACipher extends PKCS11Test { + @Override public void main(Provider p) throws Exception { try { Cipher.getInstance("RSA/ECB/NoPadding", p); @@ -80,6 +85,6 @@ public class TestRawRSACipher extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestRawRSACipher()); + main(new TestRawRSACipher(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java index e6b7f7d8a34..018edc7417a 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,19 @@ * @author Valerie Peng * @library .. * @key randomness + * @run main/othervm TestSymmCiphers + * @run main/othervm TestSymmCiphers sm */ -import java.io.*; -import java.nio.*; -import java.util.*; -import java.security.*; -import java.security.spec.AlgorithmParameterSpec; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.security.AlgorithmParameters; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.util.Random; +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; public class TestSymmCiphers extends PKCS11Test { @@ -81,6 +84,7 @@ public class TestSymmCiphers extends PKCS11Test { }; private static StringBuffer debugBuf = new StringBuffer(); + @Override public void main(Provider p) throws Exception { // NSS reports CKR_DEVICE_ERROR when the data passed to // its EncryptUpdate/DecryptUpdate is not multiple of blocks @@ -272,6 +276,6 @@ public class TestSymmCiphers extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestSymmCiphers()); + main(new TestSymmCiphers(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java index 07d48649be5..2359e77bf03 100644 --- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,17 +28,22 @@ * @author Valerie Peng * @library .. * @key randomness + * @run main/othervm TestSymmCiphersNoPad + * @run main/othervm TestSymmCiphersNoPad sm */ -import java.io.*; -import java.nio.*; -import java.util.*; - -import java.security.*; -import java.security.spec.AlgorithmParameterSpec; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.security.AlgorithmParameters; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.util.Random; +import javax.crypto.Cipher; +import javax.crypto.CipherInputStream; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; public class TestSymmCiphersNoPad extends PKCS11Test { @@ -67,6 +72,7 @@ public class TestSymmCiphersNoPad extends PKCS11Test { private static StringBuffer debugBuf; + @Override public void main(Provider p) throws Exception { boolean status = true; Random random = new Random(); @@ -234,6 +240,6 @@ public class TestSymmCiphersNoPad extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestSymmCiphersNoPad()); + main(new TestSymmCiphersNoPad(), args); } } diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java index 2c123a84a06..45e03897359 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,17 +27,20 @@ * @summary Verify that DH works properly * @author Andreas Sterbenz * @library .. + * @run main/othervm TestDH + * @run main/othervm TestDH sm */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.util.Arrays; +import javax.crypto.KeyAgreement; +import javax.crypto.SecretKey; public class TestDH extends PKCS11Test { + @Override public void main(Provider p) throws Exception { if (p.getService("KeyAgreement", "DH") == null) { System.out.println("DH not supported, skipping"); @@ -91,8 +94,9 @@ public class TestDH extends PKCS11Test { testAlgorithm(ka2, kp2, ka1, kp1, "TlsPremasterSecret"); } - private static void testAlgorithm(KeyAgreement ka1, KeyPair kp1, KeyAgreement ka2, KeyPair kp2, String algorithm) throws Exception { - SecretKey key1 = null; + private static void testAlgorithm(KeyAgreement ka1, KeyPair kp1, + KeyAgreement ka2, KeyPair kp2, String algorithm) throws Exception { + SecretKey key1; ka1.init(kp1.getPrivate()); ka1.doPhase(kp2.getPublic(), true); @@ -115,7 +119,7 @@ public class TestDH extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestDH()); + main(new TestDH(), args); } } diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java index 95f1ce1c52f..15a96b9b19e 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,14 +26,18 @@ * @bug 7146728 * @summary Interop test for DH with secret that has a leading 0x00 byte * @library .. + * @run main/othervm TestInterop + * @run main/othervm TestInterop sm */ import java.math.BigInteger; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.util.Arrays; +import javax.crypto.KeyAgreement; +import javax.crypto.spec.DHPrivateKeySpec; +import javax.crypto.spec.DHPublicKeySpec; public class TestInterop extends PKCS11Test { @@ -72,6 +76,7 @@ public class TestInterop extends PKCS11Test { + "30313414180008978013330410484011186019824874948204261839391153650949864" + "429505597086564709"); + @Override public void main(Provider prov) throws Exception { if (prov.getService("KeyAgreement", "DH") == null) { System.out.println("DH not supported, skipping"); @@ -138,6 +143,6 @@ public class TestInterop extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestInterop()); + main(new TestInterop(), args); } } diff --git a/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java b/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java index ee9332764c8..aec6c0c7c16 100644 --- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,15 +27,19 @@ * @summary KAT test for DH (normal and with secret that has leading a 0x00 byte) * @author Andreas Sterbenz * @library .. + * @run main/othervm TestShort + * @run main/othervm TestShort sm */ import java.math.BigInteger; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.util.Arrays; +import javax.crypto.KeyAgreement; +import javax.crypto.spec.DHPrivateKeySpec; +import javax.crypto.spec.DHPublicKeySpec; public class TestShort extends PKCS11Test { @@ -83,6 +87,7 @@ public class TestShort extends PKCS11Test { + "1a:6a:15:d8:a4:8c:0a:ce:f0:15:03:0c:c2:56:82:a2:75:9b:49:fe:ed:60:c5:6e" + ":de:47:55:62:4f:16:20:6d:74:cc:7b:95:93:25:2c:ea"); + @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyAgreement", "DH") == null) { System.out.println("DH not supported, skipping"); @@ -142,7 +147,7 @@ public class TestShort extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestShort()); + main(new TestShort(), args); } } diff --git a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java index 2d7f77bc9c5..3c8b3a52283 100644 --- a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,19 +28,21 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm DESParity + * @run main/othervm DESParity sm */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.spec.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.Provider; +import java.util.Random; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.DESKeySpec; +import javax.crypto.spec.DESedeKeySpec; +import javax.crypto.spec.SecretKeySpec; public class DESParity extends PKCS11Test { + @Override public void main(Provider p) throws Exception { if (p.getService("SecretKeyFactory", "DES") == null) { System.out.println("Not supported by provider, skipping"); @@ -73,7 +75,7 @@ public class DESParity extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new DESParity()); + main(new DESParity(), args); } } diff --git a/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java b/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java index 3bd7e96f117..e0f669f58e3 100644 --- a/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,13 +27,16 @@ * @summary test the KeyGenerator * @author Andreas Sterbenz * @library .. + * @run main/othervm TestKeyGenerator + * @run main/othervm TestKeyGenerator sm */ -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.InvalidParameterException; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.ProviderException; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; enum TestResult { PASS, @@ -44,7 +47,7 @@ enum TestResult { public class TestKeyGenerator extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestKeyGenerator()); + main(new TestKeyGenerator(), args); } private TestResult test(String algorithm, int keyLen, Provider p, @@ -85,6 +88,7 @@ public class TestKeyGenerator extends PKCS11Test { return actual; } + @Override public void main(Provider p) throws Exception { test("DES", 0, p, TestResult.FAIL); test("DES", 56, p, TestResult.PASS); // ensure JCE-Compatibility diff --git a/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java b/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java index c11911a12fd..840e1ce3dcf 100644 --- a/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java +++ b/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,14 +27,14 @@ * @summary Ensure that 2048-bit DH key pairs can be generated * @author Valerie Peng * @library .. + * @run main/othervm TestDH2048 + * @run main/othervm TestDH2048 sm */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.InvalidParameterException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; public class TestDH2048 extends PKCS11Test { @@ -47,6 +47,7 @@ public class TestDH2048 extends PKCS11Test { } } + @Override public void main(Provider p) throws Exception { if (p.getService("KeyPairGenerator", "DH") == null) { System.out.println("KPG for DH not supported, skipping"); @@ -61,6 +62,6 @@ public class TestDH2048 extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestDH2048()); + main(new TestDH2048(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Mac/MacKAT.java b/jdk/test/sun/security/pkcs11/Mac/MacKAT.java index c7da9297159..d7679f91ffd 100644 --- a/jdk/test/sun/security/pkcs11/Mac/MacKAT.java +++ b/jdk/test/sun/security/pkcs11/Mac/MacKAT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,8 @@ import javax.crypto.spec.SecretKeySpec; * @summary Basic known-answer-test for Hmac algorithms * @author Andreas Sterbenz * @library .. - * @run main MacKAT + * @run main/othervm MacKAT + * @run main/othervm MacKAT sm */ public class MacKAT extends PKCS11Test { @@ -178,7 +179,7 @@ public class MacKAT extends PKCS11Test { }; public static void main(String[] args) throws Exception { - main(new MacKAT()); + main(new MacKAT(), args); } @Override diff --git a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java index 21eae39b0c6..8d6689721fc 100644 --- a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java +++ b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,8 @@ import javax.crypto.spec.SecretKeySpec; * @summary Check if doFinal and update operation result in same Mac * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin * @library .. - * @run main MacSameTest + * @run main/othervm MacSameTest + * @run main/othervm MacSameTest sm * @key randomness */ public class MacSameTest extends PKCS11Test { @@ -57,7 +58,7 @@ public class MacSameTest extends PKCS11Test { * @param args the command line arguments */ public static void main(String[] args) throws Exception { - main(new MacSameTest()); + main(new MacSameTest(), args); } @Override diff --git a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java index 68bef343889..39970d8df00 100644 --- a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java +++ b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,21 +28,22 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm ReinitMac + * @run main/othervm ReinitMac sm */ -import java.util.*; - -import java.security.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.Provider; +import java.util.Random; +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; public class ReinitMac extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new ReinitMac()); + main(new ReinitMac(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("Mac", "HmacMD5") == null) { System.out.println(p + " does not support HmacMD5, skipping"); diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java index 1b502a95bcf..eca0485c8a9 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,19 +28,23 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm ByteBuffers + * @run main/othervm ByteBuffers sm */ -import java.util.*; -import java.nio.*; - -import java.security.*; +import java.nio.ByteBuffer; +import java.security.MessageDigest; +import java.security.Provider; +import java.util.Arrays; +import java.util.Random; public class ByteBuffers extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new ByteBuffers()); + main(new ByteBuffers(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("MessageDigest", "MD5") == null) { System.out.println("Provider does not support MD5, skipping"); diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java b/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java index e6f948d064f..0f48f28c859 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,19 +27,23 @@ * @summary Basic known-answer-test for all our MessageDigest algorithms * @author Andreas Sterbenz * @library .. + * @run main/othervm DigestKAT + * @run main/othervm DigestKAT sm */ -import java.io.*; -import java.util.*; - -import java.security.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringReader; +import java.security.MessageDigest; +import java.security.Provider; +import java.util.Arrays; public class DigestKAT extends PKCS11Test { private final static char[] hexDigits = "0123456789abcdef".toCharArray(); public static String toString(byte[] b) { - StringBuffer sb = new StringBuffer(b.length * 3); + StringBuilder sb = new StringBuilder(b.length * 3); for (int i = 0; i < b.length; i++) { int k = b[i] & 0xff; if (i != 0) { @@ -106,6 +110,7 @@ public class DigestKAT extends PKCS11Test { this.data = data; this.digest = digest; } + @Override void run(Provider p) throws Exception { if (p.getService("MessageDigest", alg) == null) { System.out.println("Skipped " + alg); @@ -123,7 +128,6 @@ public class DigestKAT extends PKCS11Test { System.out.println("out: " + DigestKAT.toString(myDigest)); throw new Exception("Digest test for " + alg + " failed"); } -// System.out.println("Passed " + alg); } } @@ -221,12 +225,13 @@ public class DigestKAT extends PKCS11Test { System.out.println("Done (" + (stop - start) + " ms)."); } + @Override public void main(Provider p) throws Exception{ runTests(tests, p); } public static void main(String[] args) throws Exception { - main(new DigestKAT()); + main(new DigestKAT(), args); } } diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java index 2f8290a2a7a..9d8250c9ab0 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,18 +28,22 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm ReinitDigest + * @run main/othervm ReinitDigest sm */ -import java.util.*; - -import java.security.*; +import java.security.MessageDigest; +import java.security.Provider; +import java.util.Arrays; +import java.util.Random; public class ReinitDigest extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new ReinitDigest()); + main(new ReinitDigest(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("MessageDigest", "MD5") == null) { System.out.println("Provider does not support MD5, skipping"); diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java index 5ea2264109f..0aca8fbf791 100644 --- a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java +++ b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,11 +28,14 @@ * @author Valerie Peng * @library .. * @key randomness + * @run main/othervm TestCloning + * @run main/othervm TestCloning sm */ -import java.util.*; - -import java.security.*; +import java.security.MessageDigest; +import java.security.Provider; +import java.util.Arrays; +import java.util.Random; public class TestCloning extends PKCS11Test { @@ -41,13 +44,14 @@ public class TestCloning extends PKCS11Test { }; public static void main(String[] args) throws Exception { - main(new TestCloning()); + main(new TestCloning(), args); } private static final byte[] data1 = new byte[10]; private static final byte[] data2 = new byte[10*1024]; + @Override public void main(Provider p) throws Exception { Random r = new Random(); byte[] data1 = new byte[10]; diff --git a/jdk/test/sun/security/pkcs11/PKCS11Test.java b/jdk/test/sun/security/pkcs11/PKCS11Test.java index e0a17eaa87e..46621e1ae2e 100644 --- a/jdk/test/sun/security/pkcs11/PKCS11Test.java +++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,38 @@ // common infrastructure for SunPKCS11 tests -import java.io.*; -import java.util.*; - -import java.security.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.StringReader; +import java.security.AlgorithmParameters; +import java.security.InvalidAlgorithmParameterException; +import java.security.KeyPairGenerator; +import java.security.NoSuchProviderException; +import java.security.Provider; +import java.security.ProviderException; +import java.security.Security; import java.security.spec.ECGenParameterSpec; import java.security.spec.ECParameterSpec; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.ServiceLoader; +import java.util.Set; public abstract class PKCS11Test { + private boolean enableSM = false; + + static final Properties props = System.getProperties(); + static final String PKCS11 = "PKCS11"; // directory of the test source @@ -40,7 +63,8 @@ public abstract class PKCS11Test { static final char SEP = File.separatorChar; - private final static String REL_CLOSED = "../../../../closed/sun/security/pkcs11".replace('/', SEP); + private static final String DEFAULT_POLICY = + BASE + SEP + ".." + SEP + "policy"; // directory corresponding to BASE in the /closed hierarchy static final String CLOSED_BASE; @@ -53,6 +77,9 @@ public abstract class PKCS11Test { String p1 = absBase.substring(0, k + 6); String p2 = absBase.substring(k + 5); CLOSED_BASE = p1 + "closed" + p2; + + // set it as a system property to make it available in policy file + System.setProperty("closed.base", CLOSED_BASE); } static String NSPR_PREFIX = ""; @@ -86,7 +113,7 @@ public abstract class PKCS11Test { if (p.getName().equals("SunPKCS11")) { found = true; break; - }; + } } catch (Exception e) { // ignore and move on to the next one } @@ -103,6 +130,19 @@ public abstract class PKCS11Test { pkcs11 = p; } + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + static boolean isBadSolarisSparc(Provider p) { + if ("SunPKCS11-Solaris".equals(p.getName()) && badSolarisSparc) { + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return true; + } + return false; + } + // Return a SunPKCS11 provider configured with the specified config file static Provider getSunPKCS11(String config) throws Exception { if (pkcs11 == null) { @@ -114,15 +154,43 @@ public abstract class PKCS11Test { public abstract void main(Provider p) throws Exception; private void premain(Provider p) throws Exception { - long start = System.currentTimeMillis(); - System.out.println("Running test with provider " + p.getName() + "..."); - main(p); - long stop = System.currentTimeMillis(); - System.out.println("Completed test with provider " + p.getName() + - " (" + (stop - start) + " ms)."); + // set a security manager and policy before a test case runs, + // and disable them after the test case finished + try { + if (enableSM) { + System.setSecurityManager(new SecurityManager()); + } + long start = System.currentTimeMillis(); + System.out.printf( + "Running test with provider %s (security manager %s) ...%n", + p.getName(), enableSM ? "enabled" : "disabled"); + main(p); + long stop = System.currentTimeMillis(); + System.out.println("Completed test with provider " + p.getName() + + " (" + (stop - start) + " ms)."); + } finally { + if (enableSM) { + System.setSecurityManager(null); + } + } } public static void main(PKCS11Test test) throws Exception { + main(test, null); + } + + public static void main(PKCS11Test test, String[] args) throws Exception { + if (args != null) { + if (args.length > 0 && "sm".equals(args[0])) { + test.enableSM = true; + } + if (test.enableSM) { + System.setProperty("java.security.policy", + (args.length > 1) ? BASE + SEP + args[1] + : DEFAULT_POLICY); + } + } + Provider[] oldProviders = Security.getProviders(); try { System.out.println("Beginning test run " + test.getClass().getName() + "..."); @@ -218,7 +286,6 @@ public abstract class PKCS11Test { } static String getNSSLibDir(String library) throws Exception { - Properties props = System.getProperties(); String osName = props.getProperty("os.name"); if (osName.startsWith("Win")) { osName = "Windows"; @@ -249,6 +316,15 @@ public abstract class PKCS11Test { return nssLibDir; } + static boolean isBadNSSVersion(Provider p) { + if (isNSS(p) && badNSSVersion) { + System.out.println("NSS 3.11 has a DER issue that recent " + + "version do not."); + return true; + } + return false; + } + protected static void safeReload(String lib) throws Exception { try { System.load(lib); @@ -317,34 +393,32 @@ public abstract class PKCS11Test { try { libfile = getNSSLibDir() + System.mapLibraryName(library); - FileInputStream is = new FileInputStream(libfile); - byte[] data = new byte[1000]; - int read = 0; + try (FileInputStream is = new FileInputStream(libfile)) { + byte[] data = new byte[1000]; + int read = 0; - while (is.available() > 0) { - if (read == 0) { - read = is.read(data, 0, 1000); - } else { - // Prepend last 100 bytes in case the header was split - // between the reads. - System.arraycopy(data, 900, data, 0, 100); - read = 100 + is.read(data, 100, 900); - } + while (is.available() > 0) { + if (read == 0) { + read = is.read(data, 0, 1000); + } else { + // Prepend last 100 bytes in case the header was split + // between the reads. + System.arraycopy(data, 900, data, 0, 100); + read = 100 + is.read(data, 100, 900); + } - s = new String(data, 0, read); - if ((i = s.indexOf(nssHeader)) > 0) { - found = true; - // If the nssHeader is before 920 we can break, otherwise - // we may not have the whole header so do another read. If - // no bytes are in the stream, that is ok, found is true. - if (i < 920) { - break; + s = new String(data, 0, read); + if ((i = s.indexOf(nssHeader)) > 0) { + found = true; + // If the nssHeader is before 920 we can break, otherwise + // we may not have the whole header so do another read. If + // no bytes are in the stream, that is ok, found is true. + if (i < 920) { + break; + } } } } - - is.close(); - } catch (Exception e) { e.printStackTrace(); } @@ -438,14 +512,13 @@ public abstract class PKCS11Test { } // Generate a vector of supported elliptic curves of a given provider - static Vector getKnownCurves(Provider p) throws Exception { + static List getKnownCurves(Provider p) throws Exception { int index; int begin; int end; String curve; - KeyPair kp = null; - Vector results = new Vector(); + List results = new ArrayList<>(); // Get Curves to test from SunEC. String kcProp = Security.getProvider("SunEC"). getProperty("AlgorithmParameters.EC SupportedCurves"); @@ -483,7 +556,7 @@ public abstract class PKCS11Test { try { KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", p); kpg.initialize(e); - kp = kpg.generateKeyPair(); + kpg.generateKeyPair(); results.add(e); System.out.println("Supported"); } catch (ProviderException ex) { @@ -514,9 +587,8 @@ public abstract class PKCS11Test { } // Check support for a curve with a provided Vector of EC support - boolean checkSupport(Vector supportedEC, + boolean checkSupport(List supportedEC, ECParameterSpec curve) { - boolean found = false; for (ECParameterSpec ec: supportedEC) { if (ec.equals(curve)) { return true; @@ -529,7 +601,7 @@ public abstract class PKCS11Test { // Location of the NSS libraries on each supported platform static { - osMap = new HashMap(); + osMap = new HashMap<>(); osMap.put("SunOS-sparc-32", new String[]{"/usr/lib/mps/"}); osMap.put("SunOS-sparcv9-64", new String[]{"/usr/lib/mps/64/"}); osMap.put("SunOS-x86-32", new String[]{"/usr/lib/mps/"}); @@ -551,11 +623,20 @@ public abstract class PKCS11Test { private final static char[] hexDigits = "0123456789abcdef".toCharArray(); + static final boolean badNSSVersion = + getNSSVersion() >= 3.11 && getNSSVersion() < 3.12; + + static final boolean badSolarisSparc = + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0; + public static String toString(byte[] b) { if (b == null) { return "(null)"; } - StringBuffer sb = new StringBuffer(b.length * 3); + StringBuilder sb = new StringBuilder(b.length * 3); for (int i = 0; i < b.length; i++) { int k = b[i] & 0xff; if (i != 0) { @@ -637,8 +718,7 @@ public abstract class PKCS11Test { /** * Get the identifier for the operating system distribution */ - public String getDistro() { - + static String getDistro() { try (BufferedReader in = new BufferedReader(new InputStreamReader( Runtime.getRuntime().exec("uname -v").getInputStream()))) { diff --git a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java index 56833bd2cc6..67c691a3bc2 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,26 @@ * @author Andreas Sterbenz * @library .. * @run main/othervm AddPrivateKey + * @run main/othervm AddPrivateKey sm policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.KeyStore.*; -import java.security.cert.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.KeyFactory; +import java.security.KeyStore; +import java.security.KeyStore.PasswordProtection; +import java.security.KeyStore.PrivateKeyEntry; +import java.security.KeyStoreException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Security; +import java.security.Signature; +import java.security.cert.X509Certificate; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; // this test is currently only run for the NSS KeyStore provider, but it // is really a generic KeyStore test so it should be modified to run for @@ -63,6 +75,12 @@ public class AddPrivateKey extends SecmodTest { System.out.println(); Security.addProvider(p); + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyStore ks = KeyStore.getInstance(PKCS11, p); ks.load(null, password); for (String alias : aliases(ks)) { diff --git a/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java b/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java index 6b2b545611a..2eedf3cd506 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java +++ b/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,21 @@ * @author Andreas Sterbenz * @library .. * @run main/othervm AddTrustedCert + * @run main/othervm AddTrustedCert sm policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.KeyStore.*; -import java.security.cert.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.KeyStore.TrustedCertificateEntry; +import java.security.Provider; +import java.security.Security; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.Collection; +import java.util.Collections; +import java.util.TreeSet; public class AddTrustedCert extends SecmodTest { @@ -56,6 +63,13 @@ public class AddTrustedCert extends SecmodTest { System.out.println(p); Security.addProvider(p); + + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyStore ks = KeyStore.getInstance(PKCS11, p); ks.load(null, password); Collection aliases = new TreeSet<>(Collections.list( diff --git a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java index 735149f1c84..2e571051cbd 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java +++ b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,9 +28,14 @@ * @author Andreas Sterbenz * @library .. * @run main/othervm Crypto + * @run main/othervm Crypto sm policy */ -import java.security.*; +import java.io.File; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.security.Signature; public class Crypto extends SecmodTest { @@ -42,6 +47,12 @@ public class Crypto extends SecmodTest { String configName = BASE + SEP + "nsscrypto.cfg"; Provider p = getSunPKCS11(configName); + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p); KeyPair kp = kpg.generateKeyPair(); diff --git a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java index a2547652348..b3170597b5d 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,13 +29,19 @@ * @author Andreas Sterbenz * @library .. * @run main/othervm GetPrivateKey + * @run main/othervm GetPrivateKey sm policy */ -import java.util.*; - -import java.security.*; -import java.security.KeyStore.*; -import java.security.cert.*; +import java.io.File; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.Security; +import java.security.Signature; +import java.security.cert.X509Certificate; +import java.util.Collection; +import java.util.Collections; +import java.util.TreeSet; public class GetPrivateKey extends SecmodTest { @@ -49,6 +55,13 @@ public class GetPrivateKey extends SecmodTest { System.out.println(p); Security.addProvider(p); + + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyStore ks = KeyStore.getInstance(PKCS11, p); ks.load(null, password); Collection aliases = new TreeSet<>( diff --git a/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java index e3a60befff4..7613fce9ba5 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java +++ b/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,13 +28,19 @@ * @author Wang Weijun * @library .. * @run main/othervm JksSetPrivateKey + * @run main/othervm JksSetPrivateKey sm policy */ -import java.util.*; - -import java.security.*; -import java.security.KeyStore.*; -import java.security.cert.*; +import java.io.File; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.Security; +import java.security.cert.X509Certificate; +import java.util.Collection; +import java.util.Collections; +import java.util.TreeSet; public class JksSetPrivateKey extends SecmodTest { @@ -48,9 +54,16 @@ public class JksSetPrivateKey extends SecmodTest { System.out.println(p); Security.addProvider(p); + + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyStore ks = KeyStore.getInstance("PKCS11", p); ks.load(null, password); - Collection aliases = new TreeSet(Collections.list(ks.aliases())); + Collection aliases = new TreeSet<>(Collections.list(ks.aliases())); System.out.println("entries: " + aliases.size()); System.out.println(aliases); @@ -66,14 +79,14 @@ public class JksSetPrivateKey extends SecmodTest { jks.setKeyEntry("k1", privateKey, "changeit".toCharArray(), chain); throw new Exception("No, an NSS PrivateKey shouldn't be extractable and put inside a JKS keystore"); } catch (KeyStoreException e) { - System.err.println(e);; // This is OK + System.err.println(e); // This is OK } try { jks.setKeyEntry("k2", new DummyPrivateKey(), "changeit".toCharArray(), chain); throw new Exception("No, non-PKCS#8 key shouldn't be put inside a KeyStore"); } catch (KeyStoreException e) { - System.err.println(e);; // This is OK + System.err.println(e); // This is OK } System.out.println("OK"); @@ -81,35 +94,41 @@ public class JksSetPrivateKey extends SecmodTest { jks.setKeyEntry("k3", new DummyPrivateKey2(), "changeit".toCharArray(), chain); throw new Exception("No, not-extractble key shouldn't be put inside a KeyStore"); } catch (KeyStoreException e) { - System.err.println(e);; // This is OK + System.err.println(e); // This is OK } System.out.println("OK"); } } class DummyPrivateKey implements PrivateKey { + @Override public String getAlgorithm() { return "DUMMY"; } + @Override public String getFormat() { return "DUMMY"; } + @Override public byte[] getEncoded() { return "DUMMY".getBytes(); } } class DummyPrivateKey2 implements PrivateKey { + @Override public String getAlgorithm() { return "DUMMY"; } + @Override public String getFormat() { return "PKCS#8"; } + @Override public byte[] getEncoded() { return null; } diff --git a/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java b/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java index fd1aa694ddf..c08fe8446aa 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java +++ b/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,6 +21,7 @@ * questions. */ +import java.io.File; import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; @@ -35,6 +36,7 @@ import java.util.Collections; * @summary Checks that PKCS#11 keystore can't be loaded with wrong password * @library ../ * @run main/othervm LoadKeystore + * @run main/othervm LoadKeystore sm policy */ public class LoadKeystore extends SecmodTest { @@ -50,6 +52,12 @@ public class LoadKeystore extends SecmodTest { System.out.println(); Security.addProvider(p); + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + try { System.out.println("Load keystore with wrong type"); KeyStore.getInstance("unknown", p); diff --git a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java index 3d4a43bff30..277a51ec4c2 100644 --- a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java +++ b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,13 +28,17 @@ * @author Andreas Sterbenz * @library .. * @run main/othervm TrustAnchors + * @run main/othervm TrustAnchors sm policy */ -import java.util.*; - -import java.security.*; -import java.security.KeyStore.*; -import java.security.cert.*; +import java.io.File; +import java.security.KeyStore; +import java.security.Provider; +import java.security.Security; +import java.security.cert.X509Certificate; +import java.util.Collection; +import java.util.Collections; +import java.util.TreeSet; public class TrustAnchors extends SecmodTest { @@ -57,9 +61,16 @@ public class TrustAnchors extends SecmodTest { System.out.println(p); Security.addProvider(p); + + if (args.length > 1 && "sm".equals(args[0])) { + System.setProperty("java.security.policy", + BASE + File.separator + args[1]); + System.setSecurityManager(new SecurityManager()); + } + KeyStore ks = KeyStore.getInstance("PKCS11", p); ks.load(null, null); - Collection aliases = new TreeSet(Collections.list(ks.aliases())); + Collection aliases = new TreeSet<>(Collections.list(ks.aliases())); System.out.println("entries: " + aliases.size()); System.out.println(aliases); diff --git a/jdk/test/sun/security/pkcs11/Secmod/policy b/jdk/test/sun/security/pkcs11/Secmod/policy new file mode 100644 index 00000000000..e4c95ca6dd5 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/Secmod/policy @@ -0,0 +1,6 @@ +grant { + permission java.security.SecurityPermission "authProvider.*"; + permission java.io.FilePermission "${test.src}/-", "read"; + permission java.io.FilePermission "${pkcs11test.nss.db}/-", "read"; + permission java.io.FilePermission "${pkcs11test.nss.libdir}/-", "read"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java index f9bfb1759ef..8c2c1686f73 100644 --- a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java +++ b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,17 +28,17 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm Basic + * @run main/othervm Basic sm */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.SecureRandom; public class Basic extends PKCS11Test { + @Override public void main(Provider p) throws Exception { SecureRandom random; try { @@ -58,7 +58,7 @@ public class Basic extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new Basic()); + main(new Basic(), args); } } diff --git a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java index d45063a8eda..39e4424af35 100644 --- a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java +++ b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,19 +28,24 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm ByteBuffers + * @run main/othervm ByteBuffers sm */ -import java.util.*; -import java.nio.*; - -import java.security.*; +import java.nio.ByteBuffer; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.security.Signature; +import java.util.Random; public class ByteBuffers extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new ByteBuffers()); + main(new ByteBuffers(), args); } + @Override public void main(Provider p) throws Exception { /* @@ -48,9 +53,9 @@ public class ByteBuffers extends PKCS11Test { * when running SunPKCS11-Solaris provider (8044554) */ if (p.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java index 2b81bb3a333..c4fcf5d5956 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,24 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm TestDSA + * @run main/othervm TestDSA sm */ -import java.io.*; -import java.util.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringReader; import java.math.BigInteger; - -import java.security.*; -import java.security.spec.*; +import java.security.KeyFactory; +import java.security.MessageDigest; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignatureException; +import java.security.spec.DSAPrivateKeySpec; +import java.security.spec.DSAPublicKeySpec; +import java.util.Random; public class TestDSA extends PKCS11Test { @@ -102,9 +112,10 @@ public class TestDSA extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestDSA()); + main(new TestDSA(), args); } + @Override public void main(Provider provider) throws Exception { long start = System.currentTimeMillis(); @@ -115,9 +126,9 @@ public class TestDSA extends PKCS11Test { * when running SunPKCS11-Solaris (8044554) */ if (provider.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java index efe97077628..f671bba3bd7 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,6 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 7200306 8029158 @@ -27,19 +28,24 @@ * with unsupported key sizes * @library .. * @key randomness + * @run main/othervm TestDSAKeyLength + * @run main/othervm TestDSAKeyLength sm */ - -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; +import java.security.InvalidKeyException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.security.SecureRandom; +import java.security.Signature; public class TestDSAKeyLength extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestDSAKeyLength()); + main(new TestDSAKeyLength(), args); } + @Override public void main(Provider provider) throws Exception { if (isNSS(provider) && getNSSVersion() >= 3.14) { System.out.println("Skip testing NSS " + getNSSVersion()); @@ -51,9 +57,9 @@ public class TestDSAKeyLength extends PKCS11Test { * when running SunPKCS11-Solaris (8044554) */ if (provider.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + diff --git a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java index 0b79e68d20c..43341472e99 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,14 +27,26 @@ * @summary Make sure initSign/initVerify() check RSA key lengths * @author Yu-Ching Valerie Peng * @library .. + * @run main/othervm TestRSAKeyLength + * @run main/othervm TestRSAKeyLength sm */ -import java.security.*; +import java.security.InvalidKeyException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignedObject; public class TestRSAKeyLength extends PKCS11Test { + public static void main(String[] args) throws Exception { - main(new TestRSAKeyLength()); + main(new TestRSAKeyLength(), args); } + + @Override public void main(Provider p) throws Exception { /* @@ -42,9 +54,9 @@ public class TestRSAKeyLength extends PKCS11Test { * when running SunPKCS11-Solaris (8044554) */ if (p.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + diff --git a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java index 82b7f4abc26..4c0bbfba8f6 100644 --- a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java +++ b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,31 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @run main/othervm ReadCertificates + * @run main/othervm ReadCertificates sm policy */ -import java.io.*; -import java.util.*; - -import java.security.cert.*; -import java.security.*; -import java.security.interfaces.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.Provider; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.SignatureException; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.security.interfaces.ECPublicKey; import java.security.spec.ECParameterSpec; - +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import javax.security.auth.x500.X500Principal; public class ReadCertificates extends PKCS11Test { @@ -49,16 +64,18 @@ public class ReadCertificates extends PKCS11Test { private static Collection readCertificates(File file) throws Exception { System.out.println("Loading " + file.getName() + "..."); - InputStream in = new FileInputStream(file); - Collection certs = (Collection)factory.generateCertificates(in); - in.close(); + Collection certs; + try (InputStream in = new FileInputStream(file)) { + certs = (Collection)factory.generateCertificates(in); + } return certs; } public static void main(String[] args) throws Exception { - main(new ReadCertificates()); + main(new ReadCertificates(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("Signature", "SHA1withECDSA") == null) { System.out.println("Provider does not support ECDSA, skipping..."); @@ -79,7 +96,7 @@ public class ReadCertificates extends PKCS11Test { } catch (CertificateException e) { // ignore } - Map certs = new LinkedHashMap(); + Map certs = new LinkedHashMap<>(); File dir = new File(BASE, "certs"); File closedDir = new File(CLOSED_BASE, "certs"); @@ -103,7 +120,7 @@ public class ReadCertificates extends PKCS11Test { System.out.println("OK: " + certs.size() + " certificates."); // Get supported curves - Vector supportedEC = getKnownCurves(p); + List supportedEC = getKnownCurves(p); System.out.println("Test Certs:\n"); for (X509Certificate cert : certs.values()) { @@ -127,7 +144,8 @@ public class ReadCertificates extends PKCS11Test { System.out.println("Warning: " + e.getMessage() + ". Trying another provider..."); cert.verify(key); - } catch (Exception e) { + } catch (CertificateException | InvalidKeyException | + NoSuchProviderException | SignatureException e) { System.out.println(e.getMessage()); if (key instanceof ECPublicKey) { System.out.println("Failed.\n\tCurve: " + @@ -145,7 +163,7 @@ public class ReadCertificates extends PKCS11Test { // try some random invalid signatures to make sure we get the correct // error System.out.println("Checking incorrect signatures..."); - List certList = new ArrayList(certs.values()); + List certList = new ArrayList<>(certs.values()); for (int i = 0; i < 20; i++) { X509Certificate cert, signer; do { @@ -161,9 +179,7 @@ public class ReadCertificates extends PKCS11Test { } else { throw new Exception("Verified invalid signature"); } - } catch (SignatureException e) { - System.out.println("OK: " + e); - } catch (InvalidKeyException e) { + } catch (SignatureException | InvalidKeyException e) { System.out.println("OK: " + e); } } diff --git a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java index 112470509fe..3252b08d195 100644 --- a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java +++ b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,26 +29,41 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @run main/othervm ReadPKCS12 + * @run main/othervm ReadPKCS12 sm policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.interfaces.*; -import java.security.cert.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.InputStream; +import java.io.OutputStream; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; import java.security.cert.Certificate; - -import javax.security.auth.x500.X500Principal; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; public class ReadPKCS12 extends PKCS11Test { private final static boolean COPY = false; public static void main(String[] args) throws Exception { - main(new ReadPKCS12()); + main(new ReadPKCS12(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("Signature", "SHA1withECDSA") == null) { System.out.println("Provider does not support ECDSA, skipping..."); @@ -71,29 +86,30 @@ public class ReadPKCS12 extends PKCS11Test { KeyStore ks2; if (COPY) { ks2 = KeyStore.getInstance("JKS"); - InputStream in = new FileInputStream("keystore.old"); - ks2.load(in, "passphrase".toCharArray()); - in.close(); + try (InputStream in = new FileInputStream("keystore.old")) { + ks2.load(in, "passphrase".toCharArray()); + } } File dir = new File(BASE, "pkcs12"); File closedDir = new File(CLOSED_BASE, "pkcs12"); - Map passwords = new HashMap(); - BufferedReader reader = new BufferedReader(new FileReader((new File(BASE, "p12passwords.txt")))); - while (true) { - String line = reader.readLine(); - if (line == null) { - break; + Map passwords = new HashMap<>(); + try (BufferedReader reader = new BufferedReader( + new FileReader(new File(BASE, "p12passwords.txt")))) { + while (true) { + String line = reader.readLine(); + if (line == null) { + break; + } + line = line.trim(); + if ((line.length() == 0) || line.startsWith("#")) { + continue; + } + String[] s = line.split(" "); + passwords.put(s[0], s[1].toCharArray()); } - line = line.trim(); - if ((line.length() == 0) || line.startsWith("#")) { - continue; - } - String[] s = line.split(" "); - passwords.put(s[0], s[1].toCharArray()); } - reader.close(); for (File file : concat(dir.listFiles(), closedDir.listFiles())) { String name = file.getName(); @@ -108,10 +124,11 @@ public class ReadPKCS12 extends PKCS11Test { password = passwords.get("*"); } - InputStream in = new FileInputStream(file); - KeyStore ks = KeyStore.getInstance("PKCS12"); - ks.load(in, password); - in.close(); + KeyStore ks; + try (InputStream in = new FileInputStream(file)) { + ks = KeyStore.getInstance("PKCS12"); + ks.load(in, password); + } List aliases = Collections.list(ks.aliases()); System.out.println("Aliases: " + aliases); @@ -147,9 +164,9 @@ public class ReadPKCS12 extends PKCS11Test { } if (COPY) { - OutputStream out = new FileOutputStream("keystore.new"); - ks2.store(out, "passphrase".toCharArray()); - out.close(); + try (OutputStream out = new FileOutputStream("keystore.new")) { + ks2.store(out, "passphrase".toCharArray()); + } } System.out.println("OK"); diff --git a/jdk/test/sun/security/pkcs11/ec/TestCurves.java b/jdk/test/sun/security/pkcs11/ec/TestCurves.java index 3ada7788cf9..d8e52a9aa69 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java +++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,53 +29,46 @@ * @library .. * @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper * @compile -XDignore.symbol.file TestCurves.java - * @run main TestCurves + * @run main/othervm TestCurves + * @run main/othervm TestCurves sm * @key randomness */ -import java.util.*; - -import java.security.*; -import java.security.spec.*; - -import javax.crypto.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import java.security.ProviderException; +import java.security.Signature; +import java.security.spec.ECParameterSpec; +import java.util.Arrays; +import java.util.List; +import java.util.Random; +import javax.crypto.KeyAgreement; public class TestCurves extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestCurves()); + main(new TestCurves(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("KeyAgreement", "ECDH") == null) { System.out.println("Not supported by provider, skipping"); return; } - if (isNSS(p) && getNSSVersion() >= 3.11 && getNSSVersion() < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not."); + if (isBadNSSVersion(p)) { return; } - /* - * Use Solaris SPARC 11.2 or later to avoid an intermittent failure - * when running SunPKCS11-Solaris (8044554) - */ - if (p.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && - getDistro().compareTo("11.2") < 0) { - - System.out.println("SunPKCS11-Solaris provider requires " + - "Solaris SPARC 11.2 or later, skipping"); + if (isBadSolarisSparc(p)) { return; } // Check if this is sparc for later failure avoidance. boolean sparc = false; - if (System.getProperty("os.arch").equals("sparcv9")) { + if (props.getProperty("os.arch").equals("sparcv9")) { sparc = true; System.out.println("This is a sparcv9"); } @@ -84,7 +77,7 @@ public class TestCurves extends PKCS11Test { byte[] data = new byte[2048]; random.nextBytes(data); - Vector curves = getKnownCurves(p); + List curves = getKnownCurves(p); for (ECParameterSpec params : curves) { System.out.println("Testing " + params + "..."); KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", p); diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDH.java b/jdk/test/sun/security/pkcs11/ec/TestECDH.java index 8d950818560..421f46ccfc2 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDH.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,21 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @run main/othervm TestECDH + * @run main/othervm TestECDH sm policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.spec.*; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; import java.security.interfaces.ECPublicKey; - -import javax.crypto.*; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; +import javax.crypto.KeyAgreement; public class TestECDH extends PKCS11Test { @@ -55,6 +60,7 @@ public class TestECDH extends PKCS11Test { private final static String secret163 = "04:ae:71:c1:c6:4d:f4:34:4d:72:70:a4:64:65:7f:2d:88:2d:3f:50:be"; + @Override public void main(Provider p) throws Exception { if (p.getService("KeyAgreement", "ECDH") == null) { System.out.println("Provider does not support ECDH, skipping"); @@ -89,10 +95,12 @@ public class TestECDH extends PKCS11Test { System.out.println("OK"); } - private final static void test(Provider p, String pub1s, String priv1s, String pub2s, String priv2s, String secrets) throws Exception { + private final static void test(Provider p, String pub1s, String priv1s, + String pub2s, String priv2s, String secrets) throws Exception { KeyFactory kf = KeyFactory.getInstance("EC", p); PublicKey pub1 = kf.generatePublic(new X509EncodedKeySpec(parse(pub1s))); - System.out.println("Testing using parameters " + ((ECPublicKey)pub1).getParams() + "..."); + System.out.println("Testing using parameters " + + ((ECPublicKey)pub1).getParams() + "..."); PrivateKey priv1 = kf.generatePrivate(new PKCS8EncodedKeySpec(parse(priv1s))); PublicKey pub2 = kf.generatePublic(new X509EncodedKeySpec(parse(pub2s))); @@ -121,7 +129,7 @@ public class TestECDH extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestECDH()); + main(new TestECDH(), args); } } diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDH2.java b/jdk/test/sun/security/pkcs11/ec/TestECDH2.java index d5b03ae32aa..dee7a706ce7 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDH2.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,19 +30,25 @@ * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util * @compile -XDignore.symbol.file TestECDH2.java - * @run main TestECDH2 + * @run main/othervm TestECDH2 + * @run main/othervm TestECDH2 sm */ -import java.io.*; -import java.util.*; import java.math.BigInteger; - -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; -import javax.crypto.*; - -import sun.security.util.ECUtil; +import java.security.AlgorithmParameters; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.spec.ECGenParameterSpec; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.ECPrivateKeySpec; +import java.security.spec.ECPublicKeySpec; +import java.util.Arrays; +import javax.crypto.KeyAgreement; public class TestECDH2 extends PKCS11Test { @@ -81,7 +87,9 @@ public class TestECDH2 extends PKCS11Test { private KeyPair genECKeyPair(String curvName, String privD, String pubX, String pubY, Provider p) throws Exception { - ECParameterSpec ecParams = ECUtil.getECParameterSpec(p, curvName); + AlgorithmParameters params = AlgorithmParameters.getInstance("EC", p); + params.init(new ECGenParameterSpec(curvName)); + ECParameterSpec ecParams = params.getParameterSpec(ECParameterSpec.class); ECPrivateKeySpec privKeySpec = new ECPrivateKeySpec(new BigInteger(privD, 16), ecParams); ECPublicKeySpec pubKeySpec = @@ -98,19 +106,17 @@ public class TestECDH2 extends PKCS11Test { return kpg.generateKeyPair(); } public static void main(String[] args) throws Exception { - main(new TestECDH2()); + main(new TestECDH2(), args); } + @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyAgreement", "ECDH") == null) { System.out.println("ECDH not supported, skipping"); return; } - if (isNSS(provider) && getNSSVersion() >= 3.11 && - getNSSVersion() < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not."); + if (isBadNSSVersion(provider)) { return; } diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java index b1bd35f4783..9e0b8401aa9 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,13 +29,22 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @run main/othervm TestECDSA + * @run main/othervm TestECDSA sm policy */ -import java.util.*; - -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.MessageDigest; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.interfaces.ECPublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Random; public class TestECDSA extends PKCS11Test { @@ -79,7 +88,8 @@ public class TestECDSA extends PKCS11Test { private final static byte[] data2Raw = {}; private final static byte[] data2SHA = b("da:39:a3:ee:5e:6b:4b:0d:32:55:bf:ef:95:60:18:90:af:d8:07:09"); - private static void verify(Provider provider, String alg, PublicKey key, byte[] data, byte[] sig, boolean result) throws Exception { + private static void verify(Provider provider, String alg, PublicKey key, + byte[] data, byte[] sig, boolean result) throws Exception { Signature s = Signature.getInstance(alg, provider); s.initVerify(key); boolean r; @@ -105,9 +115,10 @@ public class TestECDSA extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestECDSA()); + main(new TestECDSA(), args); } + @Override public void main(Provider provider) throws Exception { long start = System.currentTimeMillis(); @@ -116,25 +127,11 @@ public class TestECDSA extends PKCS11Test { return; } - if (isNSS(provider) && getNSSVersion() >= 3.11 && - getNSSVersion() < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not."); + if (isBadNSSVersion(provider)) { return; } - /* - * Use Solaris SPARC 11.2 or later to avoid an intermittent failure - * when running SunPKCS11-Solaris (8044554) - */ - if (provider.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && - getDistro().compareTo("11.2") < 0) { - - System.out.println("SunPKCS11-Solaris provider requires " + - "Solaris SPARC 11.2 or later, skipping"); + if (isBadSolarisSparc(provider)) { return; } diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java index b3f234a5b0f..c2cd7188a03 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,18 +30,23 @@ * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util * @compile -XDignore.symbol.file TestECDSA2.java - * @run main TestECDSA2 + * @run main/othervm TestECDSA2 + * @run main/othervm TestECDSA2 sm */ -import java.io.*; -import java.util.*; import java.math.BigInteger; - -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; - -import sun.security.util.ECUtil; +import java.security.AlgorithmParameters; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.spec.ECGenParameterSpec; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.ECPrivateKeySpec; +import java.security.spec.ECPublicKeySpec; public class TestECDSA2 extends PKCS11Test { @@ -78,7 +83,9 @@ public class TestECDSA2 extends PKCS11Test { private KeyPair genECKeyPair(String curvName, String privD, String pubX, String pubY, Provider p) throws Exception { - ECParameterSpec ecParams = ECUtil.getECParameterSpec(p, curvName); + AlgorithmParameters params = AlgorithmParameters.getInstance("EC", p); + params.init(new ECGenParameterSpec(curvName)); + ECParameterSpec ecParams = params.getParameterSpec(ECParameterSpec.class); ECPrivateKeySpec privKeySpec = new ECPrivateKeySpec(new BigInteger(privD, 16), ecParams); ECPublicKeySpec pubKeySpec = @@ -90,9 +97,10 @@ public class TestECDSA2 extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestECDSA2()); + main(new TestECDSA2(), args); } + @Override public void main(Provider provider) throws Exception { boolean testP256 = (provider.getService("Signature", "SHA256withECDSA") != null); @@ -105,10 +113,7 @@ public class TestECDSA2 extends PKCS11Test { return; } - if (isNSS(provider) && getNSSVersion() >= 3.11 && - getNSSVersion() < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not."); + if (isBadNSSVersion(provider)) { return; } diff --git a/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java b/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java index 1dd2c326048..829b44ee7d9 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,29 +27,32 @@ * @summary Verify that we can use ECGenParameterSpec * @author Andreas Sterbenz * @library .. + * @run main/othervm TestECGenSpec + * @run main/othervm TestECGenSpec sm */ -import java.util.*; - -import java.security.*; -import java.security.spec.*; +import java.security.AlgorithmParameters; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; import java.security.interfaces.ECPublicKey; +import java.security.spec.ECGenParameterSpec; +import java.security.spec.ECParameterSpec; public class TestECGenSpec extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestECGenSpec()); + main(new TestECGenSpec(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("Signature", "SHA1withECDSA") == null) { System.out.println("Provider does not support ECDSA, skipping..."); return; } - if (isNSS(p) && getNSSVersion() >= 3.11 && getNSSVersion() < 3.12) { - System.out.println("NSS 3.11 has a DER issue that recent " + - "version do not."); + if (isBadNSSVersion(p)) { return; } diff --git a/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java b/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java index 6df2fbb1320..519c861ce3d 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java +++ b/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,14 +27,23 @@ * @summary Test the P11ECKeyFactory * @author Andreas Sterbenz * @library .. + * @run main/othervm TestKeyFactory + * @run main/othervm TestKeyFactory sm */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.interfaces.*; -import java.security.spec.*; +import java.security.Key; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.spec.ECPrivateKeySpec; +import java.security.spec.ECPublicKeySpec; +import java.security.spec.KeySpec; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; public class TestKeyFactory extends PKCS11Test { @@ -111,9 +120,10 @@ public class TestKeyFactory extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestKeyFactory()); + main(new TestKeyFactory(), args); } + @Override public void main(Provider p) throws Exception { if (p.getService("KeyFactory", "EC") == null) { System.out.println("Provider does not support EC, skipping"); diff --git a/jdk/test/sun/security/pkcs11/ec/policy b/jdk/test/sun/security/pkcs11/ec/policy new file mode 100644 index 00000000000..c850c16bc58 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/ec/policy @@ -0,0 +1,7 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.security.SecurityPermission "insertProvider.*"; + permission java.security.SecurityPermission "removeProvider.*"; + permission java.io.FilePermission "${test.src}/-", "read"; + permission java.io.FilePermission "${closed.base}/-", "read"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.java b/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.java index 743b4562b87..619e8db530d 100644 --- a/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.java +++ b/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,15 +29,21 @@ * @library .. * @modules java.base/com.sun.net.ssl.internal.ssl * @run main/othervm TrustManagerTest + * @run main/othervm TrustManagerTest sm TrustManagerTest.policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.cert.*; - -import javax.net.ssl.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Provider; +import java.security.Security; +import java.security.URIParameter; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; // This test belongs more in JSSE than here, but the JSSE workspace does not // have the NSS test infrastructure. It will live here for the time being. @@ -73,6 +79,12 @@ public class TrustManagerTest extends SecmodTest { X509Certificate ca = loadCertificate("certs/ca.cer"); X509Certificate anchor = loadCertificate("certs/anchor.cer"); + if (args.length > 1 && "sm".equals(args[0])) { + Policy.setPolicy(Policy.getInstance("JavaPolicy", + new URIParameter(new File(BASE, args[1]).toURI()))); + System.setSecurityManager(new SecurityManager()); + } + KeyStore trustStore = KeyStore.getInstance("JKS"); trustStore.load(null, null); trustStore.setCertificateEntry("anchor", anchor); @@ -90,11 +102,10 @@ public class TrustManagerTest extends SecmodTest { } private static X509Certificate loadCertificate(String name) throws Exception { - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - InputStream in = new FileInputStream(BASE + SEP + name); - X509Certificate cert = (X509Certificate)cf.generateCertificate(in); - in.close(); - return cert; + try (InputStream in = new FileInputStream(BASE + SEP + name)) { + return (X509Certificate) CertificateFactory.getInstance("X.509") + .generateCertificate(in); + } } } diff --git a/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.policy b/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.policy new file mode 100644 index 00000000000..16bb57d4e1b --- /dev/null +++ b/jdk/test/sun/security/pkcs11/fips/TrustManagerTest.policy @@ -0,0 +1,3 @@ +grant { + +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/policy b/jdk/test/sun/security/pkcs11/policy new file mode 100644 index 00000000000..54281a78179 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/policy @@ -0,0 +1,3 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java index 7f08481d6f7..e0bad7cd2d4 100644 --- a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java +++ b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,18 +28,28 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm KeyWrap + * @run main/othervm KeyWrap sm */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.GeneralSecurityException; +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.util.Random; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; public class KeyWrap extends PKCS11Test { + @Override public void main(Provider p) throws Exception { try { Cipher.getInstance("RSA/ECB/PKCS1Padding", p); @@ -62,7 +72,7 @@ public class KeyWrap extends PKCS11Test { PublicKey pub = (PublicKey)kf.translateKey(kp.getPublic()); PrivateKey priv = (PrivateKey)kf.translateKey(kp.getPrivate()); kp = new KeyPair(pub, priv); - } catch (Exception ee) { + } catch (NoSuchAlgorithmException | InvalidKeyException ee) { ee.printStackTrace(); System.out.println("Provider does not support RSA, skipping"); return; @@ -93,7 +103,7 @@ public class KeyWrap extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new KeyWrap()); + main(new KeyWrap(), args); } } diff --git a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java index cd845c68201..24c16243585 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,24 +28,28 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @run main/othervm TestCACerts + * @run main/othervm TestCACerts sm TestCACerts.policy */ // this test serves as our known answer test -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.cert.*; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.KeyStore; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Security; +import java.security.cert.X509Certificate; +import java.util.Enumeration; public class TestCACerts extends PKCS11Test { - private final static char SEP = File.separatorChar; - public static void main(String[] args) throws Exception { - main(new TestCACerts()); + main(new TestCACerts(), args); } + @Override public void main(Provider p) throws Exception { /* @@ -53,9 +57,9 @@ public class TestCACerts extends PKCS11Test { * when running SunPKCS11-Solaris (8044554) */ if (p.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + @@ -67,12 +71,13 @@ public class TestCACerts extends PKCS11Test { Providers.setAt(p, 1); try { String PROVIDER = p.getName(); - String javaHome = System.getProperty("java.home"); + String javaHome = props.getProperty("java.home"); String caCerts = javaHome + SEP + "lib" + SEP + "security" + SEP + "cacerts"; - InputStream in = new FileInputStream(caCerts); - KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); - ks.load(in, null); - in.close(); + KeyStore ks; + try (InputStream in = new FileInputStream(caCerts)) { + ks = KeyStore.getInstance(KeyStore.getDefaultType()); + ks.load(in, null); + } for (Enumeration e = ks.aliases(); e.hasMoreElements(); ) { String alias = (String)e.nextElement(); if (ks.isCertificateEntry(alias)) { diff --git a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.policy b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.policy new file mode 100644 index 00000000000..37f028361bc --- /dev/null +++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.policy @@ -0,0 +1,7 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.security.SecurityPermission "insertProvider.*"; + permission java.security.SecurityPermission "removeProvider.*"; + permission java.util.PropertyPermission "java.home", "read"; + permission java.io.FilePermission "${java.home}/lib/security/cacerts", "read"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java index 049be1046f9..802774285c3 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,26 +27,26 @@ * @summary Test KeyFactory of the new RSA provider * @author Andreas Sterbenz * @library .. + * @run main/othervm TestKeyFactory + * @run main/othervm TestKeyFactory sm rsakeys.ks.policy */ import java.io.*; import java.util.*; import java.security.*; -import java.security.interfaces.*; import java.security.spec.*; public class TestKeyFactory extends PKCS11Test { - private final static String BASE = System.getProperty("test.src", "."); - private static final char[] password = "test12".toCharArray(); static KeyStore getKeyStore() throws Exception { - InputStream in = new FileInputStream(new File(BASE, "rsakeys.ks")); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(in, password); - in.close(); + KeyStore ks; + try (InputStream in = new FileInputStream(new File(BASE, "rsakeys.ks"))) { + ks = KeyStore.getInstance("JKS"); + ks.load(in, password); + } return ks; } @@ -128,9 +128,10 @@ public class TestKeyFactory extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestKeyFactory()); + main(new TestKeyFactory(), args); } + @Override public void main(Provider p) throws Exception { long start = System.currentTimeMillis(); KeyStore ks = getKeyStore(); diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java index 655edd3b5a2..687a7a87bc1 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,16 +30,20 @@ * @library /lib/testlibrary * @build jdk.testlibrary.* * @run main/othervm TestKeyPairGenerator + * @run main/othervm TestKeyPairGenerator sm TestKeyPairGenerator.policy * @key intermittent randomness */ -import java.io.*; -import java.util.*; import java.math.BigInteger; - -import java.security.*; -import java.security.interfaces.*; -import java.security.spec.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.interfaces.RSAPrivateCrtKey; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.RSAKeyGenParameterSpec; import jdk.testlibrary.RandomFactory; public class TestKeyPairGenerator extends PKCS11Test { @@ -48,7 +52,8 @@ public class TestKeyPairGenerator extends PKCS11Test { private static byte[] data; - private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { + private static void testSignature(String algorithm, PrivateKey privateKey, + PublicKey publicKey) throws Exception { System.out.println("Testing " + algorithm + "..."); Signature s = Signature.getInstance(algorithm, provider); s.initSign(privateKey); @@ -98,9 +103,10 @@ public class TestKeyPairGenerator extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestKeyPairGenerator()); + main(new TestKeyPairGenerator(), args); } + @Override public void main(Provider p) throws Exception { long start = System.currentTimeMillis(); provider = p; diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.policy b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.policy new file mode 100644 index 00000000000..3f076e14679 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.policy @@ -0,0 +1,4 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.util.PropertyPermission "seed", "read"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java index a6070ea675d..ae4718f4f56 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,18 +28,25 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main/othervm TestSignatures + * @run main/othervm TestSignatures sm rsakeys.ks.policy */ -import java.io.*; -import java.util.*; - -import java.security.*; -import java.security.interfaces.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.KeyFactory; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.security.interfaces.RSAPublicKey; +import java.util.Enumeration; +import java.util.Random; public class TestSignatures extends PKCS11Test { - private final static String BASE = System.getProperty("test.src", "."); - private static final char[] password = "test12".toCharArray(); private static Provider provider; @@ -47,14 +54,16 @@ public class TestSignatures extends PKCS11Test { private static byte[] data; static KeyStore getKeyStore() throws Exception { - InputStream in = new FileInputStream(new File(BASE, "rsakeys.ks")); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(in, password); - in.close(); + KeyStore ks; + try (InputStream in = new FileInputStream(new File(BASE, "rsakeys.ks"))) { + ks = KeyStore.getInstance("JKS"); + ks.load(in, password); + } return ks; } - private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { + private static void testSignature(String algorithm, PrivateKey privateKey, + PublicKey publicKey) throws Exception { System.out.println("Testing " + algorithm + "..."); Signature s = Signature.getInstance(algorithm, provider); s.initSign(privateKey); @@ -78,7 +87,8 @@ public class TestSignatures extends PKCS11Test { } } - private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception { + private static void test(PrivateKey privateKey, PublicKey publicKey) + throws Exception { testSignature("MD2withRSA", privateKey, publicKey); testSignature("MD5withRSA", privateKey, publicKey); testSignature("SHA1withRSA", privateKey, publicKey); @@ -93,9 +103,10 @@ public class TestSignatures extends PKCS11Test { } public static void main(String[] args) throws Exception { - main(new TestSignatures()); + main(new TestSignatures(), args); } + @Override public void main(Provider p) throws Exception { /* @@ -103,9 +114,9 @@ public class TestSignatures extends PKCS11Test { * when running SunPKCS11-Solaris (8044554) */ if (p.getName().equals("SunPKCS11-Solaris") && - System.getProperty("os.name").equals("SunOS") && - System.getProperty("os.arch").equals("sparcv9") && - System.getProperty("os.version").compareTo("5.11") <= 0 && + props.getProperty("os.name").equals("SunOS") && + props.getProperty("os.arch").equals("sparcv9") && + props.getProperty("os.version").compareTo("5.11") <= 0 && getDistro().compareTo("11.2") < 0) { System.out.println("SunPKCS11-Solaris provider requires " + diff --git a/jdk/test/sun/security/pkcs11/rsa/rsakeys.ks.policy b/jdk/test/sun/security/pkcs11/rsa/rsakeys.ks.policy new file mode 100644 index 00000000000..4a0b0d2c46d --- /dev/null +++ b/jdk/test/sun/security/pkcs11/rsa/rsakeys.ks.policy @@ -0,0 +1,4 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.io.FilePermission "${test.src}/rsakeys.ks", "read"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java b/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java index 4ec23743b2a..f118d76d5c5 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java +++ b/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,7 +47,8 @@ public class CipherTest { // use any available port for the server socket static volatile int serverPort = 0; - final int THREADS; + static final int THREADS = Integer.getInteger("numThreads", 4); + static final String TEST_SRC = System.getProperty("test.src", "."); // assume that if we do not read anything for 20 seconds, something // has gone wrong @@ -68,6 +69,7 @@ public class CipherTest { this.cipherTest = cipherTest; } + @Override public abstract void run(); void handleRequest(InputStream in, OutputStream out) throws IOException { @@ -117,6 +119,7 @@ public class CipherTest { return TLSCipherStatus.isEnabled(cipherSuite, protocol); } + @Override public String toString() { String s = cipherSuite + " in " + protocol + " mode"; if (clientAuth != null) { @@ -260,7 +263,6 @@ public class CipherTest { private boolean failed; private CipherTest(PeerFactory peerFactory) throws IOException { - THREADS = Integer.parseInt(System.getProperty("numThreads", "4")); factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); SSLSocket socket = (SSLSocket)factory.createSocket(); String[] cipherSuites = socket.getSupportedCipherSuites(); @@ -350,6 +352,7 @@ public class CipherTest { this.cipherTest = cipherTest; } + @Override public final void run() { while (true) { TestParameters params = cipherTest.getTest(); @@ -405,10 +408,11 @@ public class CipherTest { private static KeyStore readKeyStore(String name) throws Exception { File file = new File(PATH, name); - InputStream in = new FileInputStream(file); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(in, passwd); - in.close(); + KeyStore ks; + try (InputStream in = new FileInputStream(file)) { + ks = KeyStore.getInstance("JKS"); + ks.load(in, passwd); + } return ks; } @@ -421,7 +425,7 @@ public class CipherTest { } else { relPath = pathToStores; } - PATH = new File(System.getProperty("test.src", "."), relPath); + PATH = new File(TEST_SRC, relPath); CipherTest.peerFactory = peerFactory; System.out.print( "Initializing test '" + peerFactory.getName() + "'..."); @@ -494,16 +498,19 @@ class AlwaysTrustManager implements X509TrustManager { } + @Override public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { // empty } + @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { // empty } + @Override public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } @@ -522,6 +529,7 @@ class MyX509KeyManager extends X509ExtendedKeyManager { this.authType = "ECDSA".equals(authType) ? "EC" : authType; } + @Override public String[] getClientAliases(String keyType, Principal[] issuers) { if (authType == null) { return null; @@ -529,6 +537,7 @@ class MyX509KeyManager extends X509ExtendedKeyManager { return keyManager.getClientAliases(authType, issuers); } + @Override public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { if (authType == null) { @@ -538,6 +547,7 @@ class MyX509KeyManager extends X509ExtendedKeyManager { issuers, socket); } + @Override public String chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine) { if (authType == null) { @@ -547,24 +557,29 @@ class MyX509KeyManager extends X509ExtendedKeyManager { issuers, engine); } + @Override public String[] getServerAliases(String keyType, Principal[] issuers) { throw new UnsupportedOperationException("Servers not supported"); } + @Override public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { throw new UnsupportedOperationException("Servers not supported"); } + @Override public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine) { throw new UnsupportedOperationException("Servers not supported"); } + @Override public X509Certificate[] getCertificateChain(String alias) { return keyManager.getCertificateChain(alias); } + @Override public PrivateKey getPrivateKey(String alias) { return keyManager.getPrivateKey(alias); } @@ -577,6 +592,7 @@ class DaemonThreadFactory implements ThreadFactory { private final static ThreadFactory DEFAULT = Executors.defaultThreadFactory(); + @Override public Thread newThread(Runnable r) { Thread t = DEFAULT.newThread(r); t.setDaemon(true); diff --git a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java index dea0495cd13..4a31b67c296 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java +++ b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,25 +34,28 @@ * @library .. * @library ../../../../java/security/testlibrary * @run main/othervm ClientJSSEServerJSSE + * @run main/othervm ClientJSSEServerJSSE sm policy */ -import java.security.*; +import java.security.Provider; +import java.security.Security; public class ClientJSSEServerJSSE extends PKCS11Test { private static String[] cmdArgs; public static void main(String[] args) throws Exception { - cmdArgs = args; - main(new ClientJSSEServerJSSE()); - } - - public void main(Provider p) throws Exception { // reset security properties to make sure that the algorithms // and keys used in this test are not disabled. Security.setProperty("jdk.tls.disabledAlgorithms", ""); Security.setProperty("jdk.certpath.disabledAlgorithms", ""); + cmdArgs = args; + main(new ClientJSSEServerJSSE(), args); + } + + @Override + public void main(Provider p) throws Exception { if (p.getService("KeyFactory", "EC") == null) { System.out.println("Provider does not support EC, skipping"); return; @@ -64,14 +67,17 @@ public class ClientJSSEServerJSSE extends PKCS11Test { private static class JSSEFactory extends CipherTest.PeerFactory { + @Override String getName() { return "Client JSSE - Server JSSE"; } + @Override CipherTest.Client newClient(CipherTest cipherTest) throws Exception { return new JSSEClient(cipherTest); } + @Override CipherTest.Server newServer(CipherTest cipherTest) throws Exception { return new JSSEServer(cipherTest); } diff --git a/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java b/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java index af8d4b5a088..90c55e68e4a 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java +++ b/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,16 +21,17 @@ * questions. */ -import java.io.*; -import java.net.*; -import java.util.*; -import java.util.concurrent.*; - -import java.security.*; -import java.security.cert.*; -import java.security.cert.Certificate; - -import javax.net.ssl.*; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import javax.net.ssl.KeyManager; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.TrustManager; class JSSEServer extends CipherTest.Server { @@ -48,15 +49,17 @@ class JSSEServer extends CipherTest.Server { serverSocket.setWantClientAuth(true); } + @Override public void run() { System.out.println("JSSE Server listening on port " + cipherTest.serverPort); Executor exec = Executors.newFixedThreadPool - (cipherTest.THREADS, DaemonThreadFactory.INSTANCE); + (CipherTest.THREADS, DaemonThreadFactory.INSTANCE); try { while (true) { final SSLSocket socket = (SSLSocket)serverSocket.accept(); socket.setSoTimeout(cipherTest.TIMEOUT); Runnable r = new Runnable() { + @Override public void run() { try { InputStream in = socket.getInputStream(); diff --git a/jdk/test/sun/security/pkcs11/sslecc/policy b/jdk/test/sun/security/pkcs11/sslecc/policy new file mode 100644 index 00000000000..f95da0407a7 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/sslecc/policy @@ -0,0 +1,9 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.security.SecurityPermission "insertProvider.*"; + permission java.security.SecurityPermission "removeProvider.*"; + permission java.util.PropertyPermission "test.src", "read"; + permission java.util.PropertyPermission "numThreads", "read"; + permission java.io.FilePermission "${test.src}/*", "read"; + permission java.net.SocketPermission "127.0.0.1:*", "listen,resolve,accept,connect"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java b/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java index 99636d0e2aa..1511dff4d4b 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java +++ b/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,136 +28,138 @@ * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * @run main/othervm TestKeyMaterial + * @run main/othervm TestKeyMaterial sm policy */ -import java.io.*; -import java.util.*; - -import java.security.Security; +import java.io.BufferedReader; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.Provider; - +import java.util.Arrays; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; - -import javax.crypto.spec.*; - -import sun.security.internal.spec.*; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import sun.security.internal.spec.TlsKeyMaterialParameterSpec; +import sun.security.internal.spec.TlsKeyMaterialSpec; public class TestKeyMaterial extends PKCS11Test { - private static int PREFIX_LENGTH = "km-master: ".length(); + private static final int PREFIX_LENGTH = "km-master: ".length(); public static void main(String[] args) throws Exception { - main(new TestKeyMaterial()); + main(new TestKeyMaterial(), args); } + @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyGenerator", "SunTlsKeyMaterial") == null) { System.out.println("Provider does not support algorithm, skipping"); return; } - InputStream in = new FileInputStream(new File(BASE, "keymatdata.txt")); - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + try (BufferedReader reader = Files.newBufferedReader( + Paths.get(BASE, "keymatdata.txt"))) { - int n = 0; - int lineNumber = 0; + int n = 0; + int lineNumber = 0; - byte[] master = null; - int major = 0; - int minor = 0; - byte[] clientRandom = null; - byte[] serverRandom = null; - String cipherAlgorithm = null; - int keyLength = 0; - int expandedKeyLength = 0; - int ivLength = 0; - int macLength = 0; - byte[] clientCipherBytes = null; - byte[] serverCipherBytes = null; - byte[] clientIv = null; - byte[] serverIv = null; - byte[] clientMacBytes = null; - byte[] serverMacBytes = null; + byte[] master = null; + int major = 0; + int minor = 0; + byte[] clientRandom = null; + byte[] serverRandom = null; + String cipherAlgorithm = null; + int keyLength = 0; + int expandedKeyLength = 0; + int ivLength = 0; + int macLength = 0; + byte[] clientCipherBytes = null; + byte[] serverCipherBytes = null; + byte[] clientIv = null; + byte[] serverIv = null; + byte[] clientMacBytes = null; + byte[] serverMacBytes = null; - while (true) { - String line = reader.readLine(); - lineNumber++; - if (line == null) { - break; + while (true) { + String line = reader.readLine(); + lineNumber++; + if (line == null) { + break; + } + if (line.startsWith("km-") == false) { + continue; + } + String data = line.substring(PREFIX_LENGTH); + if (line.startsWith("km-master:")) { + master = parse(data); + } else if (line.startsWith("km-major:")) { + major = Integer.parseInt(data); + } else if (line.startsWith("km-minor:")) { + minor = Integer.parseInt(data); + } else if (line.startsWith("km-crandom:")) { + clientRandom = parse(data); + } else if (line.startsWith("km-srandom:")) { + serverRandom = parse(data); + } else if (line.startsWith("km-cipalg:")) { + cipherAlgorithm = data; + } else if (line.startsWith("km-keylen:")) { + keyLength = Integer.parseInt(data); + } else if (line.startsWith("km-explen:")) { + expandedKeyLength = Integer.parseInt(data); + } else if (line.startsWith("km-ivlen:")) { + ivLength = Integer.parseInt(data); + } else if (line.startsWith("km-maclen:")) { + macLength = Integer.parseInt(data); + } else if (line.startsWith("km-ccipkey:")) { + clientCipherBytes = parse(data); + } else if (line.startsWith("km-scipkey:")) { + serverCipherBytes = parse(data); + } else if (line.startsWith("km-civ:")) { + clientIv = parse(data); + } else if (line.startsWith("km-siv:")) { + serverIv = parse(data); + } else if (line.startsWith("km-cmackey:")) { + clientMacBytes = parse(data); + } else if (line.startsWith("km-smackey:")) { + serverMacBytes = parse(data); + + System.out.print("."); + n++; + + KeyGenerator kg = + KeyGenerator.getInstance("SunTlsKeyMaterial", provider); + SecretKey masterKey = + new SecretKeySpec(master, "TlsMasterSecret"); + TlsKeyMaterialParameterSpec spec = + new TlsKeyMaterialParameterSpec(masterKey, major, minor, + clientRandom, serverRandom, cipherAlgorithm, + keyLength, expandedKeyLength, ivLength, macLength, + null, -1, -1); + + kg.init(spec); + TlsKeyMaterialSpec result = + (TlsKeyMaterialSpec)kg.generateKey(); + match(lineNumber, clientCipherBytes, + result.getClientCipherKey(), cipherAlgorithm); + match(lineNumber, serverCipherBytes, + result.getServerCipherKey(), cipherAlgorithm); + match(lineNumber, clientIv, result.getClientIv(), ""); + match(lineNumber, serverIv, result.getServerIv(), ""); + match(lineNumber, clientMacBytes, result.getClientMacKey(), ""); + match(lineNumber, serverMacBytes, result.getServerMacKey(), ""); + + } else { + throw new Exception("Unknown line: " + line); + } } - if (line.startsWith("km-") == false) { - continue; - } - String data = line.substring(PREFIX_LENGTH); - if (line.startsWith("km-master:")) { - master = parse(data); - } else if (line.startsWith("km-major:")) { - major = Integer.parseInt(data); - } else if (line.startsWith("km-minor:")) { - minor = Integer.parseInt(data); - } else if (line.startsWith("km-crandom:")) { - clientRandom = parse(data); - } else if (line.startsWith("km-srandom:")) { - serverRandom = parse(data); - } else if (line.startsWith("km-cipalg:")) { - cipherAlgorithm = data; - } else if (line.startsWith("km-keylen:")) { - keyLength = Integer.parseInt(data); - } else if (line.startsWith("km-explen:")) { - expandedKeyLength = Integer.parseInt(data); - } else if (line.startsWith("km-ivlen:")) { - ivLength = Integer.parseInt(data); - } else if (line.startsWith("km-maclen:")) { - macLength = Integer.parseInt(data); - } else if (line.startsWith("km-ccipkey:")) { - clientCipherBytes = parse(data); - } else if (line.startsWith("km-scipkey:")) { - serverCipherBytes = parse(data); - } else if (line.startsWith("km-civ:")) { - clientIv = parse(data); - } else if (line.startsWith("km-siv:")) { - serverIv = parse(data); - } else if (line.startsWith("km-cmackey:")) { - clientMacBytes = parse(data); - } else if (line.startsWith("km-smackey:")) { - serverMacBytes = parse(data); - - System.out.print("."); - n++; - - KeyGenerator kg = - KeyGenerator.getInstance("SunTlsKeyMaterial", provider); - SecretKey masterKey = - new SecretKeySpec(master, "TlsMasterSecret"); - TlsKeyMaterialParameterSpec spec = - new TlsKeyMaterialParameterSpec(masterKey, major, minor, - clientRandom, serverRandom, cipherAlgorithm, - keyLength, expandedKeyLength, ivLength, macLength, - null, -1, -1); - - kg.init(spec); - TlsKeyMaterialSpec result = - (TlsKeyMaterialSpec)kg.generateKey(); - match(lineNumber, clientCipherBytes, - result.getClientCipherKey(), cipherAlgorithm); - match(lineNumber, serverCipherBytes, - result.getServerCipherKey(), cipherAlgorithm); - match(lineNumber, clientIv, result.getClientIv(), ""); - match(lineNumber, serverIv, result.getServerIv(), ""); - match(lineNumber, clientMacBytes, result.getClientMacKey(), ""); - match(lineNumber, serverMacBytes, result.getServerMacKey(), ""); - - } else { - throw new Exception("Unknown line: " + line); + if (n == 0) { + throw new Exception("no tests"); } + System.out.println(); + System.out.println("OK: " + n + " tests"); } - if (n == 0) { - throw new Exception("no tests"); - } - in.close(); - System.out.println(); - System.out.println("OK: " + n + " tests"); } private static void stripParity(byte[] b) { diff --git a/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java b/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java index ffaac041d33..a8d8f72a299 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java +++ b/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,15 +27,18 @@ * @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement * @library .. * @author Pasi Eronen + * @run main/othervm TestLeadingZeroesP11 + * @run main/othervm TestLeadingZeroesP11 sm */ -import java.io.*; -import java.security.*; -import java.security.spec.*; -import java.security.interfaces.*; -import javax.crypto.*; -import javax.crypto.spec.*; -import javax.crypto.interfaces.*; + +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import javax.crypto.KeyAgreement; /** * Test that leading zeroes are stripped in TlsPremasterSecret case, @@ -48,9 +51,10 @@ import javax.crypto.interfaces.*; public class TestLeadingZeroesP11 extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestLeadingZeroesP11()); + main(new TestLeadingZeroesP11(), args); } + @Override public void main(Provider p) throws Exception { // decode pre-generated keypairs diff --git a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java index fb00bd7fbf0..855b8c21f13 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java +++ b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,111 +29,112 @@ * @library .. * @modules java.base/sun.security.internal.interfaces * java.base/sun.security.internal.spec + * @run main/othervm TestMasterSecret + * @run main/othervm TestMasterSecret sm TestMasterSecret.policy */ -import java.io.*; -import java.util.*; - -import java.security.Security; +import java.io.BufferedReader; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.Provider; - +import java.util.Arrays; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; - -import javax.crypto.spec.*; - -import sun.security.internal.spec.*; +import javax.crypto.spec.SecretKeySpec; import sun.security.internal.interfaces.TlsMasterSecret; +import sun.security.internal.spec.TlsMasterSecretParameterSpec; public class TestMasterSecret extends PKCS11Test { - private static int PREFIX_LENGTH = "m-premaster: ".length(); + private static final int PREFIX_LENGTH = "m-premaster: ".length(); public static void main(String[] args) throws Exception { - main(new TestMasterSecret()); + main(new TestMasterSecret(), args); } + @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyGenerator", "SunTlsMasterSecret") == null) { System.out.println("Not supported by provider, skipping"); return; } - InputStream in = new FileInputStream(new File(BASE, "masterdata.txt")); - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); - int n = 0; - int lineNumber = 0; + try (BufferedReader reader = Files.newBufferedReader( + Paths.get(BASE, "masterdata.txt"))) { - String algorithm = null; - byte[] premaster = null; - byte[] clientRandom = null; - byte[] serverRandom = null; - int protoMajor = 0; - int protoMinor = 0; - int preMajor = 0; - int preMinor = 0; - byte[] master = null; + int n = 0; + int lineNumber = 0; - while (true) { - String line = reader.readLine(); - lineNumber++; - if (line == null) { - break; - } - if (line.startsWith("m-") == false) { - continue; - } - String data = line.substring(PREFIX_LENGTH); - if (line.startsWith("m-algorithm:")) { - algorithm = data; - } else if (line.startsWith("m-premaster:")) { - premaster = parse(data); - } else if (line.startsWith("m-crandom:")) { - clientRandom = parse(data); - } else if (line.startsWith("m-srandom:")) { - serverRandom = parse(data); - } else if (line.startsWith("m-protomajor:")) { - protoMajor = Integer.parseInt(data); - } else if (line.startsWith("m-protominor:")) { - protoMinor = Integer.parseInt(data); - } else if (line.startsWith("m-premajor:")) { - preMajor = Integer.parseInt(data); - } else if (line.startsWith("m-preminor:")) { - preMinor = Integer.parseInt(data); - } else if (line.startsWith("m-master:")) { - master = parse(data); + String algorithm = null; + byte[] premaster = null; + byte[] clientRandom = null; + byte[] serverRandom = null; + int protoMajor = 0; + int protoMinor = 0; + int preMajor = 0; + int preMinor = 0; + byte[] master = null; - System.out.print("."); - n++; - - KeyGenerator kg = - KeyGenerator.getInstance("SunTlsMasterSecret", provider); - SecretKey premasterKey = - new SecretKeySpec(premaster, algorithm); - TlsMasterSecretParameterSpec spec = - new TlsMasterSecretParameterSpec(premasterKey, - protoMajor, protoMinor, clientRandom, serverRandom, - null, -1, -1); - kg.init(spec); - TlsMasterSecret key = (TlsMasterSecret)kg.generateKey(); - byte[] enc = key.getEncoded(); - if (Arrays.equals(master, enc) == false) { - throw new Exception("mismatch line: " + lineNumber); + while (true) { + String line = reader.readLine(); + lineNumber++; + if (line == null) { + break; } - if ((preMajor != key.getMajorVersion()) || - (preMinor != key.getMinorVersion())) { - throw new Exception("version mismatch line: " + lineNumber); + if (line.startsWith("m-") == false) { + continue; + } + String data = line.substring(PREFIX_LENGTH); + if (line.startsWith("m-algorithm:")) { + algorithm = data; + } else if (line.startsWith("m-premaster:")) { + premaster = parse(data); + } else if (line.startsWith("m-crandom:")) { + clientRandom = parse(data); + } else if (line.startsWith("m-srandom:")) { + serverRandom = parse(data); + } else if (line.startsWith("m-protomajor:")) { + protoMajor = Integer.parseInt(data); + } else if (line.startsWith("m-protominor:")) { + protoMinor = Integer.parseInt(data); + } else if (line.startsWith("m-premajor:")) { + preMajor = Integer.parseInt(data); + } else if (line.startsWith("m-preminor:")) { + preMinor = Integer.parseInt(data); + } else if (line.startsWith("m-master:")) { + master = parse(data); + + System.out.print("."); + n++; + + KeyGenerator kg = + KeyGenerator.getInstance("SunTlsMasterSecret", provider); + SecretKey premasterKey = + new SecretKeySpec(premaster, algorithm); + TlsMasterSecretParameterSpec spec = + new TlsMasterSecretParameterSpec(premasterKey, + protoMajor, protoMinor, clientRandom, serverRandom, + null, -1, -1); + kg.init(spec); + TlsMasterSecret key = (TlsMasterSecret)kg.generateKey(); + byte[] enc = key.getEncoded(); + if (Arrays.equals(master, enc) == false) { + throw new Exception("mismatch line: " + lineNumber); + } + if ((preMajor != key.getMajorVersion()) || + (preMinor != key.getMinorVersion())) { + throw new Exception("version mismatch line: " + lineNumber); + } + } else { + throw new Exception("Unknown line: " + line); } - } else { - throw new Exception("Unknown line: " + line); } + if (n == 0) { + throw new Exception("no tests"); + } + System.out.println(); + System.out.println("OK: " + n + " tests"); } - if (n == 0) { - throw new Exception("no tests"); - } - in.close(); - System.out.println(); - System.out.println("OK: " + n + " tests"); } } diff --git a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.policy b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.policy new file mode 100644 index 00000000000..4b98541ad7a --- /dev/null +++ b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.policy @@ -0,0 +1,8 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.io.FilePermission "${test.src}/*", "read"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.internal.spec"; + permission java.lang.RuntimePermission + "accessClassInPackage.sun.security.internal.interfaces"; +}; \ No newline at end of file diff --git a/jdk/test/sun/security/pkcs11/tls/TestPRF.java b/jdk/test/sun/security/pkcs11/tls/TestPRF.java index eefffe70820..6e05ea64f90 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestPRF.java +++ b/jdk/test/sun/security/pkcs11/tls/TestPRF.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,116 +28,116 @@ * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * @run main/othervm TestPRF + * @run main/othervm TestPRF sm policy */ -import java.io.*; -import java.util.*; - -import java.security.Security; +import java.io.BufferedReader; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.Provider; - +import java.util.Arrays; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; - -import javax.crypto.spec.*; - -import sun.security.internal.spec.*; +import javax.crypto.spec.SecretKeySpec; +import sun.security.internal.spec.TlsPrfParameterSpec; public class TestPRF extends PKCS11Test { - private static int PREFIX_LENGTH = "prf-output: ".length(); + private static final int PREFIX_LENGTH = "prf-output: ".length(); public static void main(String[] args) throws Exception { - main(new TestPRF()); + main(new TestPRF(), args); } + @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyGenerator", "SunTlsPrf") == null) { System.out.println("Provider does not support algorithm, skipping"); return; } - InputStream in = new FileInputStream(new File(BASE, "prfdata.txt")); - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + try (BufferedReader reader = Files.newBufferedReader( + Paths.get(BASE, "prfdata.txt"))) { - int n = 0; - int lineNumber = 0; + int n = 0; + int lineNumber = 0; - byte[] secret = null; - String label = null; - byte[] seed = null; - int length = 0; - byte[] output = null; + byte[] secret = null; + String label = null; + byte[] seed = null; + int length = 0; + byte[] output = null; - while (true) { - String line = reader.readLine(); - lineNumber++; - if (line == null) { - break; - } - if (line.startsWith("prf-") == false) { - continue; - } - - String data = line.substring(PREFIX_LENGTH); - if (line.startsWith("prf-secret:")) { - secret = parse(data); - } else if (line.startsWith("prf-label:")) { - label = data; - } else if (line.startsWith("prf-seed:")) { - seed = parse(data); - } else if (line.startsWith("prf-length:")) { - length = Integer.parseInt(data); - } else if (line.startsWith("prf-output:")) { - output = parse(data); - - System.out.print("."); - n++; - - KeyGenerator kg = - KeyGenerator.getInstance("SunTlsPrf", provider); - SecretKey inKey; - if (secret == null) { - inKey = null; - } else { - inKey = new SecretKeySpec(secret, "Generic"); + while (true) { + String line = reader.readLine(); + lineNumber++; + if (line == null) { + break; } - TlsPrfParameterSpec spec = - new TlsPrfParameterSpec(inKey, label, seed, length, - null, -1, -1); - SecretKey key; - try { - kg.init(spec); - key = kg.generateKey(); - } catch (Exception e) { + if (line.startsWith("prf-") == false) { + continue; + } + + String data = line.substring(PREFIX_LENGTH); + if (line.startsWith("prf-secret:")) { + secret = parse(data); + } else if (line.startsWith("prf-label:")) { + label = data; + } else if (line.startsWith("prf-seed:")) { + seed = parse(data); + } else if (line.startsWith("prf-length:")) { + length = Integer.parseInt(data); + } else if (line.startsWith("prf-output:")) { + output = parse(data); + + System.out.print("."); + n++; + + KeyGenerator kg = + KeyGenerator.getInstance("SunTlsPrf", provider); + SecretKey inKey; if (secret == null) { - // This fails on Solaris, but since we never call this - // API for this case in JSSE, ignore the failure. - // (SunJSSE uses the CKM_TLS_KEY_AND_MAC_DERIVE - // mechanism) - System.out.print("X"); - continue; + inKey = null; + } else { + inKey = new SecretKeySpec(secret, "Generic"); } - System.out.println(); - throw new Exception("Error on line: " + lineNumber, e); + TlsPrfParameterSpec spec = + new TlsPrfParameterSpec(inKey, label, seed, length, + null, -1, -1); + SecretKey key; + try { + kg.init(spec); + key = kg.generateKey(); + } catch (Exception e) { + if (secret == null) { + // This fails on Solaris, but since we never call this + // API for this case in JSSE, ignore the failure. + // (SunJSSE uses the CKM_TLS_KEY_AND_MAC_DERIVE + // mechanism) + System.out.print("X"); + continue; + } + System.out.println(); + throw new Exception("Error on line: " + lineNumber, e); + } + byte[] enc = key.getEncoded(); + if (Arrays.equals(output, enc) == false) { + System.out.println(); + System.out.println("expected: " + toString(output)); + System.out.println("actual: " + toString(enc)); + throw new Exception("mismatch line: " + lineNumber); + } + } else { + throw new Exception("Unknown line: " + line); } - byte[] enc = key.getEncoded(); - if (Arrays.equals(output, enc) == false) { - System.out.println(); - System.out.println("expected: " + toString(output)); - System.out.println("actual: " + toString(enc)); - throw new Exception("mismatch line: " + lineNumber); - } - } else { - throw new Exception("Unknown line: " + line); } + if (n == 0) { + throw new Exception("no tests"); + } + System.out.println(); + System.out.println("OK: " + n + " tests"); } - if (n == 0) { - throw new Exception("no tests"); - } - in.close(); - System.out.println(); - System.out.println("OK: " + n + " tests"); } } diff --git a/jdk/test/sun/security/pkcs11/tls/TestPremaster.java b/jdk/test/sun/security/pkcs11/tls/TestPremaster.java index 15b13ac8507..bbbbf2c376d 100644 --- a/jdk/test/sun/security/pkcs11/tls/TestPremaster.java +++ b/jdk/test/sun/security/pkcs11/tls/TestPremaster.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,23 +28,22 @@ * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * @run main/othervm TestPremaster + * @run main/othervm TestPremaster sm policy */ -import java.security.Security; import java.security.Provider; - import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; -import java.util.Formatter; - import sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec; public class TestPremaster extends PKCS11Test { public static void main(String[] args) throws Exception { - main(new TestPremaster()); + main(new TestPremaster(), args); } + @Override public void main(Provider provider) throws Exception { if (provider.getService( "KeyGenerator", "SunTlsRsaPremasterSecret") == null) { diff --git a/jdk/test/sun/security/pkcs11/tls/policy b/jdk/test/sun/security/pkcs11/tls/policy new file mode 100644 index 00000000000..6d161b9b2e5 --- /dev/null +++ b/jdk/test/sun/security/pkcs11/tls/policy @@ -0,0 +1,5 @@ +grant { + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.io.FilePermission "${test.src}/*", "read"; + permission java.lang.RuntimePermission "accessClassInPackage.sun.security.internal.spec"; +}; \ No newline at end of file From 7b678f75715031e147e464f20d49e20b22610826 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Tue, 26 Jan 2016 15:30:42 -0800 Subject: [PATCH 04/17] 8148121: Typo in API , FileOwnerAttributeView.getOwner() and FileOwnerAttributeView.setOwner() "It it" -> "It is" Reviewed-by: sherman --- .../java/nio/file/attribute/FileOwnerAttributeView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java index 9acde225339..82d0d1bce6f 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ public interface FileOwnerAttributeView /** * Read the file owner. * - *

It it implementation specific if the file owner can be a {@link + *

It is implementation specific if the file owner can be a {@link * GroupPrincipal group}. * * @return the file owner @@ -78,7 +78,7 @@ public interface FileOwnerAttributeView /** * Updates the file owner. * - *

It it implementation specific if the file owner can be a {@link + *

It is implementation specific if the file owner can be a {@link * GroupPrincipal group}. To ensure consistent and correct behavior * across platforms it is recommended that this method should only be used * to set the file owner to a user principal that is not a group. From e9df200123b8d8482421fc5165a7f039f3b5220d Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Wed, 27 Jan 2016 13:51:35 +0100 Subject: [PATCH 05/17] 8147962: URL should handle lower-casing of protocol locale-independently Reviewed-by: chegar, alanb, naoto --- .../java.base/share/classes/java/net/URL.java | 6 +-- .../java/net/URL/LocaleDependentURLTest.java | 41 +++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 jdk/test/java/net/URL/LocaleDependentURLTest.java diff --git a/jdk/src/java.base/share/classes/java/net/URL.java b/jdk/src/java.base/share/classes/java/net/URL.java index 2235a4edd2a..8891a47dbdd 100644 --- a/jdk/src/java.base/share/classes/java/net/URL.java +++ b/jdk/src/java.base/share/classes/java/net/URL.java @@ -36,6 +36,7 @@ import java.io.ObjectStreamException; import java.io.ObjectStreamField; import java.io.ObjectInputStream.GetField; import java.util.Iterator; +import java.util.Locale; import java.util.NoSuchElementException; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; @@ -405,7 +406,7 @@ public final class URL implements java.io.Serializable { } } - protocol = protocol.toLowerCase(); + protocol = protocol.toLowerCase(Locale.ROOT); this.protocol = protocol; if (host != null) { @@ -579,8 +580,7 @@ public final class URL implements java.io.Serializable { for (i = start ; !aRef && (i < limit) && ((c = spec.charAt(i)) != '/') ; i++) { if (c == ':') { - - String s = spec.substring(start, i).toLowerCase(); + String s = spec.substring(start, i).toLowerCase(Locale.ROOT); if (isValidProtocol(s)) { newProtocol = s; start = i + 1; diff --git a/jdk/test/java/net/URL/LocaleDependentURLTest.java b/jdk/test/java/net/URL/LocaleDependentURLTest.java new file mode 100644 index 00000000000..caa967698b2 --- /dev/null +++ b/jdk/test/java/net/URL/LocaleDependentURLTest.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8147962 + * @summary Verify URLs with upper-case protocols parse correctly in any + * locale + * @run main/othervm LocaleDependentURLTest + */ +import java.net.*; +import java.util.Locale; + +public class LocaleDependentURLTest { + + public static void main(String args[]) throws MalformedURLException { + for (Locale locale : Locale.getAvailableLocales()) { + Locale.setDefault(locale); + new URL("FILE:///TMP/X"); + } + } +} From c1d20c94d3b5bda25f6e49a1e712d4348c679011 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 27 Jan 2016 21:59:00 +0800 Subject: [PATCH 06/17] 8147400: Deprecate policytool Reviewed-by: xuelei, mullan --- .../security/tools/policytool/PolicyTool.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java index 02a82d941f9..f8083997c09 100644 --- a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java +++ b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java @@ -65,8 +65,11 @@ import javax.swing.border.EmptyBorder; * * @see java.security.Policy * @since 1.2 + * @deprecated The policytool tool has been deprecated and + * is planned to be removed in a future release. */ +@Deprecated public class PolicyTool { // for i18n @@ -738,6 +741,8 @@ public class PolicyTool { * run the PolicyTool */ public static void main(String args[]) { + System.out.println("Note: The policytool tool has been deprecated and" + + " is planned to be removed in a future release.\n"); parseArgs(args); SwingUtilities.invokeLater(new Runnable() { public void run() { @@ -873,6 +878,7 @@ public class PolicyTool { * The Permission contains the (Type, Name, Action) triplet. * */ +@SuppressWarnings("deprecation") class PolicyEntry { private CodeSource codesource; @@ -1012,6 +1018,7 @@ class PolicyEntry { /** * The main window for the PolicyTool */ +@SuppressWarnings("deprecation") class ToolWindow extends JFrame { // use serialVersionUID from JDK 1.2.2 for interoperability private static final long serialVersionUID = 5682568601210376777L; @@ -1549,6 +1556,7 @@ class ToolWindow extends JFrame { /** * General dialog window */ +@SuppressWarnings("deprecation") class ToolDialog extends JDialog { // use serialVersionUID from JDK 1.2.2 for interoperability private static final long serialVersionUID = -372244357011301190L; @@ -2912,6 +2920,7 @@ class ToolDialog extends JDialog { /** * Event handler for the PolicyTool window */ +@SuppressWarnings("deprecation") class ToolWindowListener implements WindowListener { private PolicyTool tool; @@ -2956,6 +2965,7 @@ class ToolWindowListener implements WindowListener { /** * Event handler for the Policy List */ +@SuppressWarnings("deprecation") class PolicyListListener extends MouseAdapter implements ActionListener { private PolicyTool tool; @@ -2985,6 +2995,7 @@ class PolicyListListener extends MouseAdapter implements ActionListener { /** * Event handler for the File Menu */ +@SuppressWarnings("deprecation") class FileMenuListener implements ActionListener { private PolicyTool tool; @@ -3083,6 +3094,7 @@ class FileMenuListener implements ActionListener { /** * Event handler for the main window buttons and Edit Menu */ +@SuppressWarnings("deprecation") class MainWindowListener implements ActionListener { private PolicyTool tool; @@ -3158,6 +3170,7 @@ class MainWindowListener implements ActionListener { * if edit is FALSE, then we are ADDing a new PolicyEntry, * so we only need to update the GUI listing. */ +@SuppressWarnings("deprecation") class AddEntryDoneButtonListener implements ActionListener { private PolicyTool tool; @@ -3224,6 +3237,7 @@ class AddEntryDoneButtonListener implements ActionListener { /** * Event handler for ChangeKeyStoreOKButton button */ +@SuppressWarnings("deprecation") class ChangeKeyStoreOKButtonListener implements ActionListener { private PolicyTool tool; @@ -3270,6 +3284,7 @@ class ChangeKeyStoreOKButtonListener implements ActionListener { /** * Event handler for AddPrinButton button */ +@SuppressWarnings("deprecation") class AddPrinButtonListener implements ActionListener { private PolicyTool tool; @@ -3295,6 +3310,7 @@ class AddPrinButtonListener implements ActionListener { /** * Event handler for AddPermButton button */ +@SuppressWarnings("deprecation") class AddPermButtonListener implements ActionListener { private PolicyTool tool; @@ -3320,6 +3336,7 @@ class AddPermButtonListener implements ActionListener { /** * Event handler for AddPrinOKButton button */ +@SuppressWarnings("deprecation") class NewPolicyPrinOKButtonListener implements ActionListener { private PolicyTool tool; @@ -3383,6 +3400,7 @@ class NewPolicyPrinOKButtonListener implements ActionListener { /** * Event handler for AddPermOKButton button */ +@SuppressWarnings("deprecation") class NewPolicyPermOKButtonListener implements ActionListener { private PolicyTool tool; @@ -3446,6 +3464,7 @@ class NewPolicyPermOKButtonListener implements ActionListener { /** * Event handler for RemovePrinButton button */ +@SuppressWarnings("deprecation") class RemovePrinButtonListener implements ActionListener { private PolicyTool tool; @@ -3481,6 +3500,7 @@ class RemovePrinButtonListener implements ActionListener { /** * Event handler for RemovePermButton button */ +@SuppressWarnings("deprecation") class RemovePermButtonListener implements ActionListener { private PolicyTool tool; @@ -3523,6 +3543,7 @@ class RemovePermButtonListener implements ActionListener { * GUI listing. If the user is editing an existing PolicyEntry, we * update both the GUI listing and the actual PolicyEntry. */ +@SuppressWarnings("deprecation") class EditPrinButtonListener extends MouseAdapter implements ActionListener { private PolicyTool tool; @@ -3569,6 +3590,7 @@ class EditPrinButtonListener extends MouseAdapter implements ActionListener { * GUI listing. If the user is editing an existing PolicyEntry, we * update both the GUI listing and the actual PolicyEntry. */ +@SuppressWarnings("deprecation") class EditPermButtonListener extends MouseAdapter implements ActionListener { private PolicyTool tool; @@ -3609,6 +3631,7 @@ class EditPermButtonListener extends MouseAdapter implements ActionListener { /** * Event handler for Principal Popup Menu */ +@SuppressWarnings("deprecation") class PrincipalTypeMenuListener implements ItemListener { private ToolDialog td; @@ -3660,6 +3683,7 @@ class PrincipalTypeMenuListener implements ItemListener { /** * Event handler for Permission Popup Menu */ +@SuppressWarnings("deprecation") class PermissionMenuListener implements ItemListener { private ToolDialog td; @@ -3734,6 +3758,7 @@ class PermissionMenuListener implements ItemListener { /** * Event handler for Permission Name Popup Menu */ +@SuppressWarnings("deprecation") class PermissionNameMenuListener implements ItemListener { private ToolDialog td; @@ -3887,6 +3912,7 @@ class StatusOKButtonListener implements ActionListener { /** * Event handler for UserSaveYes button */ +@SuppressWarnings("deprecation") class UserSaveYesButtonListener implements ActionListener { private ToolDialog us; @@ -3941,6 +3967,7 @@ class UserSaveYesButtonListener implements ActionListener { /** * Event handler for UserSaveNoButton */ +@SuppressWarnings("deprecation") class UserSaveNoButtonListener implements ActionListener { private PolicyTool tool; @@ -3989,6 +4016,7 @@ class UserSaveCancelButtonListener implements ActionListener { /** * Event handler for ConfirmRemovePolicyEntryOKButtonListener */ +@SuppressWarnings("deprecation") class ConfirmRemovePolicyEntryOKButtonListener implements ActionListener { private PolicyTool tool; @@ -4144,6 +4172,7 @@ class AudioPerm extends Perm { } } +@SuppressWarnings("deprecation") class AuthPerm extends Perm { AuthPerm() { super(javax.security.auth.AuthPermission.class, @@ -4216,6 +4245,7 @@ class FilePerm extends Perm { } } +@SuppressWarnings("deprecation") class URLPerm extends Perm { URLPerm() { super(java.net.URLPermission.class, @@ -4380,6 +4410,7 @@ class ReflectPerm extends Perm { } } +@SuppressWarnings("deprecation") class RuntimePerm extends Perm { RuntimePerm() { super(java.lang.RuntimePermission.class, @@ -4420,6 +4451,7 @@ class RuntimePerm extends Perm { } } +@SuppressWarnings("deprecation") class SecurityPerm extends Perm { SecurityPerm() { super(java.security.SecurityPermission.class, From b9d758e600c02dd8ada76bd8a29016335a168548 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Mon, 25 Jan 2016 16:07:00 -0800 Subject: [PATCH 07/17] 8148174: NegativeArraySizeException in Vector.grow(int) Improve management of internal array Reviewed-by: smarks, forax --- .../share/classes/java/util/Vector.java | 147 +++++++----- .../java/util/ArrayList/ArrayManagement.java | 1 + .../java/util/Vector/ArrayManagement.java | 218 ++++++++++++++++++ jdk/test/java/util/Vector/Bug8148174.java | 43 ++++ 4 files changed, 351 insertions(+), 58 deletions(-) create mode 100644 jdk/test/java/util/Vector/ArrayManagement.java create mode 100644 jdk/test/java/util/Vector/Bug8148174.java diff --git a/jdk/src/java.base/share/classes/java/util/Vector.java b/jdk/src/java.base/share/classes/java/util/Vector.java index 6e833f7dd6a..f6cdfbe8e9c 100644 --- a/jdk/src/java.base/share/classes/java/util/Vector.java +++ b/jdk/src/java.base/share/classes/java/util/Vector.java @@ -233,42 +233,56 @@ public class Vector public synchronized void ensureCapacity(int minCapacity) { if (minCapacity > 0) { modCount++; - ensureCapacityHelper(minCapacity); + if (minCapacity > elementData.length) + grow(minCapacity); } } /** - * This implements the unsynchronized semantics of ensureCapacity. - * Synchronized methods in this class can internally call this - * method for ensuring capacity without incurring the cost of an - * extra synchronization. - * - * @see #ensureCapacity(int) - */ - private void ensureCapacityHelper(int minCapacity) { - // overflow-conscious code - if (minCapacity - elementData.length > 0) - grow(minCapacity); - } - - /** - * The maximum size of array to allocate. + * The maximum size of array to allocate (unless necessary). * Some VMs reserve some header words in an array. * Attempts to allocate larger arrays may result in * OutOfMemoryError: Requested array size exceeds VM limit */ private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; - private void grow(int minCapacity) { + /** + * Increases the capacity to ensure that it can hold at least the + * number of elements specified by the minimum capacity argument. + * + * @param minCapacity the desired minimum capacity + * @throws OutOfMemoryError if minCapacity is less than zero + */ + private Object[] grow(int minCapacity) { + return elementData = Arrays.copyOf(elementData, + newCapacity(minCapacity)); + } + + private Object[] grow() { + return grow(elementCount + 1); + } + + /** + * Returns a capacity at least as large as the given minimum capacity. + * Will not return a capacity greater than MAX_ARRAY_SIZE unless + * the given minimum capacity is greater than MAX_ARRAY_SIZE. + * + * @param minCapacity the desired minimum capacity + * @throws OutOfMemoryError if minCapacity is less than zero + */ + private int newCapacity(int minCapacity) { // overflow-conscious code int oldCapacity = elementData.length; int newCapacity = oldCapacity + ((capacityIncrement > 0) ? capacityIncrement : oldCapacity); - if (newCapacity - minCapacity < 0) - newCapacity = minCapacity; - if (newCapacity - MAX_ARRAY_SIZE > 0) - newCapacity = hugeCapacity(minCapacity); - elementData = Arrays.copyOf(elementData, newCapacity); + if (newCapacity - minCapacity <= 0) { + if (minCapacity < 0) // overflow + throw new OutOfMemoryError(); + return minCapacity; + } + return (newCapacity - MAX_ARRAY_SIZE <= 0) + ? newCapacity + : hugeCapacity(minCapacity); } private static int hugeCapacity(int minCapacity) { @@ -290,13 +304,10 @@ public class Vector */ public synchronized void setSize(int newSize) { modCount++; - if (newSize > elementCount) { - ensureCapacityHelper(newSize); - } else { - for (int i = newSize ; i < elementCount ; i++) { - elementData[i] = null; - } - } + if (newSize > elementData.length) + grow(newSize); + for (int i = newSize; i < elementCount; i++) + elementData[i] = null; elementCount = newSize; } @@ -604,11 +615,16 @@ public class Vector throw new ArrayIndexOutOfBoundsException(index + " > " + elementCount); } - ensureCapacityHelper(elementCount + 1); - System.arraycopy(elementData, index, elementData, index + 1, elementCount - index); - elementData[index] = obj; modCount++; - elementCount++; + final int s = elementCount; + Object[] elementData = this.elementData; + if (s == elementData.length) + elementData = grow(); + System.arraycopy(elementData, index, + elementData, index + 1, + s - index); + elementData[index] = obj; + elementCount = s + 1; } /** @@ -623,9 +639,8 @@ public class Vector * @param obj the component to be added */ public synchronized void addElement(E obj) { - ensureCapacityHelper(elementCount + 1); modCount++; - elementData[elementCount++] = obj; + add(obj, elementData, elementCount); } /** @@ -780,6 +795,18 @@ public class Vector return oldValue; } + /** + * This helper method split out from add(E) to keep method + * bytecode size under 35 (the -XX:MaxInlineSize default value), + * which helps when add(E) is called in a C1-compiled loop. + */ + private void add(E e, Object[] elementData, int s) { + if (s == elementData.length) + elementData = grow(); + elementData[s] = e; + elementCount = s + 1; + } + /** * Appends the specified element to the end of this Vector. * @@ -788,9 +815,8 @@ public class Vector * @since 1.2 */ public synchronized boolean add(E e) { - ensureCapacityHelper(elementCount + 1); modCount++; - elementData[elementCount++] = e; + add(e, elementData, elementCount); return true; } @@ -891,16 +917,19 @@ public class Vector */ public boolean addAll(Collection c) { Object[] a = c.toArray(); + modCount++; int numNew = a.length; - if (numNew > 0) { - synchronized (this) { - ensureCapacityHelper(elementCount + numNew); - System.arraycopy(a, 0, elementData, elementCount, numNew); - modCount++; - elementCount += numNew; - } + if (numNew == 0) + return false; + synchronized (this) { + Object[] elementData = this.elementData; + final int s = elementCount; + if (numNew > elementData.length - s) + elementData = grow(s + numNew); + System.arraycopy(a, 0, elementData, s, numNew); + elementCount = s + numNew; + return true; } - return numNew > 0; } /** @@ -969,21 +998,23 @@ public class Vector throw new ArrayIndexOutOfBoundsException(index); Object[] a = c.toArray(); + modCount++; int numNew = a.length; + if (numNew == 0) + return false; + Object[] elementData = this.elementData; + final int s = elementCount; + if (numNew > elementData.length - s) + elementData = grow(s + numNew); - if (numNew > 0) { - ensureCapacityHelper(elementCount + numNew); - - int numMoved = elementCount - index; - if (numMoved > 0) - System.arraycopy(elementData, index, elementData, - index + numNew, numMoved); - - System.arraycopy(a, 0, elementData, index, numNew); - elementCount += numNew; - modCount++; - } - return numNew > 0; + int numMoved = s - index; + if (numMoved > 0) + System.arraycopy(elementData, index, + elementData, index + numNew, + numMoved); + System.arraycopy(a, 0, elementData, index, numNew); + elementCount = s + numNew; + return true; } /** diff --git a/jdk/test/java/util/ArrayList/ArrayManagement.java b/jdk/test/java/util/ArrayList/ArrayManagement.java index c3d690871c4..81adc716013 100644 --- a/jdk/test/java/util/ArrayList/ArrayManagement.java +++ b/jdk/test/java/util/ArrayList/ArrayManagement.java @@ -83,6 +83,7 @@ public class ArrayManagement { int oldCapacity = capacity(list); int oldModCount = modCount(list); list.ensureCapacity(capacity); + assertTrue(capacity(list) >= capacity || capacity(list) == 0); assertEquals(modCount(list), (capacity(list) == oldCapacity) ? oldModCount diff --git a/jdk/test/java/util/Vector/ArrayManagement.java b/jdk/test/java/util/Vector/ArrayManagement.java new file mode 100644 index 00000000000..ce4e695487c --- /dev/null +++ b/jdk/test/java/util/Vector/ArrayManagement.java @@ -0,0 +1,218 @@ +/* + * Copyright 2016 Google, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8148174 + * @summary brittle white box test of internal array management + * @run testng ArrayManagement + */ + +import java.lang.reflect.Field; +import java.util.AbstractList; +import java.util.Vector; +import java.util.Collections; +import java.util.List; +import java.util.SplittableRandom; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +public class ArrayManagement { + + /** + * A Vector that exposes all protected elements, and checks class + * invariants. + */ + static class PublicVector extends Vector { + public PublicVector() { super(); } + public PublicVector(int capacity) { super(capacity); } + public PublicVector(int capacity, int capacityIncrement) { + super(capacity, capacityIncrement); + } + public Object[] elementData() { return elementData; } + public int modCount() { return modCount; } + public int capacityIncrement() { return capacityIncrement; } + public int capacity() { return elementData.length; } + + public void ensureCapacity(int minCapacity) { + int oldCapacity = capacity(); + int oldModCount = modCount(); + super.ensureCapacity(minCapacity); + assertTrue(capacity() >= minCapacity); + if (minCapacity <= oldCapacity) + assertEquals(capacity(), oldCapacity); + if (minCapacity > 0) + assertEquals(modCount(), oldModCount + 1); + } + } + + static final int DEFAULT_CAPACITY = 10; + static final SplittableRandom rnd = new SplittableRandom(); + + static int newCapacity(int oldCapacity) { + return 2 * oldCapacity; + } + + static List singletonList() { + return Collections.singletonList(Boolean.TRUE); + } + + /** Opportunistically randomly test various add operations. */ + static void addOneElement(PublicVector list) { + int size = list.size(); + int modCount = list.modCount(); + switch (rnd.nextInt(4)) { + case 0: assertTrue(list.add(Boolean.TRUE)); break; + case 1: list.add(size, Boolean.TRUE); break; + case 2: assertTrue(list.addAll(singletonList())); break; + case 3: assertTrue(list.addAll(size, singletonList())); break; + default: throw new AssertionError(); + } + assertEquals(list.modCount(), modCount + 1); + assertEquals(list.size(), size + 1); + } + + @Test public void defaultCapacity() { + PublicVector list = new PublicVector<>(); + assertEquals(new PublicVector().capacity(), DEFAULT_CAPACITY); + for (int i = 0; i < DEFAULT_CAPACITY; i++) { + addOneElement(list); + assertEquals(list.capacity(), DEFAULT_CAPACITY); + } + addOneElement(list); + assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + } + + @Test public void defaultCapacityEnsureCapacity() { + PublicVector list = new PublicVector<>(); + for (int i = 0; i <= DEFAULT_CAPACITY; i++) { + list.ensureCapacity(i); // no-op! + assertEquals(list.capacity(), DEFAULT_CAPACITY); + } + for (int i = 0; i < DEFAULT_CAPACITY; i++) { + addOneElement(list); + assertEquals(list.capacity(), DEFAULT_CAPACITY); + } + addOneElement(list); + assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + { + int capacity = list.capacity(); + list.ensureCapacity(capacity + 1); + assertEquals(list.capacity(), newCapacity(capacity)); + } + { + int capacity = list.capacity(); + list.ensureCapacity(3 * capacity); + assertEquals(list.capacity(), 3 * capacity); + } + } + + @Test public void ensureCapacityBeyondDefaultCapacity() { + PublicVector list = new PublicVector<>(); + list.ensureCapacity(DEFAULT_CAPACITY + 1); + assertEquals(list.capacity(), newCapacity(DEFAULT_CAPACITY)); + } + + @Test public void explicitZeroCapacity() { + PublicVector list = new PublicVector<>(0); + assertEquals(list.capacity(), 0); + addOneElement(list); + assertEquals(list.capacity(), 1); + addOneElement(list); + assertEquals(list.capacity(), 2); + addOneElement(list); + assertEquals(list.capacity(), 4); + addOneElement(list); + assertEquals(list.capacity(), 4); + addOneElement(list); + assertEquals(list.capacity(), 8); + addOneElement(list); + assertEquals(list.capacity(), 8); + addOneElement(list); + assertEquals(list.capacity(), 8); + list.clear(); + assertEquals(list.capacity(), 8); + } + + @Test public void explicitZeroCapacityWithCapacityIncrement() { + PublicVector list = new PublicVector<>(0, 2); + assertEquals(list.capacity(), 0); + addOneElement(list); + assertEquals(list.capacity(), 2); + addOneElement(list); + assertEquals(list.capacity(), 2); + addOneElement(list); + assertEquals(list.capacity(), 4); + addOneElement(list); + assertEquals(list.capacity(), 4); + addOneElement(list); + assertEquals(list.capacity(), 6); + addOneElement(list); + assertEquals(list.capacity(), 6); + addOneElement(list); + assertEquals(list.capacity(), 8); + list.clear(); + assertEquals(list.capacity(), 8); + } + + @Test public void explicitLargeCapacity() { + int n = DEFAULT_CAPACITY * 3; + PublicVector list = new PublicVector<>(n); + assertEquals(list.capacity(), n); + list.ensureCapacity(0); + list.ensureCapacity(n); + for (int i = 0; i < n; i++) addOneElement(list); + assertEquals(list.capacity(), n); + + addOneElement(list); + assertEquals(list.capacity(), newCapacity(n)); + } + + @Test public void explicitLargeCapacityWithCapacityIncrement() { + int n = DEFAULT_CAPACITY * 3; + PublicVector list = new PublicVector<>(n, 2); + assertEquals(list.capacity(), n); + list.ensureCapacity(0); + list.ensureCapacity(n); + for (int i = 0; i < n; i++) addOneElement(list); + assertEquals(list.capacity(), n); + + addOneElement(list); + assertEquals(list.capacity(), n + 2); + } + + @Test public void emptyArraysAreNotShared() { + assertNotSame(new PublicVector(0).elementData(), + new PublicVector(0).elementData()); + } + + @Test public void negativeCapacity() { + for (int capacity : new int[] { -1, Integer.MIN_VALUE }) { + try { + new Vector(capacity); + fail("should throw"); + } catch (IllegalArgumentException success) {} + } + } +} diff --git a/jdk/test/java/util/Vector/Bug8148174.java b/jdk/test/java/util/Vector/Bug8148174.java new file mode 100644 index 00000000000..a987cd39155 --- /dev/null +++ b/jdk/test/java/util/Vector/Bug8148174.java @@ -0,0 +1,43 @@ +/* + * Copyright 2016 Google, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8148174 + * @summary repro for: NegativeArraySizeException in Vector.grow(int) + * @run main/othervm -Xmx17g Bug8148174 + * @ignore This test has huge memory requirements + */ + +public class Bug8148174 { + public static void main(String[] args) { + int size = Integer.MAX_VALUE - 2; + java.util.Vector huge = new java.util.Vector<>(size); + for (int i = 0; i < size; i++) + huge.add(null); + try { + huge.addAll(huge); + throw new Error("expected OutOfMemoryError not thrown"); + } catch (OutOfMemoryError success) {} + } +} From 4389a9aad46e71cf5feaa89738792b59c0fa4953 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 28 Jan 2016 11:09:42 +0000 Subject: [PATCH 08/17] 8148220: Update TEST.groups to include jdk/internal/math and jdk/internal/misc Reviewed-by: coffeys --- jdk/test/TEST.groups | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups index fbe25e8224f..e608d9d98b5 100644 --- a/jdk/test/TEST.groups +++ b/jdk/test/TEST.groups @@ -77,6 +77,7 @@ jdk_lang = \ sun/misc \ sun/reflect \ jdk/lambda \ + jdk/internal/misc \ vm # All of the java.util package @@ -144,7 +145,8 @@ jdk_stream = \ java/util/stream jdk_math = \ - java/math + java/math \ + jdk/internal/math jdk_io = \ java/io From c464136491a37890a60e7e9337842479cc49bd21 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Thu, 28 Jan 2016 12:55:19 +0000 Subject: [PATCH 09/17] 8148192: (fs) Path.register can fail with Bad file descriptor and other errors Reviewed-by: chegar --- .../classes/sun/nio/fs/AbstractPoller.java | 13 +- .../nio/file/WatchService/LotsOfCloses.java | 124 ++++++++++++++++++ 2 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 jdk/test/java/nio/file/WatchService/LotsOfCloses.java diff --git a/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java b/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java index 84fbae5dddd..fa2d9a90991 100644 --- a/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java +++ b/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java @@ -59,7 +59,11 @@ abstract class AbstractPoller implements Runnable { AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Object run() { - Thread thr = new Thread(null, thisRunnable, "FileSystemWatchService", 0, false); + Thread thr = new Thread(null, + thisRunnable, + "FileSystemWatchService", + 0, + false); thr.setDaemon(true); thr.start(); return null; @@ -216,10 +220,10 @@ abstract class AbstractPoller implements Runnable { throw new ClosedWatchServiceException(); } requestList.add(req); - } - // wakeup thread - wakeup(); + // wakeup thread + wakeup(); + } // wait for result Object result = req.awaitResult(); @@ -244,6 +248,7 @@ abstract class AbstractPoller implements Runnable { // if in process of shutdown then reject request if (shutdown) { req.release(new ClosedWatchServiceException()); + continue; } switch (req.type()) { diff --git a/jdk/test/java/nio/file/WatchService/LotsOfCloses.java b/jdk/test/java/nio/file/WatchService/LotsOfCloses.java new file mode 100644 index 00000000000..44ec26180b3 --- /dev/null +++ b/jdk/test/java/nio/file/WatchService/LotsOfCloses.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8148192 + * @summary Invoking close asynchronously can cause register to fail with + * an IOException rather than a ClosedWatchServiceException + * @run main LotsOfCloses + */ + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.ClosedWatchServiceException; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardWatchEventKinds; +import java.nio.file.WatchService; +import java.util.Random; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +public class LotsOfCloses { + + private static final Random RAND = new Random(); + + public static void main(String[] args) throws Exception { + Path dir = Files.createTempDirectory("tmp"); + ExecutorService pool = Executors.newCachedThreadPool(); + try { + + // run the test repeatedly + long start = System.currentTimeMillis(); + while ((System.currentTimeMillis() - start) < 5000) { + test(dir, pool); + } + + } finally { + pool.shutdown(); + } + + } + + /** + * Create a WatchService to watch for changes in the given directory + * and then attempt to close the WatchService and change a registration + * at the same time. + */ + static void test(Path dir, ExecutorService pool) throws Exception { + WatchService watcher = FileSystems.getDefault().newWatchService(); + + // initial registration + dir.register(watcher, StandardWatchEventKinds.ENTRY_CREATE); + + // submit tasks to close the WatchService and update the registration + Future closeResult; + Future registerResult; + + if (RAND.nextBoolean()) { + closeResult = pool.submit(newCloserTask(watcher)); + registerResult = pool.submit(newRegisterTask(watcher, dir)); + } else { + registerResult = pool.submit(newRegisterTask(watcher, dir)); + closeResult = pool.submit(newCloserTask(watcher)); + } + + closeResult.get(); + registerResult.get(); + + } + + /** + * Returns a task that closes the given WatchService. + */ + static Callable newCloserTask(WatchService watcher) { + return () -> { + try { + watcher.close(); + return null; + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + }; + } + + /** + * Returns a task that updates the registration of a directory with + * a WatchService. + */ + static Callable newRegisterTask(WatchService watcher, Path dir) { + return () -> { + try { + dir.register(watcher, StandardWatchEventKinds.ENTRY_DELETE); + return true; + } catch (ClosedWatchServiceException e) { + return false; + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + }; + } +} From 816a40ae00ec4ae97a42bc0235686e06553a5cb0 Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Thu, 28 Jan 2016 10:58:10 -0500 Subject: [PATCH 10/17] 8147468: Allow users to bound the size of buffers cached in the per-thread buffer caches Introduces the jdk.nio.maxCachedBufferSize property. Reviewed-by: alanb, bpb --- .../share/classes/sun/nio/ch/Util.java | 83 +++++- .../sun/nio/ch/TestMaxCachedBufferSize.java | 252 ++++++++++++++++++ 2 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 jdk/test/sun/nio/ch/TestMaxCachedBufferSize.java diff --git a/jdk/src/java.base/share/classes/sun/nio/ch/Util.java b/jdk/src/java.base/share/classes/sun/nio/ch/Util.java index 3b8d814bcd1..f2095540180 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ch/Util.java +++ b/jdk/src/java.base/share/classes/sun/nio/ch/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,9 @@ public class Util { // The number of temp buffers in our pool private static final int TEMP_BUF_POOL_SIZE = IOUtil.IOV_MAX; + // The max size allowed for a cached temp buffer, in bytes + private static final long MAX_CACHED_BUFFER_SIZE = getMaxCachedBufferSize(); + // Per-thread cache of temporary direct buffers private static ThreadLocal bufferCache = new ThreadLocal() @@ -54,6 +57,52 @@ public class Util { } }; + /** + * Returns the max size allowed for a cached temp buffers, in + * bytes. It defaults to Long.MAX_VALUE. It can be set with the + * jdk.nio.maxCachedBufferSize property. Even though + * ByteBuffer.capacity() returns an int, we're using a long here + * for potential future-proofing. + */ + private static long getMaxCachedBufferSize() { + String s = java.security.AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public String run() { + return System.getProperty("jdk.nio.maxCachedBufferSize"); + } + }); + if (s != null) { + try { + long m = Long.parseLong(s); + if (m >= 0) { + return m; + } else { + // if it's negative, ignore the system property + } + } catch (NumberFormatException e) { + // if the string is not well formed, ignore the system property + } + } + return Long.MAX_VALUE; + } + + /** + * Returns true if a buffer of this size is too large to be + * added to the buffer cache, false otherwise. + */ + private static boolean isBufferTooLarge(int size) { + return size > MAX_CACHED_BUFFER_SIZE; + } + + /** + * Returns true if the buffer is too large to be added to the + * buffer cache, false otherwise. + */ + private static boolean isBufferTooLarge(ByteBuffer buf) { + return isBufferTooLarge(buf.capacity()); + } + /** * A simple cache of direct buffers. */ @@ -80,6 +129,9 @@ public class Util { * size (or null if no suitable buffer is found). */ ByteBuffer get(int size) { + // Don't call this if the buffer would be too large. + assert !isBufferTooLarge(size); + if (count == 0) return null; // cache is empty @@ -117,6 +169,9 @@ public class Util { } boolean offerFirst(ByteBuffer buf) { + // Don't call this if the buffer is too large. + assert !isBufferTooLarge(buf); + if (count >= TEMP_BUF_POOL_SIZE) { return false; } else { @@ -128,6 +183,9 @@ public class Util { } boolean offerLast(ByteBuffer buf) { + // Don't call this if the buffer is too large. + assert !isBufferTooLarge(buf); + if (count >= TEMP_BUF_POOL_SIZE) { return false; } else { @@ -156,6 +214,15 @@ public class Util { * Returns a temporary buffer of at least the given size */ public static ByteBuffer getTemporaryDirectBuffer(int size) { + // If a buffer of this size is too large for the cache, there + // should not be a buffer in the cache that is at least as + // large. So we'll just create a new one. Also, we don't have + // to remove the buffer from the cache (as this method does + // below) given that we won't put the new buffer in the cache. + if (isBufferTooLarge(size)) { + return ByteBuffer.allocateDirect(size); + } + BufferCache cache = bufferCache.get(); ByteBuffer buf = cache.get(size); if (buf != null) { @@ -185,6 +252,13 @@ public class Util { * likely to be returned by a subsequent call to getTemporaryDirectBuffer. */ static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) { + // If the buffer is too large for the cache we don't have to + // check the cache. We'll just free it. + if (isBufferTooLarge(buf)) { + free(buf); + return; + } + assert buf != null; BufferCache cache = bufferCache.get(); if (!cache.offerFirst(buf)) { @@ -200,6 +274,13 @@ public class Util { * cache in same order that they were obtained. */ static void offerLastTemporaryDirectBuffer(ByteBuffer buf) { + // If the buffer is too large for the cache we don't have to + // check the cache. We'll just free it. + if (isBufferTooLarge(buf)) { + free(buf); + return; + } + assert buf != null; BufferCache cache = bufferCache.get(); if (!cache.offerLast(buf)) { diff --git a/jdk/test/sun/nio/ch/TestMaxCachedBufferSize.java b/jdk/test/sun/nio/ch/TestMaxCachedBufferSize.java new file mode 100644 index 00000000000..207485afe63 --- /dev/null +++ b/jdk/test/sun/nio/ch/TestMaxCachedBufferSize.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; + +import java.lang.management.BufferPoolMXBean; +import java.lang.management.ManagementFactory; + +import java.nio.ByteBuffer; + +import java.nio.channels.FileChannel; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import static java.nio.file.StandardOpenOption.CREATE; +import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; +import static java.nio.file.StandardOpenOption.WRITE; + +import java.util.List; +import java.util.Random; + +/* + * @test + * @build TestMaxCachedBufferSize + * @run main/othervm TestMaxCachedBufferSize + * @run main/othervm -Djdk.nio.maxCachedBufferSize=0 TestMaxCachedBufferSize + * @run main/othervm -Djdk.nio.maxCachedBufferSize=2000 TestMaxCachedBufferSize + * @run main/othervm -Djdk.nio.maxCachedBufferSize=100000 TestMaxCachedBufferSize + * @run main/othervm -Djdk.nio.maxCachedBufferSize=10000000 TestMaxCachedBufferSize + * + * @summary Test the implementation of the jdk.nio.maxCachedBufferSize property. + */ +public class TestMaxCachedBufferSize { + private static final int DEFAULT_ITERS = 10 * 1000; + private static final int DEFAULT_THREAD_NUM = 4; + + private static final int SMALL_BUFFER_MIN_SIZE = 4 * 1024; + private static final int SMALL_BUFFER_MAX_SIZE = 64 * 1024; + private static final int SMALL_BUFFER_DIFF_SIZE = + SMALL_BUFFER_MAX_SIZE - SMALL_BUFFER_MIN_SIZE; + + private static final int LARGE_BUFFER_MIN_SIZE = 512 * 1024; + private static final int LARGE_BUFFER_MAX_SIZE = 4 * 1024 * 1024; + private static final int LARGE_BUFFER_DIFF_SIZE = + LARGE_BUFFER_MAX_SIZE - LARGE_BUFFER_MIN_SIZE; + + private static final int LARGE_BUFFER_FREQUENCY = 100; + + private static final String FILE_NAME_PREFIX = "nio-out-file-"; + private static final int VERBOSE_PERIOD = 5 * 1000; + + private static int iters = DEFAULT_ITERS; + private static int threadNum = DEFAULT_THREAD_NUM; + + private static BufferPoolMXBean getDirectPool() { + final List pools = + ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class); + for (BufferPoolMXBean pool : pools) { + if (pool.getName().equals("direct")) { + return pool; + } + } + throw new Error("could not find direct pool"); + } + private static final BufferPoolMXBean directPool = getDirectPool(); + + // Each worker will do write operations on a file channel using + // buffers of various sizes. The buffer size is randomly chosen to + // be within a small or a large range. This way we can control + // which buffers can be cached (all, only the small ones, or none) + // by setting the jdk.nio.maxCachedBufferSize property. + private static class Worker implements Runnable { + private final int id; + private final Random random = new Random(); + private long smallBufferCount = 0; + private long largeBufferCount = 0; + + private int getWriteSize() { + int minSize = 0; + int diff = 0; + if (random.nextInt() % LARGE_BUFFER_FREQUENCY != 0) { + // small buffer + minSize = SMALL_BUFFER_MIN_SIZE; + diff = SMALL_BUFFER_DIFF_SIZE; + smallBufferCount += 1; + } else { + // large buffer + minSize = LARGE_BUFFER_MIN_SIZE; + diff = LARGE_BUFFER_DIFF_SIZE; + largeBufferCount += 1; + } + return minSize + random.nextInt(diff); + } + + private void loop() { + final String fileName = String.format("%s%d", FILE_NAME_PREFIX, id); + + try { + for (int i = 0; i < iters; i += 1) { + final int writeSize = getWriteSize(); + + // This will allocate a HeapByteBuffer. It should not + // be a direct buffer, otherwise the write() method on + // the channel below will not create a temporary + // direct buffer for the write. + final ByteBuffer buffer = ByteBuffer.allocate(writeSize); + + // Put some random data on it. + while (buffer.hasRemaining()) { + buffer.put((byte) random.nextInt()); + } + buffer.rewind(); + + final Path file = Paths.get(fileName); + try (FileChannel outChannel = FileChannel.open(file, CREATE, TRUNCATE_EXISTING, WRITE)) { + // The write() method will create a temporary + // direct buffer for the write and attempt to cache + // it. It's important that buffer is not a + // direct buffer, otherwise the temporary buffer + // will not be created. + long res = outChannel.write(buffer); + } + + if ((i + 1) % VERBOSE_PERIOD == 0) { + System.out.printf( + " Worker %3d | %8d Iters | Small %8d Large %8d | Direct %4d / %7dK\n", + id, i + 1, smallBufferCount, largeBufferCount, + directPool.getCount(), directPool.getTotalCapacity() / 1024); + } + } + } catch (IOException e) { + throw new Error("I/O error", e); + } + } + + @Override + public void run() { + loop(); + } + + public Worker(int id) { + this.id = id; + } + } + + public static void checkDirectBuffers(long expectedCount, long expectedMax) { + final long directCount = directPool.getCount(); + final long directTotalCapacity = directPool.getTotalCapacity(); + System.out.printf("Direct %d / %dK\n", + directCount, directTotalCapacity / 1024); + + // Note that directCount could be < expectedCount. This can + // happen if a GC occurs after one of the worker threads exits + // since its thread-local DirectByteBuffer could be cleaned up + // before we reach here. + if (directCount > expectedCount) { + throw new Error(String.format( + "inconsistent direct buffer total count, expected = %d, found = %d", + expectedCount, directCount)); + } + + if (directTotalCapacity > expectedMax) { + throw new Error(String.format( + "inconsistent direct buffer total capacity, expectex max = %d, found = %d", + expectedMax, directTotalCapacity)); + } + } + + public static void main(String[] args) { + final String maxBufferSizeStr = System.getProperty("jdk.nio.maxCachedBufferSize"); + final long maxBufferSize = + (maxBufferSizeStr != null) ? Long.valueOf(maxBufferSizeStr) : Long.MAX_VALUE; + + // We assume that the max cannot be equal to a size of a + // buffer that can be allocated (makes sanity checking at the + // end easier). + if ((SMALL_BUFFER_MIN_SIZE <= maxBufferSize && + maxBufferSize <= SMALL_BUFFER_MAX_SIZE) || + (LARGE_BUFFER_MIN_SIZE <= maxBufferSize && + maxBufferSize <= LARGE_BUFFER_MAX_SIZE)) { + throw new Error(String.format("max buffer size = %d not allowed", + maxBufferSize)); + } + + System.out.printf("Threads %d | Iterations %d | MaxBufferSize %d\n", + threadNum, iters, maxBufferSize); + System.out.println(); + + final Thread[] threads = new Thread[threadNum]; + for (int i = 0; i < threadNum; i += 1) { + threads[i] = new Thread(new Worker(i)); + threads[i].start(); + } + + try { + for (int i = 0; i < threadNum; i += 1) { + threads[i].join(); + } + } catch (InterruptedException e) { + throw new Error("join() interrupted!", e); + } + + // There is an assumption here that, at this point, only the + // cached DirectByteBuffers should be active. Given we + // haven't used any other DirectByteBuffers in this test, this + // should hold. + // + // Also note that we can only do the sanity checking at the + // end and not during the run given that, at any time, there + // could be buffers currently in use by some of the workers + // that will not be cached. + + System.out.println(); + if (maxBufferSize < SMALL_BUFFER_MAX_SIZE) { + // The max buffer size is smaller than all buffers that + // were allocated. No buffers should have been cached. + checkDirectBuffers(0, 0); + } else if (maxBufferSize < LARGE_BUFFER_MIN_SIZE) { + // The max buffer size is larger than all small buffers + // but smaller than all large buffers that were + // allocated. Only small buffers could have been cached. + checkDirectBuffers(threadNum, + (long) threadNum * (long) SMALL_BUFFER_MAX_SIZE); + } else { + // The max buffer size is larger than all buffers that + // were allocated. All buffers could have been cached. + checkDirectBuffers(threadNum, + (long) threadNum * (long) LARGE_BUFFER_MAX_SIZE); + } + } +} From 6646fcbf1848e3d253309e7a53a66f473cc58ffd Mon Sep 17 00:00:00 2001 From: Doug Lea Date: Thu, 28 Jan 2016 08:23:23 -0800 Subject: [PATCH 11/17] 8144990: java/util/concurrent/forkjoin/FJExceptionTableLeak.java: OOM with Xcomp,G1GC Reviewed-by: martin, psandoz, chegar --- .../util/concurrent/forkjoin/FJExceptionTableLeak.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java b/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java index c236bd231cc..8b0a92d2613 100644 --- a/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java +++ b/jdk/test/java/util/concurrent/forkjoin/FJExceptionTableLeak.java @@ -36,17 +36,17 @@ * @author Doug Lea * @bug 8004138 * @summary Check if ForkJoinPool table leaks thrown exceptions. - * @run main/othervm -Xmx2200k FJExceptionTableLeak - * @key intermittent + * @run main/othervm -Xmx8m -Djava.util.concurrent.ForkJoinPool.common.parallelism=4 FJExceptionTableLeak */ import java.util.concurrent.ForkJoinPool; import java.util.concurrent.RecursiveAction; public class FJExceptionTableLeak { - // This test was observed to fail with jdk7 -Xmx2200k, + // This test was observed to fail with pre-bug-fix jdk7 -Xmx8m, // using STEPS = 220 and TASKS_PER_STEP = 100 - static final int STEPS = 500; + static final int PRE_BUG_FIX_FAILURE_STEPS = 220; + static final int STEPS = 10 * PRE_BUG_FIX_FAILURE_STEPS; static final int TASKS_PER_STEP = 100; static class FailingTaskException extends RuntimeException {} From c7a7ba0e1ef65d41a1b584a27b3c71a66a04e6a2 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Thu, 28 Jan 2016 19:43:05 +0300 Subject: [PATCH 12/17] 8148483: JEP 280: Indify String Concatenation Co-authored-by: Remi Forax Co-authored-by: Peter Levart Reviewed-by: psandoz, mcimadamore, igerasim, forax, plevart, vlivanov, ihse --- .../share/classes/java/lang/Integer.java | 23 +- .../share/classes/java/lang/Long.java | 23 +- .../classes/java/lang/StringConcatHelper.java | 345 + .../lang/invoke/StringConcatException.java | 49 + .../java/lang/invoke/StringConcatFactory.java | 1790 +++++ jdk/test/com/sun/jdi/LineNumberInfo.java | 2 +- jdk/test/com/sun/jdi/sde/InstallSDE.java | 4 + .../String/concat/ImplicitStringConcat.java | 216 + .../concat/ImplicitStringConcatArgCount.java | 123 + .../ImplicitStringConcatBoundaries.java | 206 + .../concat/ImplicitStringConcatMany.java | 195 + .../concat/ImplicitStringConcatManyLongs.java | 195 + .../ImplicitStringConcatShapes-head.template | 127 + .../concat/ImplicitStringConcatShapes.java | 5931 +++++++++++++++++ .../ImplicitStringConcatShapesTestGen.java | 313 + .../concat/StringConcatFactoryInvariants.java | 293 + .../java/lang/String/concat/update-tests.sh | 26 + .../lang/invoke/InvokeDynamicPrintArgs.java | 2 +- .../lang/invoke/MethodHandleConstants.java | 2 +- 19 files changed, 9854 insertions(+), 11 deletions(-) create mode 100644 jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java create mode 100644 jdk/src/java.base/share/classes/java/lang/invoke/StringConcatException.java create mode 100644 jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcat.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatArgCount.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatBoundaries.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatMany.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatManyLongs.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatShapes-head.template create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatShapes.java create mode 100644 jdk/test/java/lang/String/concat/ImplicitStringConcatShapesTestGen.java create mode 100644 jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java create mode 100644 jdk/test/java/lang/String/concat/update-tests.sh diff --git a/jdk/src/java.base/share/classes/java/lang/Integer.java b/jdk/src/java.base/share/classes/java/lang/Integer.java index 5302091fb39..2a846c4d07f 100644 --- a/jdk/src/java.base/share/classes/java/lang/Integer.java +++ b/jdk/src/java.base/share/classes/java/lang/Integer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -339,7 +339,6 @@ public final class Integer extends Number implements Comparable { // assert shift > 0 && shift <=5 : "Illegal shift value"; int mag = Integer.SIZE - Integer.numberOfLeadingZeros(val); int chars = Math.max(((mag + (shift - 1)) / shift), 1); - if (COMPACT_STRINGS) { byte[] buf = new byte[chars]; formatUnsignedInt(val, shift, buf, 0, chars); @@ -477,8 +476,13 @@ public final class Integer extends Number implements Comparable { * values, to cover the Integer.MIN_VALUE case. Converting otherwise * (negative to positive) will expose -Integer.MIN_VALUE that overflows * integer. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, Latin1-encoded + * @return index of the most significant digit or minus sign, if present */ - static void getChars(int i, int index, byte[] buf) { + static int getChars(int i, int index, byte[] buf) { int q, r; int charPos = index; @@ -509,9 +513,19 @@ public final class Integer extends Number implements Comparable { if (negative) { buf[--charPos] = (byte)'-'; } + return charPos; } - static void getCharsUTF16(int i, int index, byte[] buf) { + /** + * This is a variant of {@link #getChars(int, int, byte[])}, but for + * UTF-16 coder. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, UTF16-coded. + * @return index of the most significant digit or minus sign, if present + */ + static int getCharsUTF16(int i, int index, byte[] buf) { int q, r; int charPos = index; @@ -542,6 +556,7 @@ public final class Integer extends Number implements Comparable { if (negative) { StringUTF16.putChar(buf, --charPos, '-'); } + return charPos; } // Left here for compatibility reasons, see JDK-8143900. diff --git a/jdk/src/java.base/share/classes/java/lang/Long.java b/jdk/src/java.base/share/classes/java/lang/Long.java index 191ae2071d4..48019cd31b3 100644 --- a/jdk/src/java.base/share/classes/java/lang/Long.java +++ b/jdk/src/java.base/share/classes/java/lang/Long.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -379,7 +379,6 @@ public final class Long extends Number implements Comparable { // assert shift > 0 && shift <=5 : "Illegal shift value"; int mag = Long.SIZE - Long.numberOfLeadingZeros(val); int chars = Math.max(((mag + (shift - 1)) / shift), 1); - if (COMPACT_STRINGS) { byte[] buf = new byte[chars]; formatUnsignedLong0(val, shift, buf, 0, chars); @@ -489,8 +488,13 @@ public final class Long extends Number implements Comparable { * values, to cover the Long.MIN_VALUE case. Converting otherwise * (negative to positive) will expose -Long.MIN_VALUE that overflows * long. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, Latin1-encoded + * @return index of the most significant digit or minus sign, if present */ - static void getChars(long i, int index, byte[] buf) { + static int getChars(long i, int index, byte[] buf) { long q; int r; int charPos = index; @@ -533,9 +537,19 @@ public final class Long extends Number implements Comparable { if (negative) { buf[--charPos] = (byte)'-'; } + return charPos; } - static void getCharsUTF16(long i, int index, byte[] buf) { + /** + * This is a variant of {@link #getChars(long, int, byte[])}, but for + * UTF-16 coder. + * + * @param i value to convert + * @param index next index, after the least significant digit + * @param buf target buffer, UTF16-coded. + * @return index of the most significant digit or minus sign, if present + */ + static int getCharsUTF16(long i, int index, byte[] buf) { long q; int r; int charPos = index; @@ -578,6 +592,7 @@ public final class Long extends Number implements Comparable { if (negative) { StringUTF16.putChar(buf, --charPos, '-'); } + return charPos; } /** diff --git a/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java b/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java new file mode 100644 index 00000000000..d9517e5226f --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/StringConcatHelper.java @@ -0,0 +1,345 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang; + +/** + * Helper for string concatenation. These methods are mostly looked up with private lookups + * from {@link java.lang.invoke.StringConcatFactory}, and used in {@link java.lang.invoke.MethodHandle} + * combinators there. + */ +final class StringConcatHelper { + + private StringConcatHelper() { + // no instantiation + } + + /** + * Check for overflow, throw the exception on overflow. + * @param len String length + * @return length + */ + private static int checkOverflow(int len) { + if (len < 0) { + throw new OutOfMemoryError("Overflow: String length out of range"); + } + return len; + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, boolean value) { + return checkOverflow(current + (value ? 4 : 5)); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, byte value) { + return mixLen(current, (int)value); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, char value) { + return checkOverflow(current + 1); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, short value) { + return mixLen(current, (int)value); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, int value) { + return checkOverflow(current + Integer.stringSize(value)); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, long value) { + return checkOverflow(current + Long.stringSize(value)); + } + + /** + * Mix value length into current length + * @param current current length + * @param value value to mix in + * @return new length + */ + static int mixLen(int current, String value) { + return checkOverflow(current + value.length()); + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, char value) { + return (byte)(current | (StringLatin1.canEncode(value) ? 0 : 1)); + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, String value) { + return (byte)(current | value.coder()); + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, boolean value) { + // Booleans are represented with Latin1 + return current; + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, byte value) { + // Bytes are represented with Latin1 + return current; + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, short value) { + // Shorts are represented with Latin1 + return current; + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, int value) { + // Ints are represented with Latin1 + return current; + } + + /** + * Mix coder into current coder + * @param current current coder + * @param value value to mix in + * @return new coder + */ + static byte mixCoder(byte current, long value) { + // Longs are represented with Latin1 + return current; + } + + /** + * Prepends the stringly representation of boolean value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value boolean value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, boolean value) { + if (coder == String.LATIN1) { + if (value) { + buf[--index] = 'e'; + buf[--index] = 'u'; + buf[--index] = 'r'; + buf[--index] = 't'; + } else { + buf[--index] = 'e'; + buf[--index] = 's'; + buf[--index] = 'l'; + buf[--index] = 'a'; + buf[--index] = 'f'; + } + } else { + if (value) { + StringUTF16.putChar(buf, --index, 'e'); + StringUTF16.putChar(buf, --index, 'u'); + StringUTF16.putChar(buf, --index, 'r'); + StringUTF16.putChar(buf, --index, 't'); + } else { + StringUTF16.putChar(buf, --index, 'e'); + StringUTF16.putChar(buf, --index, 's'); + StringUTF16.putChar(buf, --index, 'l'); + StringUTF16.putChar(buf, --index, 'a'); + StringUTF16.putChar(buf, --index, 'f'); + } + } + return index; + } + + /** + * Prepends the stringly representation of byte value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value byte value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, byte value) { + return prepend(index, buf, coder, (int)value); + } + + /** + * Prepends the stringly representation of char value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value char value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, char value) { + if (coder == String.LATIN1) { + buf[--index] = (byte) (value & 0xFF); + } else { + StringUTF16.putChar(buf, --index, value); + } + return index; + } + + /** + * Prepends the stringly representation of short value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value short value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, short value) { + return prepend(index, buf, coder, (int)value); + } + + /** + * Prepends the stringly representation of integer value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value integer value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, int value) { + if (coder == String.LATIN1) { + return Integer.getChars(value, index, buf); + } else { + return Integer.getCharsUTF16(value, index, buf); + } + } + + /** + * Prepends the stringly representation of long value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value long value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, long value) { + if (coder == String.LATIN1) { + return Long.getChars(value, index, buf); + } else { + return Long.getCharsUTF16(value, index, buf); + } + } + + /** + * Prepends the stringly representation of String value into buffer, + * given the coder and final index. Index is measured in chars, not in bytes! + * + * @param index final char index in the buffer + * @param buf buffer to append to + * @param coder coder to add with + * @param value String value to encode + * @return new index + */ + static int prepend(int index, byte[] buf, byte coder, String value) { + index -= value.length(); + value.getBytes(buf, index, coder); + return index; + } + + /** + * Instantiates the String with given buffer and coder + * @param buf buffer to use + * @param coder coder to use + * @return String resulting string + */ + static String newString(byte[] buf, byte coder) { + // Use the private, non-copying constructor (unsafe!) + return new String(buf, coder); + } + +} diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatException.java b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatException.java new file mode 100644 index 00000000000..f6bc7e9bd87 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatException.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang.invoke; + +/** + * StringConcatException is thrown by {@link StringConcatFactory} when linkage + * invariants are violated. + */ +public class StringConcatException extends Exception { + private static final long serialVersionUID = 292L + 9L; + + /** + * Constructs an exception with a message + * @param msg exception message + */ + public StringConcatException(String msg) { + super(msg); + } + + /** + * Constructs an exception with a message and a linked throwable + * @param msg exception message + * @param cause throwable cause + */ + public StringConcatException(String msg, Throwable cause) { + super(msg, cause); + } +} diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java new file mode 100644 index 00000000000..6b0cfb8289c --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java @@ -0,0 +1,1790 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang.invoke; + +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.Label; +import jdk.internal.org.objectweb.asm.MethodVisitor; +import jdk.internal.org.objectweb.asm.Opcodes; +import jdk.internal.vm.annotation.ForceInline; +import sun.misc.Unsafe; + +import java.lang.invoke.MethodHandles.Lookup; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.function.Function; + +import static jdk.internal.org.objectweb.asm.Opcodes.*; + +/** + *

Methods to facilitate the creation of String concatenation methods, that + * can be used to efficiently concatenate a known number of arguments of known + * types, possibly after type adaptation and partial evaluation of arguments. + * These methods are typically used as bootstrap methods for {@code + * invokedynamic} call sites, to support the string concatenation + * feature of the Java Programming Language. + * + *

Indirect access to the behavior specified by the provided {@code + * MethodHandle} proceeds in order through two phases: + * + *

    + *
  1. Linkage occurs when the methods in this class are invoked. + * They take as arguments a method type describing the concatenated arguments + * count and types, and optionally the String recipe, plus the + * constants that participate in the String concatenation. The details on + * accepted recipe shapes are described further below. Linkage may involve + * dynamically loading a new class that implements the expected concatenation + * behavior. The {@code CallSite} holds the {@code MethodHandle} pointing to the + * exact concatenation method. The concatenation methods may be shared among + * different {@code CallSite}s, e.g. if linkage methods produce them as pure + * functions.
  2. + * + *
  3. Invocation occurs when a generated concatenation method is + * invoked with the exact dynamic arguments. This may occur many times for a + * single concatenation method. The method referenced by the behavior {@code + * MethodHandle} is invoked with the static arguments and any additional dynamic + * arguments provided on invocation, as if by {@link MethodHandle#invoke(Object...)}.
  4. + *
+ * + *

This class provides two forms of linkage methods: a simple version + * ({@link #makeConcat(java.lang.invoke.MethodHandles.Lookup, String, + * MethodType)}) using only the dynamic arguments, and an advanced version + * ({@link #makeConcatWithConstants(java.lang.invoke.MethodHandles.Lookup, + * String, MethodType, String, Object...)} using the advanced forms of capturing + * the constant arguments. The advanced strategy can produce marginally better + * invocation bytecode, at the expense of exploding the number of shapes of + * string concatenation methods present at runtime, because those shapes would + * include constant static arguments as well. + * + * @author Aleksey Shipilev + * @author Remi Forax + * @author Peter Levart + * + * @apiNote + *

There is a JVM limit (classfile structural constraint): no method + * can call with more than 255 slots. This limits the number of static and + * dynamic arguments one can pass to bootstrap method. Since there are potential + * concatenation strategies that use {@code MethodHandle} combinators, we need + * to reserve a few empty slots on the parameter lists to to capture the + * temporal results. This is why bootstrap methods in this factory do not accept + * more than 200 argument slots. Users requiring more than 200 argument slots in + * concatenation are expected to split the large concatenation in smaller + * expressions. + */ +public final class StringConcatFactory { + + /** + * Tag used to demarcate an ordinary argument. + */ + private static final char TAG_ARG = '\u0001'; + + /** + * Tag used to demarcate a constant. + */ + private static final char TAG_CONST = '\u0002'; + + /** + * Maximum number of argument slots in String Concat call. + * + * While the maximum number of argument slots that indy call can handle is 253, + * we do not use all those slots, to let the strategies with MethodHandle + * combinators to use some arguments. + */ + private static final int MAX_INDY_CONCAT_ARG_SLOTS = 200; + + /** + * Concatenation strategy to use. See {@link Strategy} for possible options. + * This option is controllable with -Djava.lang.invoke.stringConcat JDK option. + */ + private static final Strategy STRATEGY; + + /** + * Default strategy to use for concatenation. + */ + private static final Strategy DEFAULT_STRATEGY = Strategy.BC_SB; + + private enum Strategy { + /** + * Bytecode generator, calling into {@link java.lang.StringBuilder}. + */ + BC_SB, + + /** + * Bytecode generator, calling into {@link java.lang.StringBuilder}; + * but trying to estimate the required storage. + */ + BC_SB_SIZED, + + /** + * Bytecode generator, calling into {@link java.lang.StringBuilder}; + * but computing the required storage exactly. + */ + BC_SB_SIZED_EXACT, + + /** + * MethodHandle-based generator, that in the end calls into {@link java.lang.StringBuilder}. + * This strategy also tries to estimate the required storage. + */ + MH_SB_SIZED, + + /** + * MethodHandle-based generator, that in the end calls into {@link java.lang.StringBuilder}. + * This strategy also estimate the required storage exactly. + */ + MH_SB_SIZED_EXACT, + + /** + * MethodHandle-based generator, that constructs its own byte[] array from + * the arguments. It computes the required storage exactly. + */ + MH_INLINE_SIZED_EXACT + } + + /** + * Enables debugging: this may print debugging messages, perform additional (non-neutral for performance) + * checks, etc. + */ + private static final boolean DEBUG; + + /** + * Enables caching of strategy stubs. This may improve the linkage time by reusing the generated + * code, at the expense of contaminating the profiles. + */ + private static final boolean CACHE_ENABLE; + + private static final ConcurrentMap CACHE; + + static { + // Poke the privileged block once, taking everything we need: + final Object[] values = new Object[3]; + AccessController.doPrivileged((PrivilegedAction) () -> { + values[0] = System.getProperty("java.lang.invoke.stringConcat"); + values[1] = Boolean.getBoolean("java.lang.invoke.stringConcat.cache"); + values[2] = Boolean.getBoolean("java.lang.invoke.stringConcat.debug"); + return null; + }); + + final String strategy = (String) values[0]; + CACHE_ENABLE = (Boolean) values[1]; + DEBUG = (Boolean) values[2]; + + STRATEGY = (strategy == null) ? DEFAULT_STRATEGY : Strategy.valueOf(strategy); + CACHE = CACHE_ENABLE ? new ConcurrentHashMap<>() : null; + } + + private static final class Key { + final MethodType mt; + final Recipe recipe; + + public Key(MethodType mt, Recipe recipe) { + this.mt = mt; + this.recipe = recipe; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Key key = (Key) o; + + if (!mt.equals(key.mt)) return false; + if (!recipe.equals(key.recipe)) return false; + return true; + } + + @Override + public int hashCode() { + int result = mt.hashCode(); + result = 31 * result + recipe.hashCode(); + return result; + } + } + + /** + * Parses the recipe string, and produces the traversable collection of + * {@link java.lang.invoke.StringConcatFactory.RecipeElement}-s for generator + * strategies. Notably, this class parses out the constants from the recipe + * and from other static arguments. + */ + private static final class Recipe { + private final List elements; + private final List elementsRev; + + public Recipe(String src, Object[] constants) { + List el = new ArrayList<>(); + + int constC = 0; + int argC = 0; + + StringBuilder acc = new StringBuilder(); + + for (int i = 0; i < src.length(); i++) { + char c = src.charAt(i); + + if (c == TAG_CONST || c == TAG_ARG) { + // Detected a special tag, flush all accumulated characters + // as a constant first: + if (acc.length() > 0) { + el.add(new RecipeElement(acc.toString())); + acc.setLength(0); + } + if (c == TAG_CONST) { + Object cnst = constants[constC++]; + el.add(new RecipeElement(cnst)); + } + if (c == TAG_ARG) { + el.add(new RecipeElement(argC++)); + } + } else { + // Not a special characters, this is a constant embedded into + // the recipe itself. + acc.append(c); + } + } + + // Flush the remaining characters as constant: + if (acc.length() > 0) { + el.add(new RecipeElement(acc.toString())); + } + + elements = new ArrayList<>(el); + Collections.reverse(el); + elementsRev = el; + } + + public Collection getElements() { + return elements; + } + + public Collection getElementsReversed() { + return elementsRev; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Recipe recipe = (Recipe) o; + return elements.equals(recipe.elements); + } + + @Override + public int hashCode() { + return elements.hashCode(); + } + } + + private static final class RecipeElement { + private final Object value; + private final int argPos; + private final Tag tag; + + public RecipeElement(Object cnst) { + this.value = Objects.requireNonNull(cnst); + this.argPos = -1; + this.tag = Tag.CONST; + } + + public RecipeElement(int arg) { + this.value = null; + this.argPos = arg; + this.tag = Tag.ARG; + } + + public Object getValue() { + assert (tag == Tag.CONST); + return value; + } + + public int getArgPos() { + assert (tag == Tag.ARG); + return argPos; + } + + public Tag getTag() { + return tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + RecipeElement that = (RecipeElement) o; + + if (tag != that.tag) return false; + if (tag == Tag.CONST && (!value.equals(that.value))) return false; + if (tag == Tag.ARG && (argPos != that.argPos)) return false; + return true; + } + + @Override + public int hashCode() { + return tag.hashCode(); + } + } + + private enum Tag { + CONST, ARG + } + + /** + * Facilitates the creation of optimized String concatenation methods, that + * can be used to efficiently concatenate a known number of arguments of + * known types, possibly after type adaptation and partial evaluation of + * arguments. Typically used as a bootstrap method for {@code + * invokedynamic} call sites, to support the string concatenation + * feature of the Java Programming Language. + * + *

When the target of the {@code CallSite} returned from this method is + * invoked, it returns the result of String concatenation, taking all + * function arguments passed to the linkage method as inputs for + * concatenation. The target signature is given by {@code concatType}. + * The arguments are concatenated as per requirements stated in JLS 15.18.1 + * "String Concatenation Operator +". Notably, the inputs are converted as + * per JLS 5.1.11 "String Conversion", and combined from left to right. + * + *

Assume the linkage arguments are as follows: + * + *

    + *
  • {@code concatType}, describing the {@code CallSite} signature
  • + *
+ * + *

Then the following linkage invariants must hold: + * + *

    + *
  • The parameter count in {@code concatType} is less than or equal to 200
  • + * + *
  • The return type in {@code concatType} is assignable from {@link java.lang.String}
  • + *
+ * + * @param lookup Represents a lookup context with the accessibility + * privileges of the caller. When used with {@code + * invokedynamic}, this is stacked automatically by the VM. + * @param name The name of the method to implement. This name is + * arbitrary, and has no meaning for this linkage method. + * When used with {@code invokedynamic}, this is provided by + * the {@code NameAndType} of the {@code InvokeDynamic} + * structure and is stacked automatically by the VM. + * @param concatType The expected signature of the {@code CallSite}. The + * parameter types represent the types of concatenation + * arguments; the return type is always assignable from {@link + * java.lang.String}. When used with {@code invokedynamic}, + * this is provided by the {@code NameAndType} of the {@code + * InvokeDynamic} structure and is stacked automatically by + * the VM. + * @return a CallSite whose target can be used to perform String + * concatenation, with dynamic concatenation arguments described by the given + * {@code concatType}. + * @throws StringConcatException If any of the linkage invariants described + * here are violated. + * @throws NullPointerException If any of the incoming arguments is null. + * This will never happen when a bootstrap method + * is called with invokedynamic. + * + * @jls 5.1.11 String Conversion + * @jls 15.18.1 String Concatenation Operator + + */ + public static CallSite makeConcat(MethodHandles.Lookup lookup, + String name, + MethodType concatType) throws StringConcatException { + if (DEBUG) { + System.out.println("StringConcatFactory " + STRATEGY + " is here for " + concatType); + } + + return doStringConcat(lookup, name, concatType, true, null); + } + + /** + * Facilitates the creation of optimized String concatenation methods, that + * can be used to efficiently concatenate a known number of arguments of + * known types, possibly after type adaptation and partial evaluation of + * arguments. Typically used as a bootstrap method for {@code + * invokedynamic} call sites, to support the string concatenation + * feature of the Java Programming Language. + * + *

When the target of the {@code CallSite} returned from this method is + * invoked, it returns the result of String concatenation, taking all + * function arguments and constants passed to the linkage method as inputs for + * concatenation. The target signature is given by {@code concatType}, and + * does not include constants. The arguments are concatenated as per requirements + * stated in JLS 15.18.1 "String Concatenation Operator +". Notably, the inputs + * are converted as per JLS 5.1.11 "String Conversion", and combined from left + * to right. + * + *

The concatenation recipe is a String description for the way to + * construct a concatenated String from the arguments and constants. The + * recipe is processed from left to right, and each character represents an + * input to concatenation. Recipe characters mean: + * + *

    + * + *
  • \1 (Unicode point 0001): an ordinary argument. This + * input is passed through dynamic argument, and is provided during the + * concatenation method invocation. This input can be null.
  • + * + *
  • \2 (Unicode point 0002): a constant. This input passed + * through static bootstrap argument. This constant can be any value + * representable in constant pool. If necessary, the factory would call + * {@code toString} to perform a one-time String conversion.
  • + * + *
  • Any other char value: a single character constant.
  • + *
+ * + *

Assume the linkage arguments are as follows: + * + *

    + *
  • {@code concatType}, describing the {@code CallSite} signature
  • + *
  • {@code recipe}, describing the String recipe
  • + *
  • {@code constants}, the vararg array of constants
  • + *
+ * + *

Then the following linkage invariants must hold: + * + *

    + *
  • The parameter count in {@code concatType} is less than or equal to + * 200
  • + * + *
  • The parameter count in {@code concatType} equals to number of \1 tags + * in {@code recipe}
  • + * + *
  • The return type in {@code concatType} is assignable + * from {@link java.lang.String}, and matches the return type of the + * returned {@link MethodHandle}
  • + * + *
  • The number of elements in {@code constants} equals to number of \2 + * tags in {@code recipe}
  • + *
+ * + * @param lookup Represents a lookup context with the accessibility + * privileges of the caller. When used with {@code + * invokedynamic}, this is stacked automatically by the + * VM. + * @param name The name of the method to implement. This name is + * arbitrary, and has no meaning for this linkage method. + * When used with {@code invokedynamic}, this is provided + * by the {@code NameAndType} of the {@code InvokeDynamic} + * structure and is stacked automatically by the VM. + * @param concatType The expected signature of the {@code CallSite}. The + * parameter types represent the types of dynamic concatenation + * arguments; the return type is always assignable from {@link + * java.lang.String}. When used with {@code + * invokedynamic}, this is provided by the {@code + * NameAndType} of the {@code InvokeDynamic} structure and + * is stacked automatically by the VM. + * @param recipe Concatenation recipe, described above. + * @param constants A vararg parameter representing the constants passed to + * the linkage method. + * @return a CallSite whose target can be used to perform String + * concatenation, with dynamic concatenation arguments described by the given + * {@code concatType}. + * @throws StringConcatException If any of the linkage invariants described + * here are violated. + * @throws NullPointerException If any of the incoming arguments is null, or + * any constant in {@code recipe} is null. + * This will never happen when a bootstrap method + * is called with invokedynamic. + * @apiNote Code generators have three distinct ways to process a constant + * string operand S in a string concatenation expression. First, S can be + * materialized as a reference (using ldc) and passed as an ordinary argument + * (recipe '\1'). Or, S can be stored in the constant pool and passed as a + * constant (recipe '\2') . Finally, if S contains neither of the recipe + * tag characters ('\1', '\2') then S can be interpolated into the recipe + * itself, causing its characters to be inserted into the result. + * + * @jls 5.1.11 String Conversion + * @jls 15.18.1 String Concatenation Operator + + */ + public static CallSite makeConcatWithConstants(MethodHandles.Lookup lookup, + String name, + MethodType concatType, + String recipe, + Object... constants) throws StringConcatException { + if (DEBUG) { + System.out.println("StringConcatFactory " + STRATEGY + " is here for " + concatType + ", {" + recipe + "}, " + Arrays.toString(constants)); + } + + return doStringConcat(lookup, name, concatType, false, recipe, constants); + } + + private static CallSite doStringConcat(MethodHandles.Lookup lookup, + String name, + MethodType concatType, + boolean generateRecipe, + String recipe, + Object... constants) throws StringConcatException { + Objects.requireNonNull(lookup, "Lookup is null"); + Objects.requireNonNull(name, "Name is null"); + Objects.requireNonNull(concatType, "Concat type is null"); + Objects.requireNonNull(constants, "Constants are null"); + + for (Object o : constants) { + Objects.requireNonNull(o, "Cannot accept null constants"); + } + + int cCount = 0; + int oCount = 0; + if (generateRecipe) { + // Mock the recipe to reuse the concat generator code + char[] value = new char[concatType.parameterCount()]; + Arrays.fill(value, TAG_ARG); + recipe = new String(value); + oCount = concatType.parameterCount(); + } else { + Objects.requireNonNull(recipe, "Recipe is null"); + + for (int i = 0; i < recipe.length(); i++) { + char c = recipe.charAt(i); + if (c == TAG_CONST) cCount++; + if (c == TAG_ARG) oCount++; + } + } + + if (oCount != concatType.parameterCount()) { + throw new StringConcatException( + "Mismatched number of concat arguments: recipe wants " + + oCount + + " arguments, but signature provides " + + concatType.parameterCount()); + } + + if (cCount != constants.length) { + throw new StringConcatException( + "Mismatched number of concat constants: recipe wants " + + cCount + + " constants, but only " + + constants.length + + " are passed"); + } + + if (!concatType.returnType().isAssignableFrom(String.class)) { + throw new StringConcatException( + "The return type should be compatible with String, but it is " + + concatType.returnType()); + } + + if (concatType.parameterCount() > MAX_INDY_CONCAT_ARG_SLOTS) { + throw new StringConcatException("Too many concat argument slots: " + + concatType.parameterCount() + + ", can only accept " + + MAX_INDY_CONCAT_ARG_SLOTS); + } + + MethodType mt = adaptType(concatType); + + Recipe rec = new Recipe(recipe, constants); + + MethodHandle mh; + if (CACHE_ENABLE) { + Key key = new Key(mt, rec); + mh = CACHE.get(key); + if (mh == null) { + mh = generate(lookup, mt, rec); + CACHE.put(key, mh); + } + } else { + mh = generate(lookup, mt, rec); + } + return new ConstantCallSite(mh.asType(concatType)); + } + + /** + * Adapt method type to an API we are going to use. + * + * This strips the concrete classes from the signatures, thus preventing + * class leakage when we cache the concatenation stubs. + * + * @param args actual argument types + * @return argument types the strategy is going to use + */ + private static MethodType adaptType(MethodType args) { + Class[] ptypes = args.parameterArray(); + boolean changed = false; + for (int i = 0; i < ptypes.length; i++) { + Class ptype = ptypes[i]; + if (!ptype.isPrimitive() && + ptype != String.class && + ptype != Object.class) { // truncate to Object + ptypes[i] = Object.class; + changed = true; + } + // else other primitives or String or Object (unchanged) + } + return changed + ? MethodType.methodType(args.returnType(), ptypes) + : args; + } + + private static MethodHandle generate(Lookup lookup, MethodType mt, Recipe recipe) throws StringConcatException { + try { + switch (STRATEGY) { + case BC_SB: + return BytecodeStringBuilderStrategy.generate(lookup, mt, recipe, Mode.DEFAULT); + case BC_SB_SIZED: + return BytecodeStringBuilderStrategy.generate(lookup, mt, recipe, Mode.SIZED); + case BC_SB_SIZED_EXACT: + return BytecodeStringBuilderStrategy.generate(lookup, mt, recipe, Mode.SIZED_EXACT); + case MH_SB_SIZED: + return MethodHandleStringBuilderStrategy.generate(mt, recipe, Mode.SIZED); + case MH_SB_SIZED_EXACT: + return MethodHandleStringBuilderStrategy.generate(mt, recipe, Mode.SIZED_EXACT); + case MH_INLINE_SIZED_EXACT: + return MethodHandleInlineCopyStrategy.generate(mt, recipe); + default: + throw new StringConcatException("Concatenation strategy " + STRATEGY + " is not implemented"); + } + } catch (Throwable t) { + throw new StringConcatException("Generator failed", t); + } + } + + private enum Mode { + DEFAULT(false, false), + SIZED(true, false), + SIZED_EXACT(true, true); + + private final boolean sized; + private final boolean exact; + + Mode(boolean sized, boolean exact) { + this.sized = sized; + this.exact = exact; + } + + boolean isSized() { + return sized; + } + + boolean isExact() { + return exact; + } + } + + /** + * Bytecode StringBuilder strategy. + * + *

This strategy operates in three modes, gated by {@link Mode}. + * + *

{@link Strategy#BC_SB}: "bytecode StringBuilder". + * + *

This strategy spins up the bytecode that has the same StringBuilder + * chain javac would otherwise emit. This strategy uses only the public API, + * and comes as the baseline for the current JDK behavior. On other words, + * this strategy moves the javac generated bytecode to runtime. The + * generated bytecode is loaded via Unsafe.defineAnonymousClass, but with + * the caller class coming from the BSM -- in other words, the protection + * guarantees are inherited from the method where invokedynamic was + * originally called. This means, among other things, that the bytecode is + * verified for all non-JDK uses. + * + *

{@link Strategy#BC_SB_SIZED}: "bytecode StringBuilder, but + * sized". + * + *

This strategy acts similarly to {@link Strategy#BC_SB}, but it also + * tries to guess the capacity required for StringBuilder to accept all + * arguments without resizing. This strategy only makes an educated guess: + * it only guesses the space required for known types (e.g. primitives and + * Strings), but does not otherwise convert arguments. Therefore, the + * capacity estimate may be wrong, and StringBuilder may have to + * transparently resize or trim when doing the actual concatenation. While + * this does not constitute a correctness issue (in the end, that what BC_SB + * has to do anyway), this does pose a potential performance problem. + * + *

{@link Strategy#BC_SB_SIZED_EXACT}: "bytecode StringBuilder, but + * sized exactly". + * + *

This strategy improves on @link Strategy#BC_SB_SIZED}, by first + * converting all arguments to String in order to get the exact capacity + * StringBuilder should have. The conversion is done via the public + * String.valueOf and/or Object.toString methods, and does not touch any + * private String API. + */ + private static final class BytecodeStringBuilderStrategy { + static final Unsafe UNSAFE = Unsafe.getUnsafe(); + static final int CLASSFILE_VERSION = 52; + static final String NAME_FACTORY = "concat"; + static final String CLASS_NAME = "java/lang/String$Concat"; + + private BytecodeStringBuilderStrategy() { + // no instantiation + } + + private static MethodHandle generate(MethodHandles.Lookup lookup, MethodType args, Recipe recipe, Mode mode) throws Exception { + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES); + + cw.visit(CLASSFILE_VERSION, + ACC_SUPER + ACC_PUBLIC + ACC_FINAL + ACC_SYNTHETIC, + CLASS_NAME, + null, + "java/lang/Object", + null + ); + + MethodVisitor mv = cw.visitMethod( + ACC_PUBLIC + ACC_STATIC + ACC_FINAL, + NAME_FACTORY, + args.toMethodDescriptorString(), + null, + null); + + mv.visitAnnotation("Ljdk/internal/vm/annotation/ForceInline;", true); + mv.visitCode(); + + Class[] arr = args.parameterArray(); + boolean[] guaranteedNonNull = new boolean[arr.length]; + + if (mode.isExact()) { + /* + In exact mode, we need to convert all arguments to their String representations, + as this allows to compute their String sizes exactly. We cannot use private + methods for primitives in here, therefore we need to convert those as well. + + We also record what arguments are guaranteed to be non-null as the result + of the conversion. String.valueOf does the null checks for us. The only + corner case to take care of is String.valueOf(Object) returning null itself. + + Also, if any conversion happened, then the slot indices in the incoming + arguments are not equal to the final local maps. The only case this may break + is when converting 2-slot long/double argument to 1-slot String. Therefore, + we get away with tracking modified offset, since no conversion can overwrite + the upcoming the argument. + */ + + int off = 0; + int modOff = 0; + for (int c = 0; c < arr.length; c++) { + Class cl = arr[c]; + if (cl == String.class) { + if (off != modOff) { + mv.visitIntInsn(getLoadOpcode(cl), off); + mv.visitIntInsn(ASTORE, modOff); + } + } else { + mv.visitIntInsn(getLoadOpcode(cl), off); + mv.visitMethodInsn( + INVOKESTATIC, + "java/lang/String", + "valueOf", + getStringValueOfDesc(cl), + false + ); + mv.visitIntInsn(ASTORE, modOff); + arr[c] = String.class; + guaranteedNonNull[c] = cl.isPrimitive(); + } + off += getParameterSize(cl); + modOff += getParameterSize(String.class); + } + } + + if (mode.isSized()) { + /* + When operating in sized mode (this includes exact mode), it makes sense to make + StringBuilder append chains look familiar to OptimizeStringConcat. For that, we + need to do null-checks early, not make the append chain shape simpler. + */ + + int off = 0; + for (RecipeElement el : recipe.getElements()) { + switch (el.getTag()) { + case CONST: { + // Guaranteed non-null, no null check required. + break; + } + case ARG: { + // Null-checks are needed only for String arguments, and when a previous stage + // did not do implicit null-checks. If a String is null, we eagerly replace it + // with "null" constant. Note, we omit Objects here, because we don't call + // .length() on them down below. + int ac = el.getArgPos(); + Class cl = arr[ac]; + if (cl == String.class && !guaranteedNonNull[ac]) { + Label l0 = new Label(); + mv.visitIntInsn(ALOAD, off); + mv.visitJumpInsn(IFNONNULL, l0); + mv.visitLdcInsn("null"); + mv.visitIntInsn(ASTORE, off); + mv.visitLabel(l0); + } + off += getParameterSize(cl); + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + } + } + + // Prepare StringBuilder instance + mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); + mv.visitInsn(DUP); + + if (mode.isSized()) { + /* + Sized mode requires us to walk through the arguments, and estimate the final length. + In exact mode, this will operate on Strings only. This code would accumulate the + final length on stack. + */ + int len = 0; + int off = 0; + + mv.visitInsn(ICONST_0); + + for (RecipeElement el : recipe.getElements()) { + switch (el.getTag()) { + case CONST: { + Object cnst = el.getValue(); + len += cnst.toString().length(); + break; + } + case ARG: { + /* + If an argument is String, then we can call .length() on it. Sized/Exact modes have + converted arguments for us. If an argument is primitive, we can provide a guess + for its String representation size. + */ + Class cl = arr[el.getArgPos()]; + if (cl == String.class) { + mv.visitIntInsn(ALOAD, off); + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/String", + "length", + "()I", + false + ); + mv.visitInsn(IADD); + } else if (cl.isPrimitive()) { + len += estimateSize(cl); + } + off += getParameterSize(cl); + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + } + + // Constants have non-zero length, mix in + if (len > 0) { + iconst(mv, len); + mv.visitInsn(IADD); + } + + mv.visitMethodInsn( + INVOKESPECIAL, + "java/lang/StringBuilder", + "", + "(I)V", + false + ); + } else { + mv.visitMethodInsn( + INVOKESPECIAL, + "java/lang/StringBuilder", + "", + "()V", + false + ); + } + + // At this point, we have a blank StringBuilder on stack, fill it in with .append calls. + { + int off = 0; + for (RecipeElement el : recipe.getElements()) { + String desc; + switch (el.getTag()) { + case CONST: { + Object cnst = el.getValue(); + mv.visitLdcInsn(cnst); + desc = getSBAppendDesc(cnst.getClass()); + break; + } + case ARG: { + Class cl = arr[el.getArgPos()]; + mv.visitVarInsn(getLoadOpcode(cl), off); + off += getParameterSize(cl); + desc = getSBAppendDesc(cl); + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/StringBuilder", + "append", + desc, + false + ); + } + } + + if (DEBUG && mode.isExact()) { + /* + Exactness checks compare the final StringBuilder.capacity() with a resulting + String.length(). If these values disagree, that means StringBuilder had to perform + storage trimming, which defeats the purpose of exact strategies. + */ + + mv.visitInsn(DUP); + + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/StringBuilder", + "capacity", + "()I", + false + ); + + mv.visitIntInsn(ISTORE, 0); + + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/StringBuilder", + "toString", + "()Ljava/lang/String;", + false + ); + + mv.visitInsn(DUP); + + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/String", + "length", + "()I", + false + ); + + mv.visitIntInsn(ILOAD, 0); + + Label l0 = new Label(); + mv.visitJumpInsn(IF_ICMPEQ, l0); + + mv.visitTypeInsn(NEW, "java/lang/AssertionError"); + mv.visitInsn(DUP); + mv.visitLdcInsn("Failed exactness check"); + mv.visitMethodInsn(INVOKESPECIAL, + "java/lang/AssertionError", + "", + "(Ljava/lang/Object;)V", + false); + mv.visitInsn(ATHROW); + + mv.visitLabel(l0); + } else { + mv.visitMethodInsn( + INVOKEVIRTUAL, + "java/lang/StringBuilder", + "toString", + "()Ljava/lang/String;", + false + ); + } + + mv.visitInsn(ARETURN); + + mv.visitMaxs(-1, -1); + mv.visitEnd(); + cw.visitEnd(); + + Class targetClass = lookup.lookupClass(); + final byte[] classBytes = cw.toByteArray(); + final Class innerClass = UNSAFE.defineAnonymousClass(targetClass, classBytes, null); + + try { + UNSAFE.ensureClassInitialized(innerClass); + return lookup.findStatic(innerClass, NAME_FACTORY, args); + } catch (ReflectiveOperationException e) { + throw new StringConcatException("Exception finding constructor", e); + } + } + + private static String getSBAppendDesc(Class cl) { + if (cl.isPrimitive()) { + if (cl == Integer.TYPE || cl == Byte.TYPE || cl == Short.TYPE) { + return "(I)Ljava/lang/StringBuilder;"; + } else if (cl == Boolean.TYPE) { + return "(Z)Ljava/lang/StringBuilder;"; + } else if (cl == Character.TYPE) { + return "(C)Ljava/lang/StringBuilder;"; + } else if (cl == Double.TYPE) { + return "(D)Ljava/lang/StringBuilder;"; + } else if (cl == Float.TYPE) { + return "(F)Ljava/lang/StringBuilder;"; + } else if (cl == Long.TYPE) { + return "(J)Ljava/lang/StringBuilder;"; + } else { + throw new IllegalStateException("Unhandled primitive StringBuilder.append: " + cl); + } + } else if (cl == String.class) { + return "(Ljava/lang/String;)Ljava/lang/StringBuilder;"; + } else { + return "(Ljava/lang/Object;)Ljava/lang/StringBuilder;"; + } + } + + private static String getStringValueOfDesc(Class cl) { + if (cl.isPrimitive()) { + if (cl == Integer.TYPE || cl == Byte.TYPE || cl == Short.TYPE) { + return "(I)Ljava/lang/String;"; + } else if (cl == Boolean.TYPE) { + return "(Z)Ljava/lang/String;"; + } else if (cl == Character.TYPE) { + return "(C)Ljava/lang/String;"; + } else if (cl == Double.TYPE) { + return "(D)Ljava/lang/String;"; + } else if (cl == Float.TYPE) { + return "(F)Ljava/lang/String;"; + } else if (cl == Long.TYPE) { + return "(J)Ljava/lang/String;"; + } else { + throw new IllegalStateException("Unhandled String.valueOf: " + cl); + } + } else if (cl == String.class) { + return "(Ljava/lang/String;)Ljava/lang/String;"; + } else { + return "(Ljava/lang/Object;)Ljava/lang/String;"; + } + } + + /** + * The following method is copied from + * org.objectweb.asm.commons.InstructionAdapter. Part of ASM: a very small + * and fast Java bytecode manipulation framework. + * Copyright (c) 2000-2005 INRIA, France Telecom All rights reserved. + */ + private static void iconst(MethodVisitor mv, final int cst) { + if (cst >= -1 && cst <= 5) { + mv.visitInsn(Opcodes.ICONST_0 + cst); + } else if (cst >= Byte.MIN_VALUE && cst <= Byte.MAX_VALUE) { + mv.visitIntInsn(Opcodes.BIPUSH, cst); + } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) { + mv.visitIntInsn(Opcodes.SIPUSH, cst); + } else { + mv.visitLdcInsn(cst); + } + } + + private static int getLoadOpcode(Class c) { + if (c == Void.TYPE) { + throw new InternalError("Unexpected void type of load opcode"); + } + return ILOAD + getOpcodeOffset(c); + } + + private static int getOpcodeOffset(Class c) { + if (c.isPrimitive()) { + if (c == Long.TYPE) { + return 1; + } else if (c == Float.TYPE) { + return 2; + } else if (c == Double.TYPE) { + return 3; + } + return 0; + } else { + return 4; + } + } + + private static int getParameterSize(Class c) { + if (c == Void.TYPE) { + return 0; + } else if (c == Long.TYPE || c == Double.TYPE) { + return 2; + } + return 1; + } + } + + /** + * MethodHandle StringBuilder strategy. + * + *

This strategy operates in two modes, gated by {@link Mode}. + * + *

{@link Strategy#MH_SB_SIZED}: "MethodHandles StringBuilder, + * sized". + * + *

This strategy avoids spinning up the bytecode by building the + * computation on MethodHandle combinators. The computation is built with + * public MethodHandle APIs, resolved from a public Lookup sequence, and + * ends up calling the public StringBuilder API. Therefore, this strategy + * does not use any private API at all, even the Unsafe.defineAnonymousClass, + * since everything is handled under cover by java.lang.invoke APIs. + * + *

{@link Strategy#MH_SB_SIZED_EXACT}: "MethodHandles StringBuilder, + * sized exactly". + * + *

This strategy improves on @link Strategy#MH_SB_SIZED}, by first + * converting all arguments to String in order to get the exact capacity + * StringBuilder should have. The conversion is done via the public + * String.valueOf and/or Object.toString methods, and does not touch any + * private String API. + */ + private static final class MethodHandleStringBuilderStrategy { + + private MethodHandleStringBuilderStrategy() { + // no instantiation + } + + private static MethodHandle generate(MethodType mt, Recipe recipe, Mode mode) throws Exception { + int pc = mt.parameterCount(); + + Class[] ptypes = mt.parameterArray(); + MethodHandle[] filters = new MethodHandle[ptypes.length]; + for (int i = 0; i < ptypes.length; i++) { + MethodHandle filter; + switch (mode) { + case SIZED: + // In sized mode, we convert all references and floats/doubles + // to String: there is no specialization for different + // classes in StringBuilder API, and it will convert to + // String internally anyhow. + filter = Stringifiers.forMost(ptypes[i]); + break; + case SIZED_EXACT: + // In exact mode, we convert everything to String: + // this helps to compute the storage exactly. + filter = Stringifiers.forAny(ptypes[i]); + break; + default: + throw new StringConcatException("Not supported"); + } + if (filter != null) { + filters[i] = filter; + ptypes[i] = filter.type().returnType(); + } + } + + List> ptypesList = Arrays.asList(ptypes); + MethodHandle[] lengthers = new MethodHandle[pc]; + + // Figure out lengths: constants' lengths can be deduced on the spot. + // All reference arguments were filtered to String in the combinators below, so we can + // call the usual String.length(). Primitive values string sizes can be estimated. + int initial = 0; + for (RecipeElement el : recipe.getElements()) { + switch (el.getTag()) { + case CONST: { + Object cnst = el.getValue(); + initial += cnst.toString().length(); + break; + } + case ARG: { + final int i = el.getArgPos(); + Class type = ptypesList.get(i); + if (type.isPrimitive()) { + MethodHandle est = MethodHandles.constant(int.class, estimateSize(type)); + est = MethodHandles.dropArguments(est, 0, type); + lengthers[i] = est; + } else { + lengthers[i] = STRING_LENGTH; + } + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + } + + // Create (StringBuilder, ) shape for appending: + MethodHandle builder = MethodHandles.dropArguments(MethodHandles.identity(StringBuilder.class), 1, ptypesList); + + // Compose append calls. This is done in reverse because the application order is + // reverse as well. + for (RecipeElement el : recipe.getElementsReversed()) { + MethodHandle appender; + switch (el.getTag()) { + case CONST: { + Object constant = el.getValue(); + MethodHandle mh = appender(adaptToStringBuilder(constant.getClass())); + appender = MethodHandles.insertArguments(mh, 1, constant); + break; + } + case ARG: { + int ac = el.getArgPos(); + appender = appender(ptypesList.get(ac)); + + // Insert dummy arguments to match the prefix in the signature. + // The actual appender argument will be the ac-ith argument. + if (ac != 0) { + appender = MethodHandles.dropArguments(appender, 1, ptypesList.subList(0, ac)); + } + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + builder = MethodHandles.foldArguments(builder, appender); + } + + // Build the sub-tree that adds the sizes and produces a StringBuilder: + + // a) Start with the reducer that accepts all arguments, plus one + // slot for the initial value. Inject the initial value right away. + // This produces ()int shape: + MethodHandle sum = getReducerFor(pc + 1); + MethodHandle adder = MethodHandles.insertArguments(sum, 0, initial); + + // b) Apply lengthers to transform arguments to lengths, producing ()int + adder = MethodHandles.filterArguments(adder, 0, lengthers); + + // c) Instantiate StringBuilder ()int -> ()StringBuilder + MethodHandle newBuilder = MethodHandles.filterReturnValue(adder, NEW_STRING_BUILDER); + + // d) Fold in StringBuilder constructor, this produces ()StringBuilder + MethodHandle mh = MethodHandles.foldArguments(builder, newBuilder); + + // Convert non-primitive arguments to Strings + mh = MethodHandles.filterArguments(mh, 0, filters); + + // Convert ()StringBuilder to ()String + if (DEBUG && mode.isExact()) { + mh = MethodHandles.filterReturnValue(mh, BUILDER_TO_STRING_CHECKED); + } else { + mh = MethodHandles.filterReturnValue(mh, BUILDER_TO_STRING); + } + + return mh; + } + + private static MethodHandle getReducerFor(int cnt) { + return SUMMERS.computeIfAbsent(cnt, SUMMER); + } + + private static MethodHandle appender(Class appendType) { + MethodHandle appender = lookupVirtual(MethodHandles.publicLookup(), StringBuilder.class, "append", + StringBuilder.class, adaptToStringBuilder(appendType)); + + // appenders should return void, this would not modify the target signature during folding + MethodType nt = MethodType.methodType(void.class, StringBuilder.class, appendType); + return appender.asType(nt); + } + + private static String toStringChecked(StringBuilder sb) { + String s = sb.toString(); + if (s.length() != sb.capacity()) { + throw new AssertionError("Exactness check failed: result length = " + s.length() + ", buffer capacity = " + sb.capacity()); + } + return s; + } + + private static int sum(int v1, int v2) { + return v1 + v2; + } + + private static int sum(int v1, int v2, int v3) { + return v1 + v2 + v3; + } + + private static int sum(int v1, int v2, int v3, int v4) { + return v1 + v2 + v3 + v4; + } + + private static int sum(int v1, int v2, int v3, int v4, int v5) { + return v1 + v2 + v3 + v4 + v5; + } + + private static int sum(int v1, int v2, int v3, int v4, int v5, int v6) { + return v1 + v2 + v3 + v4 + v5 + v6; + } + + private static int sum(int v1, int v2, int v3, int v4, int v5, int v6, int v7) { + return v1 + v2 + v3 + v4 + v5 + v6 + v7; + } + + private static int sum(int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8) { + return v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8; + } + + private static int sum(int initial, int[] vs) { + int sum = initial; + for (int v : vs) { + sum += v; + } + return sum; + } + + private static final ConcurrentMap SUMMERS; + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function SUMMER = new Function() { + @Override + public MethodHandle apply(Integer cnt) { + if (cnt == 1) { + return MethodHandles.identity(int.class); + } else if (cnt <= 8) { + // Variable-arity collectors are not as efficient as small-count methods, + // unroll some initial sizes. + Class[] cls = new Class[cnt]; + Arrays.fill(cls, int.class); + return lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleStringBuilderStrategy.class, "sum", int.class, cls); + } else { + return lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleStringBuilderStrategy.class, "sum", int.class, int.class, int[].class) + .asCollector(int[].class, cnt - 1); + } + } + }; + + private static final MethodHandle NEW_STRING_BUILDER, STRING_LENGTH, BUILDER_TO_STRING, BUILDER_TO_STRING_CHECKED; + + static { + SUMMERS = new ConcurrentHashMap<>(); + Lookup publicLookup = MethodHandles.publicLookup(); + NEW_STRING_BUILDER = lookupConstructor(publicLookup, StringBuilder.class, int.class); + STRING_LENGTH = lookupVirtual(publicLookup, String.class, "length", int.class); + BUILDER_TO_STRING = lookupVirtual(publicLookup, StringBuilder.class, "toString", String.class); + if (DEBUG) { + BUILDER_TO_STRING_CHECKED = lookupStatic(MethodHandles.Lookup.IMPL_LOOKUP, + MethodHandleStringBuilderStrategy.class, "toStringChecked", String.class, StringBuilder.class); + } else { + BUILDER_TO_STRING_CHECKED = null; + } + } + + } + + + /** + *

{@link Strategy#MH_INLINE_SIZED_EXACT}: "MethodHandles inline, + * sized exactly". + * + *

This strategy replicates what StringBuilders are doing: it builds the + * byte[] array on its own and passes that byte[] array to String + * constructor. This strategy requires access to some private APIs in JDK, + * most notably, the read-only Integer/Long.stringSize methods that measure + * the character length of the integers, and the private String constructor + * that accepts byte[] arrays without copying. While this strategy assumes a + * particular implementation details for String, this opens the door for + * building a very optimal concatenation sequence. This is the only strategy + * that requires porting if there are private JDK changes occur. + */ + private static final class MethodHandleInlineCopyStrategy { + + private MethodHandleInlineCopyStrategy() { + // no instantiation + } + + static MethodHandle generate(MethodType mt, Recipe recipe) throws Throwable { + + // Create filters and obtain filtered parameter types. Filters would be used in the beginning + // to convert the incoming arguments into the arguments we can process (e.g. Objects -> Strings). + // The filtered argument type list is used all over in the combinators below. + Class[] ptypes = mt.parameterArray(); + MethodHandle[] filters = null; + for (int i = 0; i < ptypes.length; i++) { + MethodHandle filter = Stringifiers.forMost(ptypes[i]); + if (filter != null) { + if (filters == null) { + filters = new MethodHandle[ptypes.length]; + } + filters[i] = filter; + ptypes[i] = filter.type().returnType(); + } + } + List> ptypesList = Arrays.asList(ptypes); + + // Start building the combinator tree. The tree "starts" with ()String, and "finishes" + // with the (int, byte[], byte)String in String helper. The combinators are assembled bottom-up, + // which makes the code arguably hard to read. + + // Drop all remaining parameter types, leave only helper arguments: + MethodHandle mh; + + mh = MethodHandles.dropArguments(NEW_STRING, 2, ptypes); + mh = MethodHandles.dropArguments(mh, 0, int.class); + + // In debug mode, check that remaining index is zero. + if (DEBUG) { + mh = MethodHandles.filterArgument(mh, 0, CHECK_INDEX); + } + + // Mix in prependers. This happens when (int, byte[], byte) = (index, storage, coder) is already + // known from the combinators below. We are assembling the string backwards, so "index" is the + // *ending* index. + for (RecipeElement el : recipe.getElements()) { + MethodHandle prepender; + switch (el.getTag()) { + case CONST: { + Object cnst = el.getValue(); + prepender = MethodHandles.insertArguments(prepender(cnst.getClass()), 3, cnst); + break; + } + case ARG: { + int pos = el.getArgPos(); + prepender = selectArgument(prepender(ptypesList.get(pos)), 3, ptypesList, pos); + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + + // Remove "old" index from arguments + mh = MethodHandles.dropArguments(mh, 1, int.class); + + // Do the prepend, and put "new" index at index 0 + mh = MethodHandles.foldArguments(mh, prepender); + } + + // Prepare the argument list for prepending. The tree below would instantiate + // the storage byte[] into argument 0, so we need to swap "storage" and "index". + // The index at this point equals to "size", and resides at argument 1. + { + MethodType nmt = mh.type() + .changeParameterType(0, byte[].class) + .changeParameterType(1, int.class); + mh = MethodHandles.permuteArguments(mh, nmt, swap10(nmt.parameterCount())); + } + + // Fold in byte[] instantiation at argument 0. + MethodHandle combiner = MethodHandles.dropArguments(NEW_ARRAY, 2, ptypesList); + mh = MethodHandles.foldArguments(mh, combiner); + + // Start combining length and coder mixers. + // + // Length is easy: constant lengths can be computed on the spot, and all non-constant + // shapes have been either converted to Strings, or explicit methods for getting the + // string length out of primitives are provided. + // + // Coders are more interesting. Only Object, String and char arguments (and constants) + // can have non-Latin1 encoding. It is easier to blindly convert constants to String, + // and deduce the coder from there. Arguments would be either converted to Strings + // during the initial filtering, or handled by primitive specializations in CODER_MIXERS. + // + // The method handle shape after all length and coder mixers is: + // (int, byte, )String = ("index", "coder", ) + byte initialCoder = 0; // initial coder + int initialLen = 0; // initial length, in characters + for (RecipeElement el : recipe.getElements()) { + switch (el.getTag()) { + case CONST: { + Object constant = el.getValue(); + String s = constant.toString(); + initialCoder = (byte) coderMixer(String.class).invoke(initialCoder, s); + initialLen += s.length(); + break; + } + case ARG: { + int ac = el.getArgPos(); + + Class argClass = ptypesList.get(ac); + MethodHandle lm = selectArgument(lengthMixer(argClass), 1, ptypesList, ac); + lm = MethodHandles.dropArguments(lm, 0, byte.class); // (*) + lm = MethodHandles.dropArguments(lm, 2, byte.class); + + MethodHandle cm = selectArgument(coderMixer(argClass), 1, ptypesList, ac); + cm = MethodHandles.dropArguments(cm, 0, int.class); // (**) + + // Read this bottom up: + + // 4. Drop old index and coder, producing ("new-index", "new-coder", ) + mh = MethodHandles.dropArguments(mh, 2, int.class, byte.class); + + // 3. Compute "new-index", producing ("new-index", "new-coder", "old-index", "old-coder", ) + // Length mixer ignores both "new-coder" and "old-coder" due to dropArguments above (*) + mh = MethodHandles.foldArguments(mh, lm); + + // 2. Compute "new-coder", producing ("new-coder", "old-index", "old-coder", ) + // Coder mixer ignores the "old-index" arg due to dropArguments above (**) + mh = MethodHandles.foldArguments(mh, cm); + + // 1. The mh shape here is ("old-index", "old-coder", ) + break; + } + default: + throw new StringConcatException("Unhandled tag: " + el.getTag()); + } + } + + // Insert initial lengths and coders here. + // The method handle shape here is (). + mh = MethodHandles.insertArguments(mh, 0, initialLen, initialCoder); + + // Apply filters, converting the arguments: + if (filters != null) { + mh = MethodHandles.filterArguments(mh, 0, filters); + } + + return mh; + } + + private static int[] swap10(int count) { + int[] perm = new int[count]; + perm[0] = 1; + perm[1] = 0; + for (int i = 2; i < count; i++) { + perm[i] = i; + } + return perm; + } + + // Adapts: (...prefix..., parameter[pos])R -> (...prefix..., ...parameters...)R + private static MethodHandle selectArgument(MethodHandle mh, int prefix, List> ptypes, int pos) { + if (pos == 0) { + return MethodHandles.dropArguments(mh, prefix + 1, ptypes.subList(1, ptypes.size())); + } else if (pos == ptypes.size() - 1) { + return MethodHandles.dropArguments(mh, prefix, ptypes.subList(0, ptypes.size() - 1)); + } else { // 0 < pos < ptypes.size() - 1 + MethodHandle t = MethodHandles.dropArguments(mh, prefix, ptypes.subList(0, pos)); + return MethodHandles.dropArguments(t, prefix + 1 + pos, ptypes.subList(pos + 1, ptypes.size())); + } + } + + @ForceInline + private static byte[] newArray(int length, byte coder) { + return new byte[length << coder]; + } + + @ForceInline + private static int checkIndex(int index) { + if (index != 0) { + throw new AssertionError("Exactness check failed: " + index + " characters left in the buffer."); + } + return index; + } + + private static MethodHandle prepender(Class cl) { + return PREPENDERS.computeIfAbsent(cl, PREPEND); + } + + private static MethodHandle coderMixer(Class cl) { + return CODER_MIXERS.computeIfAbsent(cl, CODER_MIX); + } + + private static MethodHandle lengthMixer(Class cl) { + return LENGTH_MIXERS.computeIfAbsent(cl, LENGTH_MIX); + } + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function, MethodHandle> PREPEND = new Function, MethodHandle>() { + @Override + public MethodHandle apply(Class c) { + return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "prepend", int.class, int.class, byte[].class, byte.class, c); + } + }; + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function, MethodHandle> CODER_MIX = new Function, MethodHandle>() { + @Override + public MethodHandle apply(Class c) { + return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixCoder", byte.class, byte.class, c); + } + }; + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function, MethodHandle> LENGTH_MIX = new Function, MethodHandle>() { + @Override + public MethodHandle apply(Class c) { + return lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "mixLen", int.class, int.class, c); + } + }; + + private static final MethodHandle NEW_STRING; + private static final MethodHandle CHECK_INDEX; + private static final MethodHandle NEW_ARRAY; + private static final ConcurrentMap, MethodHandle> PREPENDERS; + private static final ConcurrentMap, MethodHandle> LENGTH_MIXERS; + private static final ConcurrentMap, MethodHandle> CODER_MIXERS; + private static final Class STRING_HELPER; + + static { + try { + STRING_HELPER = Class.forName("java.lang.StringConcatHelper"); + } catch (ClassNotFoundException e) { + throw new AssertionError(e); + } + + PREPENDERS = new ConcurrentHashMap<>(); + LENGTH_MIXERS = new ConcurrentHashMap<>(); + CODER_MIXERS = new ConcurrentHashMap<>(); + + NEW_STRING = lookupStatic(Lookup.IMPL_LOOKUP, STRING_HELPER, "newString", String.class, byte[].class, byte.class); + NEW_ARRAY = lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleInlineCopyStrategy.class, "newArray", byte[].class, int.class, byte.class); + + if (DEBUG) { + CHECK_INDEX = lookupStatic(Lookup.IMPL_LOOKUP, MethodHandleInlineCopyStrategy.class, "checkIndex", int.class, int.class); + } else { + CHECK_INDEX = null; + } + } + } + + /** + * Public gateways to public "stringify" methods. These methods have the form String apply(T obj), and normally + * delegate to {@code String.valueOf}, depending on argument's type. + */ + private static final class Stringifiers { + private Stringifiers() { + // no instantiation + } + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function, MethodHandle> MOST = new Function, MethodHandle>() { + @Override + public MethodHandle apply(Class cl) { + MethodHandle mhObject = lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, Object.class); + + // We need the additional conversion here, because String.valueOf(Object) may return null. + // String conversion rules in Java state we need to produce "null" String in this case. + // It can be easily done with applying valueOf the second time. + MethodHandle mhObjectNoNulls = MethodHandles.filterReturnValue(mhObject, + mhObject.asType(MethodType.methodType(String.class, String.class))); + + if (cl == String.class) { + return mhObject; + } else if (cl == float.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, float.class); + } else if (cl == double.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, double.class); + } else if (!cl.isPrimitive()) { + return mhObjectNoNulls; + } + + return null; + } + }; + + // This one is deliberately non-lambdified to optimize startup time: + private static final Function, MethodHandle> ANY = new Function, MethodHandle>() { + @Override + public MethodHandle apply(Class cl) { + MethodHandle mh = MOST.apply(cl); + if (mh != null) { + return mh; + } + + if (cl == byte.class || cl == short.class || cl == int.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, int.class); + } else if (cl == boolean.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, boolean.class); + } else if (cl == char.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, char.class); + } else if (cl == long.class) { + return lookupStatic(Lookup.PUBLIC_LOOKUP, String.class, "valueOf", String.class, long.class); + } else { + throw new IllegalStateException("Unknown class: " + cl); + } + } + }; + + private static final ConcurrentMap, MethodHandle> STRINGIFIERS_MOST = new ConcurrentHashMap<>(); + private static final ConcurrentMap, MethodHandle> STRINGIFIERS_ANY = new ConcurrentHashMap<>(); + + /** + * Returns a stringifier for references and floats/doubles only. + * Always returns null for other primitives. + * + * @param t class to stringify + * @return stringifier; null, if not available + */ + static MethodHandle forMost(Class t) { + return STRINGIFIERS_MOST.computeIfAbsent(t, MOST); + } + + /** + * Returns a stringifier for any type. Never returns null. + * + * @param t class to stringify + * @return stringifier + */ + static MethodHandle forAny(Class t) { + return STRINGIFIERS_ANY.computeIfAbsent(t, ANY); + } + } + + /* ------------------------------- Common utilities ------------------------------------ */ + + private static MethodHandle lookupStatic(Lookup lookup, Class refc, String name, Class rtype, Class... ptypes) { + try { + return lookup.findStatic(refc, name, MethodType.methodType(rtype, ptypes)); + } catch (NoSuchMethodException | IllegalAccessException e) { + throw new AssertionError(e); + } + } + + private static MethodHandle lookupVirtual(Lookup lookup, Class refc, String name, Class rtype, Class... ptypes) { + try { + return lookup.findVirtual(refc, name, MethodType.methodType(rtype, ptypes)); + } catch (NoSuchMethodException | IllegalAccessException e) { + throw new AssertionError(e); + } + } + + private static MethodHandle lookupConstructor(Lookup lookup, Class refc, Class ptypes) { + try { + return lookup.findConstructor(refc, MethodType.methodType(void.class, ptypes)); + } catch (NoSuchMethodException | IllegalAccessException e) { + throw new AssertionError(e); + } + } + + private static int estimateSize(Class cl) { + if (cl == Integer.TYPE) { + return 11; // "-2147483648" + } else if (cl == Boolean.TYPE) { + return 5; // "false" + } else if (cl == Byte.TYPE) { + return 4; // "-128" + } else if (cl == Character.TYPE) { + return 1; // duh + } else if (cl == Short.TYPE) { + return 6; // "-32768" + } else if (cl == Double.TYPE) { + return 26; // apparently, no larger than this, see FloatingDecimal.BinaryToASCIIBuffer.buffer + } else if (cl == Float.TYPE) { + return 26; // apparently, no larger than this, see FloatingDecimal.BinaryToASCIIBuffer.buffer + } else if (cl == Long.TYPE) { + return 20; // "-9223372036854775808" + } else { + throw new IllegalArgumentException("Cannot estimate the size for " + cl); + } + } + + private static Class adaptToStringBuilder(Class c) { + if (c.isPrimitive()) { + if (c == Byte.TYPE || c == Short.TYPE) { + return int.class; + } + } else { + if (c != String.class) { + return Object.class; + } + } + return c; + } + + private StringConcatFactory() { + // no instantiation + } + +} diff --git a/jdk/test/com/sun/jdi/LineNumberInfo.java b/jdk/test/com/sun/jdi/LineNumberInfo.java index c5166da0c43..5b7ff743efa 100644 --- a/jdk/test/com/sun/jdi/LineNumberInfo.java +++ b/jdk/test/com/sun/jdi/LineNumberInfo.java @@ -29,7 +29,7 @@ * * @modules jdk.jdi * @run build TestScaffold VMConnection TargetListener TargetAdapter - * @run compile -g LineNumberInfo.java ControlFlow.java + * @run compile -XDstringConcat=inline -g LineNumberInfo.java ControlFlow.java * * @run driver LineNumberInfo */ diff --git a/jdk/test/com/sun/jdi/sde/InstallSDE.java b/jdk/test/com/sun/jdi/sde/InstallSDE.java index 81bb3052778..17f6558760d 100644 --- a/jdk/test/com/sun/jdi/sde/InstallSDE.java +++ b/jdk/test/com/sun/jdi/sde/InstallSDE.java @@ -253,12 +253,16 @@ class InstallSDE { case 3: // Integer case 4: // Float case 12: // NameAndType + case 18: // InvokeDynamic copy(4); break; case 5: // Long case 6: // Double copy(8); break; + case 15: // MethodHandle + copy(3); + break; case 1: // Utf8 int len = readU2(); writeU2(len); diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcat.java b/jdk/test/java/lang/String/concat/ImplicitStringConcat.java new file mode 100644 index 00000000000..5eb78602498 --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcat.java @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary test implicit String concatenations + * + * @compile ImplicitStringConcat.java + * @run main/othervm ImplicitStringConcat + * + * @compile -XDstringConcat=inline ImplicitStringConcat.java + * @run main/othervm ImplicitStringConcat + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcat.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcat + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcat.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcat + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcat + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcat +*/ +import java.lang.StringBuilder; + +public class ImplicitStringConcat { + + static boolean b = true; + static byte by = 42; + static short sh = 42; + static char ch = 'a'; + static int i = 42; + static float fl = 42.0f; + static long l = 42; + static double d = 42.0d; + static String s = "foo"; + static String sNull = null; + static Object o = "bar"; + static Object oNull = null; + static CharSequence cs = "bar"; + static char[] chars = new char[] {'a'}; + + static MyClass myCl = new MyClass(); + static MyClassNull myClNull = new MyClassNull(); + static Object myCl2 = new MyClass(); + static Object[] myArr = new Object[] { myCl }; + static final Object[] s_myArr = new Object[] { myCl }; + + static StringBuffer sb = new StringBuffer("a"); + + public static void main(String[] args) throws Exception { + + test("footrue", s + b); + test("foo42", s + by); + test("foo42", s + sh); + test("fooa", s + ch); + test("foo42", s + i); + test("foo42", s + l); + test("foo42.0", s + fl); + test("foo42.0", s + d); + test("foofoo", s + s); + test("foonull", s + sNull); + test("foobar", s + o); + test("foonull", s + oNull); + test("foobar", s + cs); + + { + StringBuilder sb = new StringBuilder(); + sb.append("foo"); + sb.append(myArr.toString()); + test(sb.toString(), s + myArr); + } + + { + StringBuilder sb = new StringBuilder(); + sb.append("foo"); + sb.append(s_myArr.toString()); + test(sb.toString(), s + s_myArr); + } + + { + StringBuilder sb = new StringBuilder(); + sb.append("foo[C@"); + sb.append(Integer.toHexString(System.identityHashCode(chars))); + test(sb.toString(), s + chars); + } + + test("fooa", s + ImplicitStringConcat.sb); + test("foonull", s + null); + test("fooMyClass", s + myCl); + test("foonull", s + myClNull); + test("fooMyClass", s + myCl2); + + s = "foo"; s += b; test("footrue", s); + s = "foo"; s += by; test("foo42", s); + s = "foo"; s += sh; test("foo42", s); + s = "foo"; s += ch; test("fooa", s); + s = "foo"; s += i; test("foo42", s); + s = "foo"; s += l; test("foo42", s); + s = "foo"; s += fl; test("foo42.0", s); + s = "foo"; s += d; test("foo42.0", s); + s = "foo"; s += s; test("foofoo", s); + s = "foo"; s += sNull; test("foonull", s); + s = "foo"; s += o; test("foobar", s); + s = "foo"; s += oNull; test("foonull", s); + s = "foo"; s += cs; test("foobar", s); + + { + StringBuilder sb = new StringBuilder(); + sb.append("foo[C@"); + sb.append(Integer.toHexString(System.identityHashCode(chars))); + s = "foo"; + s += chars; + test(sb.toString(), s); + } + + s = "foo"; s += ImplicitStringConcat.sb; test("fooa", s); + s = "foo"; s += null; test("foonull", s); + s = "foo"; s += myCl; test("fooMyClass", s); + s = "foo"; s += myCl2; test("fooMyClass", s); + } + + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } + + static class MyClass { + public String toString() { + return "MyClass"; + } + } + + static class MyClassNull { + public String toString() { + return null; + } + } +} diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatArgCount.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatArgCount.java new file mode 100644 index 00000000000..0cc0a2a7887 --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatArgCount.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test multiple number of arguments to concatenate. + * + * @compile ImplicitStringConcatArgCount.java + * @run main/othervm ImplicitStringConcatArgCount + * + * @compile -XDallowStringFolding=false -XDstringConcat=inline ImplicitStringConcatArgCount.java + * @run main/othervm ImplicitStringConcatArgCount + * + * @compile -XDallowStringFolding=false -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatArgCount.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatArgCount + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * + * @compile -XDallowStringFolding=false -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatArgCount.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatArgCount + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatArgCount + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatArgCount +*/ +public class ImplicitStringConcatArgCount { + static final String s = "f"; + static final String s1 = "o"; + static String s2 = "o"; + static int i = 7; + + public static void main(String[] args) throws Exception { + test("fo", s + s1); + test("foo", s + s1 + s2); + test("foo7", s + s1 + s2 + i); + test("foo77", s + s1 + s2 + i + i); + test("foo777", s + s1 + s2 + i + i + i); + test("foo7777", s + s1 + s2 + i + i + i + i); + test("foo77777", s + s1 + s2 + i + i + i + i + i); + test("foo777777", s + s1 + s2 + i + i + i + i + i + i); + test("foo7777777", s + s1 + s2 + i + i + i + i + i + i + i); + test("foo77777777", s + s1 + s2 + i + i + i + i + i + i + i + i); + } + + public static void test(String expected, String actual) { + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } +} diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatBoundaries.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatBoundaries.java new file mode 100644 index 00000000000..f8e677b12bb --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatBoundaries.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test the boundary values for concatenation arguments. + * + * @compile ImplicitStringConcatBoundaries.java + * @run main/othervm ImplicitStringConcatBoundaries + * + * @compile -XDstringConcat=inline ImplicitStringConcatBoundaries.java + * @run main/othervm ImplicitStringConcatBoundaries + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatBoundaries.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatBoundaries + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatBoundaries.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatBoundaries + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatBoundaries + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatBoundaries + +*/ + +public class ImplicitStringConcatBoundaries { + + public static final boolean BOOL_TRUE_1 = true; + public static boolean BOOL_TRUE_2 = true; + public static final boolean BOOL_FALSE_1 = false; + public static boolean BOOL_FALSE_2 = false; + + public static final byte BYTE_MIN_1 = Byte.MIN_VALUE; + public static byte BYTE_MIN_2 = Byte.MIN_VALUE; + public static final byte BYTE_MAX_1 = Byte.MAX_VALUE; + public static byte BYTE_MAX_2 = Byte.MAX_VALUE; + + public static final short SHORT_MIN_1 = Short.MIN_VALUE; + public static short SHORT_MIN_2 = Short.MIN_VALUE; + public static final short SHORT_MAX_1 = Short.MAX_VALUE; + public static short SHORT_MAX_2 = Short.MAX_VALUE; + + public static final char CHAR_MIN_1 = Character.MIN_VALUE; + public static char CHAR_MIN_2 = Character.MIN_VALUE; + public static final char CHAR_MAX_1 = Character.MAX_VALUE; + public static char CHAR_MAX_2 = Character.MAX_VALUE; + + public static final int INT_MIN_1 = Integer.MIN_VALUE; + public static int INT_MIN_2 = Integer.MIN_VALUE; + public static final int INT_MAX_1 = Integer.MAX_VALUE; + public static int INT_MAX_2 = Integer.MAX_VALUE; + + public static final float FLOAT_MIN_EXP_1 = Float.MIN_EXPONENT; + public static float FLOAT_MIN_EXP_2 = Float.MIN_EXPONENT; + public static final float FLOAT_MIN_NORM_1 = Float.MIN_NORMAL; + public static float FLOAT_MIN_NORM_2 = Float.MIN_NORMAL; + public static final float FLOAT_MIN_1 = Float.MIN_VALUE; + public static float FLOAT_MIN_2 = Float.MIN_VALUE; + public static final float FLOAT_MAX_1 = Float.MAX_VALUE; + public static float FLOAT_MAX_2 = Float.MAX_VALUE; + + public static final long LONG_MIN_1 = Long.MIN_VALUE; + public static long LONG_MIN_2 = Long.MIN_VALUE; + public static final long LONG_MAX_1 = Long.MAX_VALUE; + public static long LONG_MAX_2 = Long.MAX_VALUE; + + public static final double DOUBLE_MIN_EXP_1 = Double.MIN_EXPONENT; + public static double DOUBLE_MIN_EXP_2 = Double.MIN_EXPONENT; + public static final double DOUBLE_MIN_NORM_1 = Double.MIN_NORMAL; + public static double DOUBLE_MIN_NORM_2 = Double.MIN_NORMAL; + public static final double DOUBLE_MIN_1 = Double.MIN_VALUE; + public static double DOUBLE_MIN_2 = Double.MIN_VALUE; + public static final double DOUBLE_MAX_1 = Double.MAX_VALUE; + public static double DOUBLE_MAX_2 = Double.MAX_VALUE; + + public static void main(String[] args) throws Exception { + test("foofalse", "foo" + BOOL_FALSE_1); + test("foofalse", "foo" + BOOL_FALSE_2); + test("footrue", "foo" + BOOL_TRUE_1); + test("footrue", "foo" + BOOL_TRUE_2); + + test("foo127", "foo" + BYTE_MAX_1); + test("foo127", "foo" + BYTE_MAX_2); + test("foo-128", "foo" + BYTE_MIN_1); + test("foo-128", "foo" + BYTE_MIN_2); + + test("foo32767", "foo" + SHORT_MAX_1); + test("foo32767", "foo" + SHORT_MAX_2); + test("foo-32768", "foo" + SHORT_MIN_1); + test("foo-32768", "foo" + SHORT_MIN_2); + + test("foo\u0000", "foo" + CHAR_MIN_1); + test("foo\u0000", "foo" + CHAR_MIN_2); + test("foo\uFFFF", "foo" + CHAR_MAX_1); + test("foo\uFFFF", "foo" + CHAR_MAX_2); + + test("foo2147483647", "foo" + INT_MAX_1); + test("foo2147483647", "foo" + INT_MAX_2); + test("foo-2147483648", "foo" + INT_MIN_1); + test("foo-2147483648", "foo" + INT_MIN_2); + + test("foo1.17549435E-38", "foo" + FLOAT_MIN_NORM_1); + test("foo1.17549435E-38", "foo" + FLOAT_MIN_NORM_2); + test("foo-126.0", "foo" + FLOAT_MIN_EXP_1); + test("foo-126.0", "foo" + FLOAT_MIN_EXP_2); + test("foo1.4E-45", "foo" + FLOAT_MIN_1); + test("foo1.4E-45", "foo" + FLOAT_MIN_2); + test("foo3.4028235E38", "foo" + FLOAT_MAX_1); + test("foo3.4028235E38", "foo" + FLOAT_MAX_2); + + test("foo-9223372036854775808", "foo" + LONG_MIN_1); + test("foo-9223372036854775808", "foo" + LONG_MIN_2); + test("foo9223372036854775807", "foo" + LONG_MAX_1); + test("foo9223372036854775807", "foo" + LONG_MAX_2); + + test("foo2.2250738585072014E-308", "foo" + DOUBLE_MIN_NORM_1); + test("foo2.2250738585072014E-308", "foo" + DOUBLE_MIN_NORM_2); + test("foo-1022.0", "foo" + DOUBLE_MIN_EXP_1); + test("foo-1022.0", "foo" + DOUBLE_MIN_EXP_2); + test("foo4.9E-324", "foo" + DOUBLE_MIN_1); + test("foo4.9E-324", "foo" + DOUBLE_MIN_2); + test("foo1.7976931348623157E308", "foo" + DOUBLE_MAX_1); + test("foo1.7976931348623157E308", "foo" + DOUBLE_MAX_2); + } + + public static void test(String expected, String actual) { + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } +} diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatMany.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatMany.java new file mode 100644 index 00000000000..7af7e7d5e05 --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatMany.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test implicit String concatenations with lots of arguments. + * + * @compile ImplicitStringConcatMany.java + * @run main/othervm ImplicitStringConcatMany + * + * @compile -XDstringConcat=inline ImplicitStringConcatMany.java + * @run main/othervm ImplicitStringConcatMany + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatMany.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatMany + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatMany.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatMany + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatMany + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatMany +*/ + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +public class ImplicitStringConcatMany { + + static String s000, s001, s002, s003, s004, s005, s006, s007, s008, s009; + static String s010, s011, s012, s013, s014, s015, s016, s017, s018, s019; + static String s020, s021, s022, s023, s024, s025, s026, s027, s028, s029; + static String s030, s031, s032, s033, s034, s035, s036, s037, s038, s039; + static String s040, s041, s042, s043, s044, s045, s046, s047, s048, s049; + static String s050, s051, s052, s053, s054, s055, s056, s057, s058, s059; + static String s060, s061, s062, s063, s064, s065, s066, s067, s068, s069; + static String s070, s071, s072, s073, s074, s075, s076, s077, s078, s079; + static String s080, s081, s082, s083, s084, s085, s086, s087, s088, s089; + static String s090, s091, s092, s093, s094, s095, s096, s097, s098, s099; + + static String s100, s101, s102, s103, s104, s105, s106, s107, s108, s109; + static String s110, s111, s112, s113, s114, s115, s116, s117, s118, s119; + static String s120, s121, s122, s123, s124, s125, s126, s127, s128, s129; + static String s130, s131, s132, s133, s134, s135, s136, s137, s138, s139; + static String s140, s141, s142, s143, s144, s145, s146, s147, s148, s149; + static String s150, s151, s152, s153, s154, s155, s156, s157, s158, s159; + static String s160, s161, s162, s163, s164, s165, s166, s167, s168, s169; + static String s170, s171, s172, s173, s174, s175, s176, s177, s178, s179; + static String s180, s181, s182, s183, s184, s185, s186, s187, s188, s189; + static String s190, s191, s192, s193, s194, s195, s196, s197, s198, s199; + + static String s200, s201, s202, s203, s204, s205, s206, s207, s208, s209; + static String s210, s211, s212, s213, s214, s215, s216, s217, s218, s219; + static String s220, s221, s222, s223, s224, s225, s226, s227, s228, s229; + static String s230, s231, s232, s233, s234, s235, s236, s237, s238, s239; + static String s240, s241, s242, s243, s244, s245, s246, s247, s248, s249; + static String s250, s251, s252, s253, s254, s255, s256, s257, s258, s259; + static String s260, s261, s262, s263, s264, s265, s266, s267, s268, s269; + static String s270, s271, s272, s273, s274, s275, s276, s277, s278, s279; + static String s280, s281, s282, s283, s284, s285, s286, s287, s288, s289; + static String s290, s291, s292, s293, s294, s295, s296, s297, s298, s299; + + static { + for (Field f : ImplicitStringConcatMany.class.getDeclaredFields()) { + if (Modifier.isStatic(f.getModifiers())) { + String name = f.getName(); + try { + f.set(null, name); + } catch (IllegalAccessException e) { + throw new IllegalStateException(e); + } + } + } + } + + public static void main(String[] args) throws Exception { + String res = + s000 + s001 + s002 + s003 + s004 + s005 + s006 + s007 + s008 + s009 + + s010 + s011 + s012 + s013 + s014 + s015 + s016 + s017 + s018 + s019 + + s020 + s021 + s022 + s023 + s024 + s025 + s026 + s027 + s028 + s029 + + s030 + s031 + s032 + s033 + s034 + s035 + s036 + s037 + s038 + s039 + + s040 + s041 + s042 + s043 + s044 + s045 + s046 + s047 + s048 + s049 + + s050 + s051 + s052 + s053 + s054 + s055 + s056 + s057 + s058 + s059 + + s060 + s061 + s062 + s063 + s064 + s065 + s066 + s067 + s068 + s069 + + s070 + s071 + s072 + s073 + s074 + s075 + s076 + s077 + s078 + s079 + + s080 + s081 + s082 + s083 + s084 + s085 + s086 + s087 + s088 + s089 + + s090 + s091 + s092 + s093 + s094 + s095 + s096 + s097 + s098 + s099 + + + s100 + s101 + s102 + s103 + s104 + s105 + s106 + s107 + s108 + s109 + + s110 + s111 + s112 + s113 + s114 + s115 + s116 + s117 + s118 + s119 + + s120 + s121 + s122 + s123 + s124 + s125 + s126 + s127 + s128 + s129 + + s130 + s131 + s132 + s133 + s134 + s135 + s136 + s137 + s138 + s139 + + s140 + s141 + s142 + s143 + s144 + s145 + s146 + s147 + s148 + s149 + + s150 + s151 + s152 + s153 + s154 + s155 + s156 + s157 + s158 + s159 + + s160 + s161 + s162 + s163 + s164 + s165 + s166 + s167 + s168 + s169 + + s170 + s171 + s172 + s173 + s174 + s175 + s176 + s177 + s178 + s179 + + s180 + s181 + s182 + s183 + s184 + s185 + s186 + s187 + s188 + s189 + + s190 + s191 + s192 + s193 + s194 + s195 + s196 + s197 + s198 + s199 + + + s200 + s201 + s202 + s203 + s204 + s205 + s206 + s207 + s208 + s209 + + s210 + s211 + s212 + s213 + s214 + s215 + s216 + s217 + s218 + s219 + + s220 + s221 + s222 + s223 + s224 + s225 + s226 + s227 + s228 + s229 + + s230 + s231 + s232 + s233 + s234 + s235 + s236 + s237 + s238 + s239 + + s240 + s241 + s242 + s243 + s244 + s245 + s246 + s247 + s248 + s249 + + s250 + s251 + s252 + s253 + s254 + s255 + s256 + s257 + s258 + s259 + + s260 + s261 + s262 + s263 + s264 + s265 + s266 + s267 + s268 + s269 + + s270 + s271 + s272 + s273 + s274 + s275 + s276 + s277 + s278 + s279 + + s280 + s281 + s282 + s283 + s284 + s285 + s286 + s287 + s288 + s289 + + s290 + s291 + s292 + s293 + s294 + s295 + s296 + s297 + s298 + s299; + + StringBuilder sb = new StringBuilder(); + for (int c = 0; c < 300; c++) { + sb.append(String.format("s%03d", c)); + } + test(sb.toString(), res); + } + + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + throw new IllegalStateException("Expected = " + expected + ", actual = " + actual); + } + } +} + diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatManyLongs.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatManyLongs.java new file mode 100644 index 00000000000..cc14a100cec --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatManyLongs.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test implicit String concatenations with lots of arguments (two-slot version) + * + * @compile ImplicitStringConcatManyLongs.java + * @run main/othervm ImplicitStringConcatManyLongs + * + * @compile -XDstringConcat=inline ImplicitStringConcatManyLongs.java + * @run main/othervm ImplicitStringConcatManyLongs + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatManyLongs + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatManyLongs + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs +*/ + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +public class ImplicitStringConcatManyLongs { + + static long s000, s001, s002, s003, s004, s005, s006, s007, s008, s009; + static long s010, s011, s012, s013, s014, s015, s016, s017, s018, s019; + static long s020, s021, s022, s023, s024, s025, s026, s027, s028, s029; + static long s030, s031, s032, s033, s034, s035, s036, s037, s038, s039; + static long s040, s041, s042, s043, s044, s045, s046, s047, s048, s049; + static long s050, s051, s052, s053, s054, s055, s056, s057, s058, s059; + static long s060, s061, s062, s063, s064, s065, s066, s067, s068, s069; + static long s070, s071, s072, s073, s074, s075, s076, s077, s078, s079; + static long s080, s081, s082, s083, s084, s085, s086, s087, s088, s089; + static long s090, s091, s092, s093, s094, s095, s096, s097, s098, s099; + + static long s100, s101, s102, s103, s104, s105, s106, s107, s108, s109; + static long s110, s111, s112, s113, s114, s115, s116, s117, s118, s119; + static long s120, s121, s122, s123, s124, s125, s126, s127, s128, s129; + static long s130, s131, s132, s133, s134, s135, s136, s137, s138, s139; + static long s140, s141, s142, s143, s144, s145, s146, s147, s148, s149; + static long s150, s151, s152, s153, s154, s155, s156, s157, s158, s159; + static long s160, s161, s162, s163, s164, s165, s166, s167, s168, s169; + static long s170, s171, s172, s173, s174, s175, s176, s177, s178, s179; + static long s180, s181, s182, s183, s184, s185, s186, s187, s188, s189; + static long s190, s191, s192, s193, s194, s195, s196, s197, s198, s199; + + static long s200, s201, s202, s203, s204, s205, s206, s207, s208, s209; + static long s210, s211, s212, s213, s214, s215, s216, s217, s218, s219; + static long s220, s221, s222, s223, s224, s225, s226, s227, s228, s229; + static long s230, s231, s232, s233, s234, s235, s236, s237, s238, s239; + static long s240, s241, s242, s243, s244, s245, s246, s247, s248, s249; + static long s250, s251, s252, s253, s254, s255, s256, s257, s258, s259; + static long s260, s261, s262, s263, s264, s265, s266, s267, s268, s269; + static long s270, s271, s272, s273, s274, s275, s276, s277, s278, s279; + static long s280, s281, s282, s283, s284, s285, s286, s287, s288, s289; + static long s290, s291, s292, s293, s294, s295, s296, s297, s298, s299; + + static { + for (Field f : ImplicitStringConcatManyLongs.class.getDeclaredFields()) { + if (Modifier.isStatic(f.getModifiers())) { + String name = f.getName(); + try { + f.set(null, Long.valueOf(name.substring(1))); + } catch (IllegalAccessException e) { + throw new IllegalStateException(e); + } + } + } + } + + public static void main(String[] args) throws Exception { + String res = "" + + s000 + s001 + s002 + s003 + s004 + s005 + s006 + s007 + s008 + s009 + + s010 + s011 + s012 + s013 + s014 + s015 + s016 + s017 + s018 + s019 + + s020 + s021 + s022 + s023 + s024 + s025 + s026 + s027 + s028 + s029 + + s030 + s031 + s032 + s033 + s034 + s035 + s036 + s037 + s038 + s039 + + s040 + s041 + s042 + s043 + s044 + s045 + s046 + s047 + s048 + s049 + + s050 + s051 + s052 + s053 + s054 + s055 + s056 + s057 + s058 + s059 + + s060 + s061 + s062 + s063 + s064 + s065 + s066 + s067 + s068 + s069 + + s070 + s071 + s072 + s073 + s074 + s075 + s076 + s077 + s078 + s079 + + s080 + s081 + s082 + s083 + s084 + s085 + s086 + s087 + s088 + s089 + + s090 + s091 + s092 + s093 + s094 + s095 + s096 + s097 + s098 + s099 + + + s100 + s101 + s102 + s103 + s104 + s105 + s106 + s107 + s108 + s109 + + s110 + s111 + s112 + s113 + s114 + s115 + s116 + s117 + s118 + s119 + + s120 + s121 + s122 + s123 + s124 + s125 + s126 + s127 + s128 + s129 + + s130 + s131 + s132 + s133 + s134 + s135 + s136 + s137 + s138 + s139 + + s140 + s141 + s142 + s143 + s144 + s145 + s146 + s147 + s148 + s149 + + s150 + s151 + s152 + s153 + s154 + s155 + s156 + s157 + s158 + s159 + + s160 + s161 + s162 + s163 + s164 + s165 + s166 + s167 + s168 + s169 + + s170 + s171 + s172 + s173 + s174 + s175 + s176 + s177 + s178 + s179 + + s180 + s181 + s182 + s183 + s184 + s185 + s186 + s187 + s188 + s189 + + s190 + s191 + s192 + s193 + s194 + s195 + s196 + s197 + s198 + s199 + + + s200 + s201 + s202 + s203 + s204 + s205 + s206 + s207 + s208 + s209 + + s210 + s211 + s212 + s213 + s214 + s215 + s216 + s217 + s218 + s219 + + s220 + s221 + s222 + s223 + s224 + s225 + s226 + s227 + s228 + s229 + + s230 + s231 + s232 + s233 + s234 + s235 + s236 + s237 + s238 + s239 + + s240 + s241 + s242 + s243 + s244 + s245 + s246 + s247 + s248 + s249 + + s250 + s251 + s252 + s253 + s254 + s255 + s256 + s257 + s258 + s259 + + s260 + s261 + s262 + s263 + s264 + s265 + s266 + s267 + s268 + s269 + + s270 + s271 + s272 + s273 + s274 + s275 + s276 + s277 + s278 + s279 + + s280 + s281 + s282 + s283 + s284 + s285 + s286 + s287 + s288 + s289 + + s290 + s291 + s292 + s293 + s294 + s295 + s296 + s297 + s298 + s299; + + StringBuilder sb = new StringBuilder(); + for (int c = 0; c < 300; c++) { + sb.append(c); + } + test(sb.toString(), res); + } + + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + throw new IllegalStateException("Expected = " + expected + ", actual = " + actual); + } + } +} + diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes-head.template b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes-head.template new file mode 100644 index 00000000000..10fd57f0616 --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes-head.template @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test implicit String concatenations, multiple shapes. + * + * @compile ImplicitStringConcatShapes.java + * @run main/othervm ImplicitStringConcatShapes + * + * @compile -XDstringConcat=inline ImplicitStringConcatShapes.java + * @run main/othervm ImplicitStringConcatShapes + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatShapes.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatShapes.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes +*/ +public class ImplicitStringConcatShapes { + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } + + static class MyClass { + private final int i; + + public MyClass(int i) { + this.i = i; + } + + public String toString() { + return new StringBuilder("C(").append(i).append(")").toString(); + } + } + + static class MyClassNullToString { + public String toString() { + return null; + } + } + + public static void main(String[] args) throws Exception { + new ImplicitStringConcatShapes().run(); + } diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes.java new file mode 100644 index 00000000000..c4a673721ae --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapes.java @@ -0,0 +1,5931 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary Test implicit String concatenations, multiple shapes. + * + * @compile ImplicitStringConcatShapes.java + * @run main/othervm ImplicitStringConcatShapes + * + * @compile -XDstringConcat=inline ImplicitStringConcatShapes.java + * @run main/othervm ImplicitStringConcatShapes + * + * @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatShapes.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * + * @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatShapes.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatShapes +*/ +public class ImplicitStringConcatShapes { + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } + + static class MyClass { + private final int i; + + public MyClass(int i) { + this.i = i; + } + + public String toString() { + return new StringBuilder("C(").append(i).append(")").toString(); + } + } + + static class MyClassNullToString { + public String toString() { + return null; + } + } + + public static void main(String[] args) throws Exception { + new ImplicitStringConcatShapes().run(); + } + static final boolean sf_bl = true; + static final byte sf_b = 80; + static final byte sf_bM = -41; + static final char sf_c = 'C'; + static final short sf_s = 5500; + static final short sf_sM = -8400; + static final int sf_i = 75000000; + static final int sf_iM = -2000000; + static final Integer sf_I = 1000000; + static final Integer sf_IN = null; + static final float sf_f = 17.0f; + static final float sf_fM = -42.0f; + static final long sf_l = -194313216L; + static final long sf_lM = -1705032704L; + static final double sf_d = 12.0d; + static final double sf_dM = -84.0d; + static final Object sf_o = new MyClass(87); + static final Object sf_oN = null; + static final Object sf_oNtS = new MyClassNullToString(); + static final String sf_str = "75"; + static final String sf_strU = "\u04511"; + static final String sf_strU1 = "\u000151"; + static final String sf_strU2 = "\u000292"; + static final int[] sf_iAN = null; + static final Object[] sf_oAN = null; + static boolean s_bl = true; + static byte s_b = 25; + static byte s_bM = -43; + static char s_c = 'T'; + static short s_s = 3900; + static short s_sM = -2900; + static int s_i = 97000000; + static int s_iM = -1000000; + static Integer s_I = 25000000; + static Integer s_IN = null; + static float s_f = 55.0f; + static float s_fM = -52.0f; + static long s_l = 935228928L; + static long s_lM = -1410065408L; + static double s_d = 8.0d; + static double s_dM = -96.0d; + static Object s_o = new MyClass(82); + static Object s_oN = null; + static Object s_oNtS = new MyClassNullToString(); + static String s_str = "18"; + static String s_strU = "\u045180"; + static String s_strU1 = "\u000112"; + static String s_strU2 = "\u000291"; + static int[] s_iAN = null; + static Object[] s_oAN = null; + final boolean f_bl = false; + final byte f_b = 44; + final byte f_bM = -54; + final char f_c = 'I'; + final short f_s = 8000; + final short f_sM = -9900; + final int f_i = 58000000; + final int f_iM = -55000000; + final Integer f_I = 94000000; + final Integer f_IN = null; + final float f_f = 94.0f; + final float f_fM = -87.0f; + final long f_l = 1460392448L; + final long f_lM = -820130816L; + final double f_d = 83.0d; + final double f_dM = -99.0d; + final Object f_o = new MyClass(70); + final Object f_oN = null; + final Object f_oNtS = new MyClassNullToString(); + final String f_str = "19"; + final String f_strU = "\u045176"; + final String f_strU1 = "\u000121"; + final String f_strU2 = "\u000218"; + final int[] f_iAN = null; + final Object[] f_oAN = null; + + public void run() { + run0(); + run1(); + run2(); + run3(); + run4(); + run5(); + } + + public void run0() { + test("-96.0", "" + s_dM); + test("null", "" + s_oNtS); + test("\u045176", "" + f_strU); + test("92", "" + sf_strU2); + test("51", "" + sf_strU1); + test("null", "" + s_iAN); + test("-54", "" + f_bM); + test("-87.0", "" + f_fM); + test("null", "" + s_oAN); + test("19", "" + f_str); + test("-41", "" + sf_bM); + test("null", "" + sf_IN); + test("T", "" + s_c); + test("-42.0", "" + sf_fM); + test("25", "" + s_b); + test("null", "" + f_oN); + test("-1410065408", "" + s_lM); + test("8.0", "" + s_d); + test("55.0", "" + s_f); + test("97000000", "" + s_i); + test("-9900", "" + f_sM); + test("935228928", "" + s_l); + test("-8400", "" + sf_sM); + test("C(82)", "" + s_o); + test("null", "" + sf_oNtS); + test("true", "" + s_bl); + test("3900", "" + s_s); + test("null", "" + sf_oN); + test("94000000", "" + f_I); + test("null", "" + f_IN); + test("true", "" + sf_bl); + test("5500", "" + sf_s); + test("-2900", "" + s_sM); + test("-194313216", "" + sf_l); + test("12", "" + s_strU1); + test("C(87)", "" + sf_o); + test("91", "" + s_strU2); + test("21", "" + f_strU1); + test("18", "" + f_strU2); + test("null", "" + f_iAN); + test("null", "" + s_oN); + test("\u045180", "" + s_strU); + test("C", "" + sf_c); + test("75", "" + sf_str); + test("-43", "" + s_bM); + test("80", "" + sf_b); + test("null", "" + s_IN); + test("-52.0", "" + s_fM); + test("75000000", "" + sf_i); + test("44", "" + f_b); + test("-1705032704", "" + sf_lM); + test("null", "" + f_oAN); + test("83.0", "" + f_d); + test("I", "" + f_c); + test("94.0", "" + f_f); + test("12.0", "" + sf_d); + test("-99.0", "" + f_dM); + test("17.0", "" + sf_f); + test("-84.0", "" + sf_dM); + test("58000000", "" + f_i); + test("-55000000", "" + f_iM); + test("1460392448", "" + f_l); + test("C(70)", "" + f_o); + test("\u04511", "" + sf_strU); + test("8000", "" + f_s); + test("18", "" + s_str); + test("-1000000", "" + s_iM); + test("1000000", "" + sf_I); + test("null", "" + f_oNtS); + test("false", "" + f_bl); + test("null", "" + sf_iAN); + test("-2000000", "" + sf_iM); + test("-820130816", "" + f_lM); + test("null", "" + sf_oAN); + test("25000000", "" + s_I); + test("-96.0-96.0", "" + s_dM + s_dM); + test("-96.0null", "" + s_dM + s_oNtS); + test("-96.0\u045176", "" + s_dM + f_strU); + test("-96.092", "" + s_dM + sf_strU2); + test("-96.051", "" + s_dM + sf_strU1); + test("-96.0null", "" + s_dM + s_iAN); + test("-96.0-54", "" + s_dM + f_bM); + test("-96.0-87.0", "" + s_dM + f_fM); + test("-96.0null", "" + s_dM + s_oAN); + test("-96.019", "" + s_dM + f_str); + test("-96.0-41", "" + s_dM + sf_bM); + test("-96.0null", "" + s_dM + sf_IN); + test("-96.0T", "" + s_dM + s_c); + test("-96.0-42.0", "" + s_dM + sf_fM); + test("-96.025", "" + s_dM + s_b); + test("-96.0null", "" + s_dM + f_oN); + test("-96.0-1410065408", "" + s_dM + s_lM); + test("-96.08.0", "" + s_dM + s_d); + test("-96.055.0", "" + s_dM + s_f); + test("-96.097000000", "" + s_dM + s_i); + test("-96.0-9900", "" + s_dM + f_sM); + test("-96.0935228928", "" + s_dM + s_l); + test("-96.0-8400", "" + s_dM + sf_sM); + test("-96.0C(82)", "" + s_dM + s_o); + test("-96.0null", "" + s_dM + sf_oNtS); + test("-96.0true", "" + s_dM + s_bl); + test("-96.03900", "" + s_dM + s_s); + test("-96.0null", "" + s_dM + sf_oN); + test("-96.094000000", "" + s_dM + f_I); + test("-96.0null", "" + s_dM + f_IN); + test("-96.0true", "" + s_dM + sf_bl); + test("-96.05500", "" + s_dM + sf_s); + test("-96.0-2900", "" + s_dM + s_sM); + test("-96.0-194313216", "" + s_dM + sf_l); + test("-96.012", "" + s_dM + s_strU1); + test("-96.0C(87)", "" + s_dM + sf_o); + test("-96.091", "" + s_dM + s_strU2); + test("-96.021", "" + s_dM + f_strU1); + test("-96.018", "" + s_dM + f_strU2); + test("-96.0null", "" + s_dM + f_iAN); + test("-96.0null", "" + s_dM + s_oN); + test("-96.0\u045180", "" + s_dM + s_strU); + test("-96.0C", "" + s_dM + sf_c); + test("-96.075", "" + s_dM + sf_str); + test("-96.0-43", "" + s_dM + s_bM); + test("-96.080", "" + s_dM + sf_b); + test("-96.0null", "" + s_dM + s_IN); + test("-96.0-52.0", "" + s_dM + s_fM); + test("-96.075000000", "" + s_dM + sf_i); + test("-96.044", "" + s_dM + f_b); + test("-96.0-1705032704", "" + s_dM + sf_lM); + test("-96.0null", "" + s_dM + f_oAN); + test("-96.083.0", "" + s_dM + f_d); + test("-96.0I", "" + s_dM + f_c); + test("-96.094.0", "" + s_dM + f_f); + test("-96.012.0", "" + s_dM + sf_d); + test("-96.0-99.0", "" + s_dM + f_dM); + test("-96.017.0", "" + s_dM + sf_f); + test("-96.0-84.0", "" + s_dM + sf_dM); + test("-96.058000000", "" + s_dM + f_i); + test("-96.0-55000000", "" + s_dM + f_iM); + test("-96.01460392448", "" + s_dM + f_l); + test("-96.0C(70)", "" + s_dM + f_o); + test("-96.0\u04511", "" + s_dM + sf_strU); + test("-96.08000", "" + s_dM + f_s); + test("-96.018", "" + s_dM + s_str); + test("-96.0-1000000", "" + s_dM + s_iM); + test("-96.01000000", "" + s_dM + sf_I); + test("-96.0null", "" + s_dM + f_oNtS); + test("-96.0false", "" + s_dM + f_bl); + test("-96.0null", "" + s_dM + sf_iAN); + test("-96.0-2000000", "" + s_dM + sf_iM); + test("-96.0-820130816", "" + s_dM + f_lM); + test("-96.0null", "" + s_dM + sf_oAN); + test("-96.025000000", "" + s_dM + s_I); + test("null-96.0", "" + s_oNtS + s_dM); + test("nullnull", "" + s_oNtS + s_oNtS); + test("null\u045176", "" + s_oNtS + f_strU); + test("null92", "" + s_oNtS + sf_strU2); + test("null51", "" + s_oNtS + sf_strU1); + test("nullnull", "" + s_oNtS + s_iAN); + test("null-54", "" + s_oNtS + f_bM); + test("null-87.0", "" + s_oNtS + f_fM); + test("nullnull", "" + s_oNtS + s_oAN); + test("null19", "" + s_oNtS + f_str); + test("null-41", "" + s_oNtS + sf_bM); + test("nullnull", "" + s_oNtS + sf_IN); + test("nullT", "" + s_oNtS + s_c); + test("null-42.0", "" + s_oNtS + sf_fM); + test("null25", "" + s_oNtS + s_b); + test("nullnull", "" + s_oNtS + f_oN); + test("null-1410065408", "" + s_oNtS + s_lM); + test("null8.0", "" + s_oNtS + s_d); + test("null55.0", "" + s_oNtS + s_f); + test("null97000000", "" + s_oNtS + s_i); + test("null-9900", "" + s_oNtS + f_sM); + test("null935228928", "" + s_oNtS + s_l); + test("null-8400", "" + s_oNtS + sf_sM); + test("nullC(82)", "" + s_oNtS + s_o); + test("nullnull", "" + s_oNtS + sf_oNtS); + test("nulltrue", "" + s_oNtS + s_bl); + test("null3900", "" + s_oNtS + s_s); + test("nullnull", "" + s_oNtS + sf_oN); + test("null94000000", "" + s_oNtS + f_I); + test("nullnull", "" + s_oNtS + f_IN); + test("nulltrue", "" + s_oNtS + sf_bl); + test("null5500", "" + s_oNtS + sf_s); + test("null-2900", "" + s_oNtS + s_sM); + test("null-194313216", "" + s_oNtS + sf_l); + test("null12", "" + s_oNtS + s_strU1); + test("nullC(87)", "" + s_oNtS + sf_o); + test("null91", "" + s_oNtS + s_strU2); + test("null21", "" + s_oNtS + f_strU1); + test("null18", "" + s_oNtS + f_strU2); + test("nullnull", "" + s_oNtS + f_iAN); + test("nullnull", "" + s_oNtS + s_oN); + test("null\u045180", "" + s_oNtS + s_strU); + test("nullC", "" + s_oNtS + sf_c); + test("null75", "" + s_oNtS + sf_str); + test("null-43", "" + s_oNtS + s_bM); + test("null80", "" + s_oNtS + sf_b); + test("nullnull", "" + s_oNtS + s_IN); + test("null-52.0", "" + s_oNtS + s_fM); + test("null75000000", "" + s_oNtS + sf_i); + test("null44", "" + s_oNtS + f_b); + test("null-1705032704", "" + s_oNtS + sf_lM); + test("nullnull", "" + s_oNtS + f_oAN); + test("null83.0", "" + s_oNtS + f_d); + test("nullI", "" + s_oNtS + f_c); + test("null94.0", "" + s_oNtS + f_f); + test("null12.0", "" + s_oNtS + sf_d); + test("null-99.0", "" + s_oNtS + f_dM); + test("null17.0", "" + s_oNtS + sf_f); + test("null-84.0", "" + s_oNtS + sf_dM); + test("null58000000", "" + s_oNtS + f_i); + test("null-55000000", "" + s_oNtS + f_iM); + test("null1460392448", "" + s_oNtS + f_l); + test("nullC(70)", "" + s_oNtS + f_o); + test("null\u04511", "" + s_oNtS + sf_strU); + test("null8000", "" + s_oNtS + f_s); + test("null18", "" + s_oNtS + s_str); + test("null-1000000", "" + s_oNtS + s_iM); + test("null1000000", "" + s_oNtS + sf_I); + test("nullnull", "" + s_oNtS + f_oNtS); + test("nullfalse", "" + s_oNtS + f_bl); + test("nullnull", "" + s_oNtS + sf_iAN); + test("null-2000000", "" + s_oNtS + sf_iM); + test("null-820130816", "" + s_oNtS + f_lM); + test("nullnull", "" + s_oNtS + sf_oAN); + test("null25000000", "" + s_oNtS + s_I); + test("\u045176-96.0", "" + f_strU + s_dM); + test("\u045176null", "" + f_strU + s_oNtS); + test("\u045176\u045176", "" + f_strU + f_strU); + test("\u04517692", "" + f_strU + sf_strU2); + test("\u04517651", "" + f_strU + sf_strU1); + test("\u045176null", "" + f_strU + s_iAN); + test("\u045176-54", "" + f_strU + f_bM); + test("\u045176-87.0", "" + f_strU + f_fM); + test("\u045176null", "" + f_strU + s_oAN); + test("\u04517619", "" + f_strU + f_str); + test("\u045176-41", "" + f_strU + sf_bM); + test("\u045176null", "" + f_strU + sf_IN); + test("\u045176T", "" + f_strU + s_c); + test("\u045176-42.0", "" + f_strU + sf_fM); + test("\u04517625", "" + f_strU + s_b); + test("\u045176null", "" + f_strU + f_oN); + test("\u045176-1410065408", "" + f_strU + s_lM); + test("\u0451768.0", "" + f_strU + s_d); + test("\u04517655.0", "" + f_strU + s_f); + test("\u04517697000000", "" + f_strU + s_i); + test("\u045176-9900", "" + f_strU + f_sM); + test("\u045176935228928", "" + f_strU + s_l); + test("\u045176-8400", "" + f_strU + sf_sM); + test("\u045176C(82)", "" + f_strU + s_o); + test("\u045176null", "" + f_strU + sf_oNtS); + test("\u045176true", "" + f_strU + s_bl); + test("\u0451763900", "" + f_strU + s_s); + test("\u045176null", "" + f_strU + sf_oN); + test("\u04517694000000", "" + f_strU + f_I); + test("\u045176null", "" + f_strU + f_IN); + test("\u045176true", "" + f_strU + sf_bl); + test("\u0451765500", "" + f_strU + sf_s); + test("\u045176-2900", "" + f_strU + s_sM); + test("\u045176-194313216", "" + f_strU + sf_l); + test("\u04517612", "" + f_strU + s_strU1); + test("\u045176C(87)", "" + f_strU + sf_o); + test("\u04517691", "" + f_strU + s_strU2); + test("\u04517621", "" + f_strU + f_strU1); + test("\u04517618", "" + f_strU + f_strU2); + test("\u045176null", "" + f_strU + f_iAN); + test("\u045176null", "" + f_strU + s_oN); + test("\u045176\u045180", "" + f_strU + s_strU); + test("\u045176C", "" + f_strU + sf_c); + test("\u04517675", "" + f_strU + sf_str); + test("\u045176-43", "" + f_strU + s_bM); + test("\u04517680", "" + f_strU + sf_b); + test("\u045176null", "" + f_strU + s_IN); + test("\u045176-52.0", "" + f_strU + s_fM); + test("\u04517675000000", "" + f_strU + sf_i); + test("\u04517644", "" + f_strU + f_b); + test("\u045176-1705032704", "" + f_strU + sf_lM); + test("\u045176null", "" + f_strU + f_oAN); + test("\u04517683.0", "" + f_strU + f_d); + test("\u045176I", "" + f_strU + f_c); + test("\u04517694.0", "" + f_strU + f_f); + test("\u04517612.0", "" + f_strU + sf_d); + test("\u045176-99.0", "" + f_strU + f_dM); + test("\u04517617.0", "" + f_strU + sf_f); + test("\u045176-84.0", "" + f_strU + sf_dM); + test("\u04517658000000", "" + f_strU + f_i); + test("\u045176-55000000", "" + f_strU + f_iM); + test("\u0451761460392448", "" + f_strU + f_l); + test("\u045176C(70)", "" + f_strU + f_o); + test("\u045176\u04511", "" + f_strU + sf_strU); + test("\u0451768000", "" + f_strU + f_s); + test("\u04517618", "" + f_strU + s_str); + test("\u045176-1000000", "" + f_strU + s_iM); + test("\u0451761000000", "" + f_strU + sf_I); + test("\u045176null", "" + f_strU + f_oNtS); + test("\u045176false", "" + f_strU + f_bl); + test("\u045176null", "" + f_strU + sf_iAN); + test("\u045176-2000000", "" + f_strU + sf_iM); + test("\u045176-820130816", "" + f_strU + f_lM); + test("\u045176null", "" + f_strU + sf_oAN); + test("\u04517625000000", "" + f_strU + s_I); + test("92-96.0", "" + sf_strU2 + s_dM); + test("92null", "" + sf_strU2 + s_oNtS); + test("92\u045176", "" + sf_strU2 + f_strU); + test("9292", "" + sf_strU2 + sf_strU2); + test("9251", "" + sf_strU2 + sf_strU1); + test("92null", "" + sf_strU2 + s_iAN); + test("92-54", "" + sf_strU2 + f_bM); + test("92-87.0", "" + sf_strU2 + f_fM); + test("92null", "" + sf_strU2 + s_oAN); + test("9219", "" + sf_strU2 + f_str); + test("92-41", "" + sf_strU2 + sf_bM); + test("92null", "" + sf_strU2 + sf_IN); + test("92T", "" + sf_strU2 + s_c); + test("92-42.0", "" + sf_strU2 + sf_fM); + test("9225", "" + sf_strU2 + s_b); + test("92null", "" + sf_strU2 + f_oN); + test("92-1410065408", "" + sf_strU2 + s_lM); + test("928.0", "" + sf_strU2 + s_d); + test("9255.0", "" + sf_strU2 + s_f); + test("9297000000", "" + sf_strU2 + s_i); + test("92-9900", "" + sf_strU2 + f_sM); + test("92935228928", "" + sf_strU2 + s_l); + test("92-8400", "" + sf_strU2 + sf_sM); + test("92C(82)", "" + sf_strU2 + s_o); + test("92null", "" + sf_strU2 + sf_oNtS); + test("92true", "" + sf_strU2 + s_bl); + test("923900", "" + sf_strU2 + s_s); + test("92null", "" + sf_strU2 + sf_oN); + test("9294000000", "" + sf_strU2 + f_I); + test("92null", "" + sf_strU2 + f_IN); + test("92true", "" + sf_strU2 + sf_bl); + test("925500", "" + sf_strU2 + sf_s); + test("92-2900", "" + sf_strU2 + s_sM); + test("92-194313216", "" + sf_strU2 + sf_l); + test("9212", "" + sf_strU2 + s_strU1); + test("92C(87)", "" + sf_strU2 + sf_o); + test("9291", "" + sf_strU2 + s_strU2); + test("9221", "" + sf_strU2 + f_strU1); + test("9218", "" + sf_strU2 + f_strU2); + test("92null", "" + sf_strU2 + f_iAN); + test("92null", "" + sf_strU2 + s_oN); + test("92\u045180", "" + sf_strU2 + s_strU); + test("92C", "" + sf_strU2 + sf_c); + test("9275", "" + sf_strU2 + sf_str); + test("92-43", "" + sf_strU2 + s_bM); + test("9280", "" + sf_strU2 + sf_b); + test("92null", "" + sf_strU2 + s_IN); + test("92-52.0", "" + sf_strU2 + s_fM); + test("9275000000", "" + sf_strU2 + sf_i); + test("9244", "" + sf_strU2 + f_b); + test("92-1705032704", "" + sf_strU2 + sf_lM); + test("92null", "" + sf_strU2 + f_oAN); + test("9283.0", "" + sf_strU2 + f_d); + test("92I", "" + sf_strU2 + f_c); + test("9294.0", "" + sf_strU2 + f_f); + test("9212.0", "" + sf_strU2 + sf_d); + test("92-99.0", "" + sf_strU2 + f_dM); + test("9217.0", "" + sf_strU2 + sf_f); + test("92-84.0", "" + sf_strU2 + sf_dM); + test("9258000000", "" + sf_strU2 + f_i); + test("92-55000000", "" + sf_strU2 + f_iM); + test("921460392448", "" + sf_strU2 + f_l); + test("92C(70)", "" + sf_strU2 + f_o); + test("92\u04511", "" + sf_strU2 + sf_strU); + test("928000", "" + sf_strU2 + f_s); + test("9218", "" + sf_strU2 + s_str); + test("92-1000000", "" + sf_strU2 + s_iM); + test("921000000", "" + sf_strU2 + sf_I); + test("92null", "" + sf_strU2 + f_oNtS); + test("92false", "" + sf_strU2 + f_bl); + test("92null", "" + sf_strU2 + sf_iAN); + test("92-2000000", "" + sf_strU2 + sf_iM); + test("92-820130816", "" + sf_strU2 + f_lM); + test("92null", "" + sf_strU2 + sf_oAN); + test("9225000000", "" + sf_strU2 + s_I); + test("51-96.0", "" + sf_strU1 + s_dM); + test("51null", "" + sf_strU1 + s_oNtS); + test("51\u045176", "" + sf_strU1 + f_strU); + test("5192", "" + sf_strU1 + sf_strU2); + test("5151", "" + sf_strU1 + sf_strU1); + test("51null", "" + sf_strU1 + s_iAN); + test("51-54", "" + sf_strU1 + f_bM); + test("51-87.0", "" + sf_strU1 + f_fM); + test("51null", "" + sf_strU1 + s_oAN); + test("5119", "" + sf_strU1 + f_str); + test("51-41", "" + sf_strU1 + sf_bM); + test("51null", "" + sf_strU1 + sf_IN); + test("51T", "" + sf_strU1 + s_c); + test("51-42.0", "" + sf_strU1 + sf_fM); + test("5125", "" + sf_strU1 + s_b); + test("51null", "" + sf_strU1 + f_oN); + test("51-1410065408", "" + sf_strU1 + s_lM); + test("518.0", "" + sf_strU1 + s_d); + test("5155.0", "" + sf_strU1 + s_f); + test("5197000000", "" + sf_strU1 + s_i); + test("51-9900", "" + sf_strU1 + f_sM); + test("51935228928", "" + sf_strU1 + s_l); + test("51-8400", "" + sf_strU1 + sf_sM); + test("51C(82)", "" + sf_strU1 + s_o); + test("51null", "" + sf_strU1 + sf_oNtS); + test("51true", "" + sf_strU1 + s_bl); + test("513900", "" + sf_strU1 + s_s); + test("51null", "" + sf_strU1 + sf_oN); + test("5194000000", "" + sf_strU1 + f_I); + test("51null", "" + sf_strU1 + f_IN); + test("51true", "" + sf_strU1 + sf_bl); + test("515500", "" + sf_strU1 + sf_s); + test("51-2900", "" + sf_strU1 + s_sM); + test("51-194313216", "" + sf_strU1 + sf_l); + test("5112", "" + sf_strU1 + s_strU1); + test("51C(87)", "" + sf_strU1 + sf_o); + test("5191", "" + sf_strU1 + s_strU2); + test("5121", "" + sf_strU1 + f_strU1); + test("5118", "" + sf_strU1 + f_strU2); + test("51null", "" + sf_strU1 + f_iAN); + test("51null", "" + sf_strU1 + s_oN); + test("51\u045180", "" + sf_strU1 + s_strU); + test("51C", "" + sf_strU1 + sf_c); + test("5175", "" + sf_strU1 + sf_str); + test("51-43", "" + sf_strU1 + s_bM); + test("5180", "" + sf_strU1 + sf_b); + test("51null", "" + sf_strU1 + s_IN); + test("51-52.0", "" + sf_strU1 + s_fM); + test("5175000000", "" + sf_strU1 + sf_i); + test("5144", "" + sf_strU1 + f_b); + test("51-1705032704", "" + sf_strU1 + sf_lM); + test("51null", "" + sf_strU1 + f_oAN); + test("5183.0", "" + sf_strU1 + f_d); + test("51I", "" + sf_strU1 + f_c); + test("5194.0", "" + sf_strU1 + f_f); + test("5112.0", "" + sf_strU1 + sf_d); + test("51-99.0", "" + sf_strU1 + f_dM); + test("5117.0", "" + sf_strU1 + sf_f); + test("51-84.0", "" + sf_strU1 + sf_dM); + test("5158000000", "" + sf_strU1 + f_i); + test("51-55000000", "" + sf_strU1 + f_iM); + test("511460392448", "" + sf_strU1 + f_l); + test("51C(70)", "" + sf_strU1 + f_o); + test("51\u04511", "" + sf_strU1 + sf_strU); + test("518000", "" + sf_strU1 + f_s); + test("5118", "" + sf_strU1 + s_str); + test("51-1000000", "" + sf_strU1 + s_iM); + test("511000000", "" + sf_strU1 + sf_I); + test("51null", "" + sf_strU1 + f_oNtS); + test("51false", "" + sf_strU1 + f_bl); + test("51null", "" + sf_strU1 + sf_iAN); + test("51-2000000", "" + sf_strU1 + sf_iM); + test("51-820130816", "" + sf_strU1 + f_lM); + test("51null", "" + sf_strU1 + sf_oAN); + test("5125000000", "" + sf_strU1 + s_I); + test("null-96.0", "" + s_iAN + s_dM); + test("nullnull", "" + s_iAN + s_oNtS); + test("null\u045176", "" + s_iAN + f_strU); + test("null92", "" + s_iAN + sf_strU2); + test("null51", "" + s_iAN + sf_strU1); + test("nullnull", "" + s_iAN + s_iAN); + test("null-54", "" + s_iAN + f_bM); + test("null-87.0", "" + s_iAN + f_fM); + test("nullnull", "" + s_iAN + s_oAN); + test("null19", "" + s_iAN + f_str); + test("null-41", "" + s_iAN + sf_bM); + test("nullnull", "" + s_iAN + sf_IN); + test("nullT", "" + s_iAN + s_c); + test("null-42.0", "" + s_iAN + sf_fM); + test("null25", "" + s_iAN + s_b); + test("nullnull", "" + s_iAN + f_oN); + test("null-1410065408", "" + s_iAN + s_lM); + test("null8.0", "" + s_iAN + s_d); + test("null55.0", "" + s_iAN + s_f); + test("null97000000", "" + s_iAN + s_i); + test("null-9900", "" + s_iAN + f_sM); + test("null935228928", "" + s_iAN + s_l); + test("null-8400", "" + s_iAN + sf_sM); + test("nullC(82)", "" + s_iAN + s_o); + test("nullnull", "" + s_iAN + sf_oNtS); + test("nulltrue", "" + s_iAN + s_bl); + test("null3900", "" + s_iAN + s_s); + test("nullnull", "" + s_iAN + sf_oN); + test("null94000000", "" + s_iAN + f_I); + test("nullnull", "" + s_iAN + f_IN); + test("nulltrue", "" + s_iAN + sf_bl); + test("null5500", "" + s_iAN + sf_s); + test("null-2900", "" + s_iAN + s_sM); + test("null-194313216", "" + s_iAN + sf_l); + test("null12", "" + s_iAN + s_strU1); + test("nullC(87)", "" + s_iAN + sf_o); + test("null91", "" + s_iAN + s_strU2); + test("null21", "" + s_iAN + f_strU1); + test("null18", "" + s_iAN + f_strU2); + test("nullnull", "" + s_iAN + f_iAN); + test("nullnull", "" + s_iAN + s_oN); + test("null\u045180", "" + s_iAN + s_strU); + test("nullC", "" + s_iAN + sf_c); + test("null75", "" + s_iAN + sf_str); + test("null-43", "" + s_iAN + s_bM); + test("null80", "" + s_iAN + sf_b); + test("nullnull", "" + s_iAN + s_IN); + test("null-52.0", "" + s_iAN + s_fM); + test("null75000000", "" + s_iAN + sf_i); + test("null44", "" + s_iAN + f_b); + test("null-1705032704", "" + s_iAN + sf_lM); + test("nullnull", "" + s_iAN + f_oAN); + test("null83.0", "" + s_iAN + f_d); + test("nullI", "" + s_iAN + f_c); + test("null94.0", "" + s_iAN + f_f); + test("null12.0", "" + s_iAN + sf_d); + test("null-99.0", "" + s_iAN + f_dM); + test("null17.0", "" + s_iAN + sf_f); + test("null-84.0", "" + s_iAN + sf_dM); + test("null58000000", "" + s_iAN + f_i); + test("null-55000000", "" + s_iAN + f_iM); + test("null1460392448", "" + s_iAN + f_l); + test("nullC(70)", "" + s_iAN + f_o); + test("null\u04511", "" + s_iAN + sf_strU); + test("null8000", "" + s_iAN + f_s); + test("null18", "" + s_iAN + s_str); + test("null-1000000", "" + s_iAN + s_iM); + test("null1000000", "" + s_iAN + sf_I); + test("nullnull", "" + s_iAN + f_oNtS); + test("nullfalse", "" + s_iAN + f_bl); + test("nullnull", "" + s_iAN + sf_iAN); + test("null-2000000", "" + s_iAN + sf_iM); + test("null-820130816", "" + s_iAN + f_lM); + test("nullnull", "" + s_iAN + sf_oAN); + test("null25000000", "" + s_iAN + s_I); + test("-54-96.0", "" + f_bM + s_dM); + test("-54null", "" + f_bM + s_oNtS); + test("-54\u045176", "" + f_bM + f_strU); + test("-5492", "" + f_bM + sf_strU2); + test("-5451", "" + f_bM + sf_strU1); + test("-54null", "" + f_bM + s_iAN); + test("-54-54", "" + f_bM + f_bM); + test("-54-87.0", "" + f_bM + f_fM); + test("-54null", "" + f_bM + s_oAN); + test("-5419", "" + f_bM + f_str); + test("-54-41", "" + f_bM + sf_bM); + test("-54null", "" + f_bM + sf_IN); + test("-54T", "" + f_bM + s_c); + test("-54-42.0", "" + f_bM + sf_fM); + test("-5425", "" + f_bM + s_b); + test("-54null", "" + f_bM + f_oN); + test("-54-1410065408", "" + f_bM + s_lM); + test("-548.0", "" + f_bM + s_d); + test("-5455.0", "" + f_bM + s_f); + test("-5497000000", "" + f_bM + s_i); + test("-54-9900", "" + f_bM + f_sM); + test("-54935228928", "" + f_bM + s_l); + test("-54-8400", "" + f_bM + sf_sM); + test("-54C(82)", "" + f_bM + s_o); + test("-54null", "" + f_bM + sf_oNtS); + test("-54true", "" + f_bM + s_bl); + test("-543900", "" + f_bM + s_s); + test("-54null", "" + f_bM + sf_oN); + test("-5494000000", "" + f_bM + f_I); + test("-54null", "" + f_bM + f_IN); + test("-54true", "" + f_bM + sf_bl); + test("-545500", "" + f_bM + sf_s); + test("-54-2900", "" + f_bM + s_sM); + test("-54-194313216", "" + f_bM + sf_l); + test("-5412", "" + f_bM + s_strU1); + test("-54C(87)", "" + f_bM + sf_o); + test("-5491", "" + f_bM + s_strU2); + test("-5421", "" + f_bM + f_strU1); + test("-5418", "" + f_bM + f_strU2); + test("-54null", "" + f_bM + f_iAN); + test("-54null", "" + f_bM + s_oN); + test("-54\u045180", "" + f_bM + s_strU); + test("-54C", "" + f_bM + sf_c); + test("-5475", "" + f_bM + sf_str); + test("-54-43", "" + f_bM + s_bM); + test("-5480", "" + f_bM + sf_b); + test("-54null", "" + f_bM + s_IN); + test("-54-52.0", "" + f_bM + s_fM); + test("-5475000000", "" + f_bM + sf_i); + test("-5444", "" + f_bM + f_b); + test("-54-1705032704", "" + f_bM + sf_lM); + test("-54null", "" + f_bM + f_oAN); + test("-5483.0", "" + f_bM + f_d); + test("-54I", "" + f_bM + f_c); + test("-5494.0", "" + f_bM + f_f); + test("-5412.0", "" + f_bM + sf_d); + test("-54-99.0", "" + f_bM + f_dM); + test("-5417.0", "" + f_bM + sf_f); + test("-54-84.0", "" + f_bM + sf_dM); + test("-5458000000", "" + f_bM + f_i); + test("-54-55000000", "" + f_bM + f_iM); + test("-541460392448", "" + f_bM + f_l); + test("-54C(70)", "" + f_bM + f_o); + test("-54\u04511", "" + f_bM + sf_strU); + test("-548000", "" + f_bM + f_s); + test("-5418", "" + f_bM + s_str); + test("-54-1000000", "" + f_bM + s_iM); + test("-541000000", "" + f_bM + sf_I); + test("-54null", "" + f_bM + f_oNtS); + test("-54false", "" + f_bM + f_bl); + test("-54null", "" + f_bM + sf_iAN); + test("-54-2000000", "" + f_bM + sf_iM); + test("-54-820130816", "" + f_bM + f_lM); + test("-54null", "" + f_bM + sf_oAN); + test("-5425000000", "" + f_bM + s_I); + test("-87.0-96.0", "" + f_fM + s_dM); + test("-87.0null", "" + f_fM + s_oNtS); + test("-87.0\u045176", "" + f_fM + f_strU); + test("-87.092", "" + f_fM + sf_strU2); + test("-87.051", "" + f_fM + sf_strU1); + test("-87.0null", "" + f_fM + s_iAN); + test("-87.0-54", "" + f_fM + f_bM); + test("-87.0-87.0", "" + f_fM + f_fM); + test("-87.0null", "" + f_fM + s_oAN); + test("-87.019", "" + f_fM + f_str); + test("-87.0-41", "" + f_fM + sf_bM); + test("-87.0null", "" + f_fM + sf_IN); + test("-87.0T", "" + f_fM + s_c); + test("-87.0-42.0", "" + f_fM + sf_fM); + test("-87.025", "" + f_fM + s_b); + test("-87.0null", "" + f_fM + f_oN); + test("-87.0-1410065408", "" + f_fM + s_lM); + test("-87.08.0", "" + f_fM + s_d); + test("-87.055.0", "" + f_fM + s_f); + test("-87.097000000", "" + f_fM + s_i); + test("-87.0-9900", "" + f_fM + f_sM); + test("-87.0935228928", "" + f_fM + s_l); + test("-87.0-8400", "" + f_fM + sf_sM); + test("-87.0C(82)", "" + f_fM + s_o); + test("-87.0null", "" + f_fM + sf_oNtS); + test("-87.0true", "" + f_fM + s_bl); + test("-87.03900", "" + f_fM + s_s); + test("-87.0null", "" + f_fM + sf_oN); + test("-87.094000000", "" + f_fM + f_I); + test("-87.0null", "" + f_fM + f_IN); + test("-87.0true", "" + f_fM + sf_bl); + test("-87.05500", "" + f_fM + sf_s); + test("-87.0-2900", "" + f_fM + s_sM); + test("-87.0-194313216", "" + f_fM + sf_l); + test("-87.012", "" + f_fM + s_strU1); + test("-87.0C(87)", "" + f_fM + sf_o); + test("-87.091", "" + f_fM + s_strU2); + test("-87.021", "" + f_fM + f_strU1); + test("-87.018", "" + f_fM + f_strU2); + test("-87.0null", "" + f_fM + f_iAN); + test("-87.0null", "" + f_fM + s_oN); + test("-87.0\u045180", "" + f_fM + s_strU); + test("-87.0C", "" + f_fM + sf_c); + test("-87.075", "" + f_fM + sf_str); + test("-87.0-43", "" + f_fM + s_bM); + test("-87.080", "" + f_fM + sf_b); + test("-87.0null", "" + f_fM + s_IN); + test("-87.0-52.0", "" + f_fM + s_fM); + test("-87.075000000", "" + f_fM + sf_i); + test("-87.044", "" + f_fM + f_b); + test("-87.0-1705032704", "" + f_fM + sf_lM); + test("-87.0null", "" + f_fM + f_oAN); + test("-87.083.0", "" + f_fM + f_d); + test("-87.0I", "" + f_fM + f_c); + test("-87.094.0", "" + f_fM + f_f); + test("-87.012.0", "" + f_fM + sf_d); + test("-87.0-99.0", "" + f_fM + f_dM); + test("-87.017.0", "" + f_fM + sf_f); + test("-87.0-84.0", "" + f_fM + sf_dM); + test("-87.058000000", "" + f_fM + f_i); + test("-87.0-55000000", "" + f_fM + f_iM); + test("-87.01460392448", "" + f_fM + f_l); + test("-87.0C(70)", "" + f_fM + f_o); + test("-87.0\u04511", "" + f_fM + sf_strU); + test("-87.08000", "" + f_fM + f_s); + test("-87.018", "" + f_fM + s_str); + test("-87.0-1000000", "" + f_fM + s_iM); + test("-87.01000000", "" + f_fM + sf_I); + test("-87.0null", "" + f_fM + f_oNtS); + test("-87.0false", "" + f_fM + f_bl); + test("-87.0null", "" + f_fM + sf_iAN); + test("-87.0-2000000", "" + f_fM + sf_iM); + test("-87.0-820130816", "" + f_fM + f_lM); + test("-87.0null", "" + f_fM + sf_oAN); + test("-87.025000000", "" + f_fM + s_I); + test("null-96.0", "" + s_oAN + s_dM); + test("nullnull", "" + s_oAN + s_oNtS); + test("null\u045176", "" + s_oAN + f_strU); + test("null92", "" + s_oAN + sf_strU2); + test("null51", "" + s_oAN + sf_strU1); + test("nullnull", "" + s_oAN + s_iAN); + test("null-54", "" + s_oAN + f_bM); + test("null-87.0", "" + s_oAN + f_fM); + test("nullnull", "" + s_oAN + s_oAN); + test("null19", "" + s_oAN + f_str); + test("null-41", "" + s_oAN + sf_bM); + test("nullnull", "" + s_oAN + sf_IN); + test("nullT", "" + s_oAN + s_c); + test("null-42.0", "" + s_oAN + sf_fM); + test("null25", "" + s_oAN + s_b); + test("nullnull", "" + s_oAN + f_oN); + test("null-1410065408", "" + s_oAN + s_lM); + test("null8.0", "" + s_oAN + s_d); + test("null55.0", "" + s_oAN + s_f); + test("null97000000", "" + s_oAN + s_i); + test("null-9900", "" + s_oAN + f_sM); + test("null935228928", "" + s_oAN + s_l); + test("null-8400", "" + s_oAN + sf_sM); + test("nullC(82)", "" + s_oAN + s_o); + test("nullnull", "" + s_oAN + sf_oNtS); + test("nulltrue", "" + s_oAN + s_bl); + test("null3900", "" + s_oAN + s_s); + test("nullnull", "" + s_oAN + sf_oN); + test("null94000000", "" + s_oAN + f_I); + test("nullnull", "" + s_oAN + f_IN); + test("nulltrue", "" + s_oAN + sf_bl); + test("null5500", "" + s_oAN + sf_s); + test("null-2900", "" + s_oAN + s_sM); + test("null-194313216", "" + s_oAN + sf_l); + test("null12", "" + s_oAN + s_strU1); + test("nullC(87)", "" + s_oAN + sf_o); + test("null91", "" + s_oAN + s_strU2); + test("null21", "" + s_oAN + f_strU1); + test("null18", "" + s_oAN + f_strU2); + test("nullnull", "" + s_oAN + f_iAN); + test("nullnull", "" + s_oAN + s_oN); + test("null\u045180", "" + s_oAN + s_strU); + test("nullC", "" + s_oAN + sf_c); + test("null75", "" + s_oAN + sf_str); + test("null-43", "" + s_oAN + s_bM); + test("null80", "" + s_oAN + sf_b); + test("nullnull", "" + s_oAN + s_IN); + test("null-52.0", "" + s_oAN + s_fM); + test("null75000000", "" + s_oAN + sf_i); + test("null44", "" + s_oAN + f_b); + test("null-1705032704", "" + s_oAN + sf_lM); + test("nullnull", "" + s_oAN + f_oAN); + test("null83.0", "" + s_oAN + f_d); + test("nullI", "" + s_oAN + f_c); + test("null94.0", "" + s_oAN + f_f); + test("null12.0", "" + s_oAN + sf_d); + test("null-99.0", "" + s_oAN + f_dM); + test("null17.0", "" + s_oAN + sf_f); + test("null-84.0", "" + s_oAN + sf_dM); + test("null58000000", "" + s_oAN + f_i); + test("null-55000000", "" + s_oAN + f_iM); + test("null1460392448", "" + s_oAN + f_l); + test("nullC(70)", "" + s_oAN + f_o); + test("null\u04511", "" + s_oAN + sf_strU); + test("null8000", "" + s_oAN + f_s); + test("null18", "" + s_oAN + s_str); + test("null-1000000", "" + s_oAN + s_iM); + test("null1000000", "" + s_oAN + sf_I); + test("nullnull", "" + s_oAN + f_oNtS); + test("nullfalse", "" + s_oAN + f_bl); + test("nullnull", "" + s_oAN + sf_iAN); + test("null-2000000", "" + s_oAN + sf_iM); + test("null-820130816", "" + s_oAN + f_lM); + test("nullnull", "" + s_oAN + sf_oAN); + test("null25000000", "" + s_oAN + s_I); + test("19-96.0", "" + f_str + s_dM); + test("19null", "" + f_str + s_oNtS); + test("19\u045176", "" + f_str + f_strU); + test("1992", "" + f_str + sf_strU2); + test("1951", "" + f_str + sf_strU1); + test("19null", "" + f_str + s_iAN); + test("19-54", "" + f_str + f_bM); + test("19-87.0", "" + f_str + f_fM); + test("19null", "" + f_str + s_oAN); + test("1919", "" + f_str + f_str); + test("19-41", "" + f_str + sf_bM); + test("19null", "" + f_str + sf_IN); + test("19T", "" + f_str + s_c); + test("19-42.0", "" + f_str + sf_fM); + test("1925", "" + f_str + s_b); + test("19null", "" + f_str + f_oN); + test("19-1410065408", "" + f_str + s_lM); + test("198.0", "" + f_str + s_d); + test("1955.0", "" + f_str + s_f); + test("1997000000", "" + f_str + s_i); + test("19-9900", "" + f_str + f_sM); + test("19935228928", "" + f_str + s_l); + test("19-8400", "" + f_str + sf_sM); + test("19C(82)", "" + f_str + s_o); + test("19null", "" + f_str + sf_oNtS); + test("19true", "" + f_str + s_bl); + test("193900", "" + f_str + s_s); + test("19null", "" + f_str + sf_oN); + test("1994000000", "" + f_str + f_I); + test("19null", "" + f_str + f_IN); + test("19true", "" + f_str + sf_bl); + test("195500", "" + f_str + sf_s); + test("19-2900", "" + f_str + s_sM); + test("19-194313216", "" + f_str + sf_l); + test("1912", "" + f_str + s_strU1); + test("19C(87)", "" + f_str + sf_o); + test("1991", "" + f_str + s_strU2); + test("1921", "" + f_str + f_strU1); + test("1918", "" + f_str + f_strU2); + test("19null", "" + f_str + f_iAN); + test("19null", "" + f_str + s_oN); + test("19\u045180", "" + f_str + s_strU); + test("19C", "" + f_str + sf_c); + test("1975", "" + f_str + sf_str); + test("19-43", "" + f_str + s_bM); + test("1980", "" + f_str + sf_b); + test("19null", "" + f_str + s_IN); + test("19-52.0", "" + f_str + s_fM); + test("1975000000", "" + f_str + sf_i); + test("1944", "" + f_str + f_b); + test("19-1705032704", "" + f_str + sf_lM); + test("19null", "" + f_str + f_oAN); + test("1983.0", "" + f_str + f_d); + test("19I", "" + f_str + f_c); + test("1994.0", "" + f_str + f_f); + test("1912.0", "" + f_str + sf_d); + test("19-99.0", "" + f_str + f_dM); + test("1917.0", "" + f_str + sf_f); + test("19-84.0", "" + f_str + sf_dM); + test("1958000000", "" + f_str + f_i); + test("19-55000000", "" + f_str + f_iM); + test("191460392448", "" + f_str + f_l); + test("19C(70)", "" + f_str + f_o); + test("19\u04511", "" + f_str + sf_strU); + test("198000", "" + f_str + f_s); + test("1918", "" + f_str + s_str); + test("19-1000000", "" + f_str + s_iM); + test("191000000", "" + f_str + sf_I); + test("19null", "" + f_str + f_oNtS); + test("19false", "" + f_str + f_bl); + test("19null", "" + f_str + sf_iAN); + test("19-2000000", "" + f_str + sf_iM); + test("19-820130816", "" + f_str + f_lM); + test("19null", "" + f_str + sf_oAN); + test("1925000000", "" + f_str + s_I); + test("-41-96.0", "" + sf_bM + s_dM); + test("-41null", "" + sf_bM + s_oNtS); + test("-41\u045176", "" + sf_bM + f_strU); + test("-4192", "" + sf_bM + sf_strU2); + test("-4151", "" + sf_bM + sf_strU1); + test("-41null", "" + sf_bM + s_iAN); + test("-41-54", "" + sf_bM + f_bM); + test("-41-87.0", "" + sf_bM + f_fM); + test("-41null", "" + sf_bM + s_oAN); + test("-4119", "" + sf_bM + f_str); + test("-41-41", "" + sf_bM + sf_bM); + test("-41null", "" + sf_bM + sf_IN); + test("-41T", "" + sf_bM + s_c); + test("-41-42.0", "" + sf_bM + sf_fM); + test("-4125", "" + sf_bM + s_b); + test("-41null", "" + sf_bM + f_oN); + test("-41-1410065408", "" + sf_bM + s_lM); + test("-418.0", "" + sf_bM + s_d); + test("-4155.0", "" + sf_bM + s_f); + test("-4197000000", "" + sf_bM + s_i); + test("-41-9900", "" + sf_bM + f_sM); + test("-41935228928", "" + sf_bM + s_l); + test("-41-8400", "" + sf_bM + sf_sM); + test("-41C(82)", "" + sf_bM + s_o); + test("-41null", "" + sf_bM + sf_oNtS); + test("-41true", "" + sf_bM + s_bl); + test("-413900", "" + sf_bM + s_s); + test("-41null", "" + sf_bM + sf_oN); + test("-4194000000", "" + sf_bM + f_I); + test("-41null", "" + sf_bM + f_IN); + test("-41true", "" + sf_bM + sf_bl); + test("-415500", "" + sf_bM + sf_s); + test("-41-2900", "" + sf_bM + s_sM); + test("-41-194313216", "" + sf_bM + sf_l); + test("-4112", "" + sf_bM + s_strU1); + test("-41C(87)", "" + sf_bM + sf_o); + test("-4191", "" + sf_bM + s_strU2); + test("-4121", "" + sf_bM + f_strU1); + test("-4118", "" + sf_bM + f_strU2); + test("-41null", "" + sf_bM + f_iAN); + test("-41null", "" + sf_bM + s_oN); + test("-41\u045180", "" + sf_bM + s_strU); + test("-41C", "" + sf_bM + sf_c); + test("-4175", "" + sf_bM + sf_str); + test("-41-43", "" + sf_bM + s_bM); + test("-4180", "" + sf_bM + sf_b); + test("-41null", "" + sf_bM + s_IN); + test("-41-52.0", "" + sf_bM + s_fM); + test("-4175000000", "" + sf_bM + sf_i); + test("-4144", "" + sf_bM + f_b); + test("-41-1705032704", "" + sf_bM + sf_lM); + test("-41null", "" + sf_bM + f_oAN); + test("-4183.0", "" + sf_bM + f_d); + test("-41I", "" + sf_bM + f_c); + test("-4194.0", "" + sf_bM + f_f); + test("-4112.0", "" + sf_bM + sf_d); + test("-41-99.0", "" + sf_bM + f_dM); + test("-4117.0", "" + sf_bM + sf_f); + test("-41-84.0", "" + sf_bM + sf_dM); + test("-4158000000", "" + sf_bM + f_i); + test("-41-55000000", "" + sf_bM + f_iM); + test("-411460392448", "" + sf_bM + f_l); + test("-41C(70)", "" + sf_bM + f_o); + test("-41\u04511", "" + sf_bM + sf_strU); + test("-418000", "" + sf_bM + f_s); + test("-4118", "" + sf_bM + s_str); + test("-41-1000000", "" + sf_bM + s_iM); + test("-411000000", "" + sf_bM + sf_I); + test("-41null", "" + sf_bM + f_oNtS); + test("-41false", "" + sf_bM + f_bl); + test("-41null", "" + sf_bM + sf_iAN); + test("-41-2000000", "" + sf_bM + sf_iM); + test("-41-820130816", "" + sf_bM + f_lM); + test("-41null", "" + sf_bM + sf_oAN); + test("-4125000000", "" + sf_bM + s_I); + test("null-96.0", "" + sf_IN + s_dM); + test("nullnull", "" + sf_IN + s_oNtS); + test("null\u045176", "" + sf_IN + f_strU); + test("null92", "" + sf_IN + sf_strU2); + test("null51", "" + sf_IN + sf_strU1); + test("nullnull", "" + sf_IN + s_iAN); + test("null-54", "" + sf_IN + f_bM); + test("null-87.0", "" + sf_IN + f_fM); + test("nullnull", "" + sf_IN + s_oAN); + test("null19", "" + sf_IN + f_str); + test("null-41", "" + sf_IN + sf_bM); + test("nullnull", "" + sf_IN + sf_IN); + test("nullT", "" + sf_IN + s_c); + test("null-42.0", "" + sf_IN + sf_fM); + test("null25", "" + sf_IN + s_b); + test("nullnull", "" + sf_IN + f_oN); + test("null-1410065408", "" + sf_IN + s_lM); + test("null8.0", "" + sf_IN + s_d); + test("null55.0", "" + sf_IN + s_f); + test("null97000000", "" + sf_IN + s_i); + test("null-9900", "" + sf_IN + f_sM); + test("null935228928", "" + sf_IN + s_l); + test("null-8400", "" + sf_IN + sf_sM); + test("nullC(82)", "" + sf_IN + s_o); + test("nullnull", "" + sf_IN + sf_oNtS); + test("nulltrue", "" + sf_IN + s_bl); + test("null3900", "" + sf_IN + s_s); + test("nullnull", "" + sf_IN + sf_oN); + test("null94000000", "" + sf_IN + f_I); + test("nullnull", "" + sf_IN + f_IN); + test("nulltrue", "" + sf_IN + sf_bl); + test("null5500", "" + sf_IN + sf_s); + test("null-2900", "" + sf_IN + s_sM); + test("null-194313216", "" + sf_IN + sf_l); + test("null12", "" + sf_IN + s_strU1); + test("nullC(87)", "" + sf_IN + sf_o); + test("null91", "" + sf_IN + s_strU2); + test("null21", "" + sf_IN + f_strU1); + test("null18", "" + sf_IN + f_strU2); + test("nullnull", "" + sf_IN + f_iAN); + test("nullnull", "" + sf_IN + s_oN); + test("null\u045180", "" + sf_IN + s_strU); + test("nullC", "" + sf_IN + sf_c); + test("null75", "" + sf_IN + sf_str); + test("null-43", "" + sf_IN + s_bM); + test("null80", "" + sf_IN + sf_b); + test("nullnull", "" + sf_IN + s_IN); + test("null-52.0", "" + sf_IN + s_fM); + test("null75000000", "" + sf_IN + sf_i); + test("null44", "" + sf_IN + f_b); + test("null-1705032704", "" + sf_IN + sf_lM); + test("nullnull", "" + sf_IN + f_oAN); + test("null83.0", "" + sf_IN + f_d); + test("nullI", "" + sf_IN + f_c); + test("null94.0", "" + sf_IN + f_f); + test("null12.0", "" + sf_IN + sf_d); + test("null-99.0", "" + sf_IN + f_dM); + test("null17.0", "" + sf_IN + sf_f); + test("null-84.0", "" + sf_IN + sf_dM); + test("null58000000", "" + sf_IN + f_i); + test("null-55000000", "" + sf_IN + f_iM); + test("null1460392448", "" + sf_IN + f_l); + test("nullC(70)", "" + sf_IN + f_o); + test("null\u04511", "" + sf_IN + sf_strU); + test("null8000", "" + sf_IN + f_s); + test("null18", "" + sf_IN + s_str); + test("null-1000000", "" + sf_IN + s_iM); + test("null1000000", "" + sf_IN + sf_I); + test("nullnull", "" + sf_IN + f_oNtS); + test("nullfalse", "" + sf_IN + f_bl); + test("nullnull", "" + sf_IN + sf_iAN); + test("null-2000000", "" + sf_IN + sf_iM); + test("null-820130816", "" + sf_IN + f_lM); + test("nullnull", "" + sf_IN + sf_oAN); + test("null25000000", "" + sf_IN + s_I); + test("T-96.0", "" + s_c + s_dM); + test("Tnull", "" + s_c + s_oNtS); + test("T\u045176", "" + s_c + f_strU); + test("T92", "" + s_c + sf_strU2); + test("T51", "" + s_c + sf_strU1); + test("Tnull", "" + s_c + s_iAN); + test("T-54", "" + s_c + f_bM); + test("T-87.0", "" + s_c + f_fM); + test("Tnull", "" + s_c + s_oAN); + test("T19", "" + s_c + f_str); + test("T-41", "" + s_c + sf_bM); + test("Tnull", "" + s_c + sf_IN); + test("TT", "" + s_c + s_c); + test("T-42.0", "" + s_c + sf_fM); + test("T25", "" + s_c + s_b); + test("Tnull", "" + s_c + f_oN); + test("T-1410065408", "" + s_c + s_lM); + test("T8.0", "" + s_c + s_d); + test("T55.0", "" + s_c + s_f); + test("T97000000", "" + s_c + s_i); + test("T-9900", "" + s_c + f_sM); + test("T935228928", "" + s_c + s_l); + test("T-8400", "" + s_c + sf_sM); + test("TC(82)", "" + s_c + s_o); + test("Tnull", "" + s_c + sf_oNtS); + } + + public void run1() { + test("Ttrue", "" + s_c + s_bl); + test("T3900", "" + s_c + s_s); + test("Tnull", "" + s_c + sf_oN); + test("T94000000", "" + s_c + f_I); + test("Tnull", "" + s_c + f_IN); + test("Ttrue", "" + s_c + sf_bl); + test("T5500", "" + s_c + sf_s); + test("T-2900", "" + s_c + s_sM); + test("T-194313216", "" + s_c + sf_l); + test("T12", "" + s_c + s_strU1); + test("TC(87)", "" + s_c + sf_o); + test("T91", "" + s_c + s_strU2); + test("T21", "" + s_c + f_strU1); + test("T18", "" + s_c + f_strU2); + test("Tnull", "" + s_c + f_iAN); + test("Tnull", "" + s_c + s_oN); + test("T\u045180", "" + s_c + s_strU); + test("TC", "" + s_c + sf_c); + test("T75", "" + s_c + sf_str); + test("T-43", "" + s_c + s_bM); + test("T80", "" + s_c + sf_b); + test("Tnull", "" + s_c + s_IN); + test("T-52.0", "" + s_c + s_fM); + test("T75000000", "" + s_c + sf_i); + test("T44", "" + s_c + f_b); + test("T-1705032704", "" + s_c + sf_lM); + test("Tnull", "" + s_c + f_oAN); + test("T83.0", "" + s_c + f_d); + test("TI", "" + s_c + f_c); + test("T94.0", "" + s_c + f_f); + test("T12.0", "" + s_c + sf_d); + test("T-99.0", "" + s_c + f_dM); + test("T17.0", "" + s_c + sf_f); + test("T-84.0", "" + s_c + sf_dM); + test("T58000000", "" + s_c + f_i); + test("T-55000000", "" + s_c + f_iM); + test("T1460392448", "" + s_c + f_l); + test("TC(70)", "" + s_c + f_o); + test("T\u04511", "" + s_c + sf_strU); + test("T8000", "" + s_c + f_s); + test("T18", "" + s_c + s_str); + test("T-1000000", "" + s_c + s_iM); + test("T1000000", "" + s_c + sf_I); + test("Tnull", "" + s_c + f_oNtS); + test("Tfalse", "" + s_c + f_bl); + test("Tnull", "" + s_c + sf_iAN); + test("T-2000000", "" + s_c + sf_iM); + test("T-820130816", "" + s_c + f_lM); + test("Tnull", "" + s_c + sf_oAN); + test("T25000000", "" + s_c + s_I); + test("-42.0-96.0", "" + sf_fM + s_dM); + test("-42.0null", "" + sf_fM + s_oNtS); + test("-42.0\u045176", "" + sf_fM + f_strU); + test("-42.092", "" + sf_fM + sf_strU2); + test("-42.051", "" + sf_fM + sf_strU1); + test("-42.0null", "" + sf_fM + s_iAN); + test("-42.0-54", "" + sf_fM + f_bM); + test("-42.0-87.0", "" + sf_fM + f_fM); + test("-42.0null", "" + sf_fM + s_oAN); + test("-42.019", "" + sf_fM + f_str); + test("-42.0-41", "" + sf_fM + sf_bM); + test("-42.0null", "" + sf_fM + sf_IN); + test("-42.0T", "" + sf_fM + s_c); + test("-42.0-42.0", "" + sf_fM + sf_fM); + test("-42.025", "" + sf_fM + s_b); + test("-42.0null", "" + sf_fM + f_oN); + test("-42.0-1410065408", "" + sf_fM + s_lM); + test("-42.08.0", "" + sf_fM + s_d); + test("-42.055.0", "" + sf_fM + s_f); + test("-42.097000000", "" + sf_fM + s_i); + test("-42.0-9900", "" + sf_fM + f_sM); + test("-42.0935228928", "" + sf_fM + s_l); + test("-42.0-8400", "" + sf_fM + sf_sM); + test("-42.0C(82)", "" + sf_fM + s_o); + test("-42.0null", "" + sf_fM + sf_oNtS); + test("-42.0true", "" + sf_fM + s_bl); + test("-42.03900", "" + sf_fM + s_s); + test("-42.0null", "" + sf_fM + sf_oN); + test("-42.094000000", "" + sf_fM + f_I); + test("-42.0null", "" + sf_fM + f_IN); + test("-42.0true", "" + sf_fM + sf_bl); + test("-42.05500", "" + sf_fM + sf_s); + test("-42.0-2900", "" + sf_fM + s_sM); + test("-42.0-194313216", "" + sf_fM + sf_l); + test("-42.012", "" + sf_fM + s_strU1); + test("-42.0C(87)", "" + sf_fM + sf_o); + test("-42.091", "" + sf_fM + s_strU2); + test("-42.021", "" + sf_fM + f_strU1); + test("-42.018", "" + sf_fM + f_strU2); + test("-42.0null", "" + sf_fM + f_iAN); + test("-42.0null", "" + sf_fM + s_oN); + test("-42.0\u045180", "" + sf_fM + s_strU); + test("-42.0C", "" + sf_fM + sf_c); + test("-42.075", "" + sf_fM + sf_str); + test("-42.0-43", "" + sf_fM + s_bM); + test("-42.080", "" + sf_fM + sf_b); + test("-42.0null", "" + sf_fM + s_IN); + test("-42.0-52.0", "" + sf_fM + s_fM); + test("-42.075000000", "" + sf_fM + sf_i); + test("-42.044", "" + sf_fM + f_b); + test("-42.0-1705032704", "" + sf_fM + sf_lM); + test("-42.0null", "" + sf_fM + f_oAN); + test("-42.083.0", "" + sf_fM + f_d); + test("-42.0I", "" + sf_fM + f_c); + test("-42.094.0", "" + sf_fM + f_f); + test("-42.012.0", "" + sf_fM + sf_d); + test("-42.0-99.0", "" + sf_fM + f_dM); + test("-42.017.0", "" + sf_fM + sf_f); + test("-42.0-84.0", "" + sf_fM + sf_dM); + test("-42.058000000", "" + sf_fM + f_i); + test("-42.0-55000000", "" + sf_fM + f_iM); + test("-42.01460392448", "" + sf_fM + f_l); + test("-42.0C(70)", "" + sf_fM + f_o); + test("-42.0\u04511", "" + sf_fM + sf_strU); + test("-42.08000", "" + sf_fM + f_s); + test("-42.018", "" + sf_fM + s_str); + test("-42.0-1000000", "" + sf_fM + s_iM); + test("-42.01000000", "" + sf_fM + sf_I); + test("-42.0null", "" + sf_fM + f_oNtS); + test("-42.0false", "" + sf_fM + f_bl); + test("-42.0null", "" + sf_fM + sf_iAN); + test("-42.0-2000000", "" + sf_fM + sf_iM); + test("-42.0-820130816", "" + sf_fM + f_lM); + test("-42.0null", "" + sf_fM + sf_oAN); + test("-42.025000000", "" + sf_fM + s_I); + test("25-96.0", "" + s_b + s_dM); + test("25null", "" + s_b + s_oNtS); + test("25\u045176", "" + s_b + f_strU); + test("2592", "" + s_b + sf_strU2); + test("2551", "" + s_b + sf_strU1); + test("25null", "" + s_b + s_iAN); + test("25-54", "" + s_b + f_bM); + test("25-87.0", "" + s_b + f_fM); + test("25null", "" + s_b + s_oAN); + test("2519", "" + s_b + f_str); + test("25-41", "" + s_b + sf_bM); + test("25null", "" + s_b + sf_IN); + test("25T", "" + s_b + s_c); + test("25-42.0", "" + s_b + sf_fM); + test("2525", "" + s_b + s_b); + test("25null", "" + s_b + f_oN); + test("25-1410065408", "" + s_b + s_lM); + test("258.0", "" + s_b + s_d); + test("2555.0", "" + s_b + s_f); + test("2597000000", "" + s_b + s_i); + test("25-9900", "" + s_b + f_sM); + test("25935228928", "" + s_b + s_l); + test("25-8400", "" + s_b + sf_sM); + test("25C(82)", "" + s_b + s_o); + test("25null", "" + s_b + sf_oNtS); + test("25true", "" + s_b + s_bl); + test("253900", "" + s_b + s_s); + test("25null", "" + s_b + sf_oN); + test("2594000000", "" + s_b + f_I); + test("25null", "" + s_b + f_IN); + test("25true", "" + s_b + sf_bl); + test("255500", "" + s_b + sf_s); + test("25-2900", "" + s_b + s_sM); + test("25-194313216", "" + s_b + sf_l); + test("2512", "" + s_b + s_strU1); + test("25C(87)", "" + s_b + sf_o); + test("2591", "" + s_b + s_strU2); + test("2521", "" + s_b + f_strU1); + test("2518", "" + s_b + f_strU2); + test("25null", "" + s_b + f_iAN); + test("25null", "" + s_b + s_oN); + test("25\u045180", "" + s_b + s_strU); + test("25C", "" + s_b + sf_c); + test("2575", "" + s_b + sf_str); + test("25-43", "" + s_b + s_bM); + test("2580", "" + s_b + sf_b); + test("25null", "" + s_b + s_IN); + test("25-52.0", "" + s_b + s_fM); + test("2575000000", "" + s_b + sf_i); + test("2544", "" + s_b + f_b); + test("25-1705032704", "" + s_b + sf_lM); + test("25null", "" + s_b + f_oAN); + test("2583.0", "" + s_b + f_d); + test("25I", "" + s_b + f_c); + test("2594.0", "" + s_b + f_f); + test("2512.0", "" + s_b + sf_d); + test("25-99.0", "" + s_b + f_dM); + test("2517.0", "" + s_b + sf_f); + test("25-84.0", "" + s_b + sf_dM); + test("2558000000", "" + s_b + f_i); + test("25-55000000", "" + s_b + f_iM); + test("251460392448", "" + s_b + f_l); + test("25C(70)", "" + s_b + f_o); + test("25\u04511", "" + s_b + sf_strU); + test("258000", "" + s_b + f_s); + test("2518", "" + s_b + s_str); + test("25-1000000", "" + s_b + s_iM); + test("251000000", "" + s_b + sf_I); + test("25null", "" + s_b + f_oNtS); + test("25false", "" + s_b + f_bl); + test("25null", "" + s_b + sf_iAN); + test("25-2000000", "" + s_b + sf_iM); + test("25-820130816", "" + s_b + f_lM); + test("25null", "" + s_b + sf_oAN); + test("2525000000", "" + s_b + s_I); + test("null-96.0", "" + f_oN + s_dM); + test("nullnull", "" + f_oN + s_oNtS); + test("null\u045176", "" + f_oN + f_strU); + test("null92", "" + f_oN + sf_strU2); + test("null51", "" + f_oN + sf_strU1); + test("nullnull", "" + f_oN + s_iAN); + test("null-54", "" + f_oN + f_bM); + test("null-87.0", "" + f_oN + f_fM); + test("nullnull", "" + f_oN + s_oAN); + test("null19", "" + f_oN + f_str); + test("null-41", "" + f_oN + sf_bM); + test("nullnull", "" + f_oN + sf_IN); + test("nullT", "" + f_oN + s_c); + test("null-42.0", "" + f_oN + sf_fM); + test("null25", "" + f_oN + s_b); + test("nullnull", "" + f_oN + f_oN); + test("null-1410065408", "" + f_oN + s_lM); + test("null8.0", "" + f_oN + s_d); + test("null55.0", "" + f_oN + s_f); + test("null97000000", "" + f_oN + s_i); + test("null-9900", "" + f_oN + f_sM); + test("null935228928", "" + f_oN + s_l); + test("null-8400", "" + f_oN + sf_sM); + test("nullC(82)", "" + f_oN + s_o); + test("nullnull", "" + f_oN + sf_oNtS); + test("nulltrue", "" + f_oN + s_bl); + test("null3900", "" + f_oN + s_s); + test("nullnull", "" + f_oN + sf_oN); + test("null94000000", "" + f_oN + f_I); + test("nullnull", "" + f_oN + f_IN); + test("nulltrue", "" + f_oN + sf_bl); + test("null5500", "" + f_oN + sf_s); + test("null-2900", "" + f_oN + s_sM); + test("null-194313216", "" + f_oN + sf_l); + test("null12", "" + f_oN + s_strU1); + test("nullC(87)", "" + f_oN + sf_o); + test("null91", "" + f_oN + s_strU2); + test("null21", "" + f_oN + f_strU1); + test("null18", "" + f_oN + f_strU2); + test("nullnull", "" + f_oN + f_iAN); + test("nullnull", "" + f_oN + s_oN); + test("null\u045180", "" + f_oN + s_strU); + test("nullC", "" + f_oN + sf_c); + test("null75", "" + f_oN + sf_str); + test("null-43", "" + f_oN + s_bM); + test("null80", "" + f_oN + sf_b); + test("nullnull", "" + f_oN + s_IN); + test("null-52.0", "" + f_oN + s_fM); + test("null75000000", "" + f_oN + sf_i); + test("null44", "" + f_oN + f_b); + test("null-1705032704", "" + f_oN + sf_lM); + test("nullnull", "" + f_oN + f_oAN); + test("null83.0", "" + f_oN + f_d); + test("nullI", "" + f_oN + f_c); + test("null94.0", "" + f_oN + f_f); + test("null12.0", "" + f_oN + sf_d); + test("null-99.0", "" + f_oN + f_dM); + test("null17.0", "" + f_oN + sf_f); + test("null-84.0", "" + f_oN + sf_dM); + test("null58000000", "" + f_oN + f_i); + test("null-55000000", "" + f_oN + f_iM); + test("null1460392448", "" + f_oN + f_l); + test("nullC(70)", "" + f_oN + f_o); + test("null\u04511", "" + f_oN + sf_strU); + test("null8000", "" + f_oN + f_s); + test("null18", "" + f_oN + s_str); + test("null-1000000", "" + f_oN + s_iM); + test("null1000000", "" + f_oN + sf_I); + test("nullnull", "" + f_oN + f_oNtS); + test("nullfalse", "" + f_oN + f_bl); + test("nullnull", "" + f_oN + sf_iAN); + test("null-2000000", "" + f_oN + sf_iM); + test("null-820130816", "" + f_oN + f_lM); + test("nullnull", "" + f_oN + sf_oAN); + test("null25000000", "" + f_oN + s_I); + test("-1410065408-96.0", "" + s_lM + s_dM); + test("-1410065408null", "" + s_lM + s_oNtS); + test("-1410065408\u045176", "" + s_lM + f_strU); + test("-141006540892", "" + s_lM + sf_strU2); + test("-141006540851", "" + s_lM + sf_strU1); + test("-1410065408null", "" + s_lM + s_iAN); + test("-1410065408-54", "" + s_lM + f_bM); + test("-1410065408-87.0", "" + s_lM + f_fM); + test("-1410065408null", "" + s_lM + s_oAN); + test("-141006540819", "" + s_lM + f_str); + test("-1410065408-41", "" + s_lM + sf_bM); + test("-1410065408null", "" + s_lM + sf_IN); + test("-1410065408T", "" + s_lM + s_c); + test("-1410065408-42.0", "" + s_lM + sf_fM); + test("-141006540825", "" + s_lM + s_b); + test("-1410065408null", "" + s_lM + f_oN); + test("-1410065408-1410065408", "" + s_lM + s_lM); + test("-14100654088.0", "" + s_lM + s_d); + test("-141006540855.0", "" + s_lM + s_f); + test("-141006540897000000", "" + s_lM + s_i); + test("-1410065408-9900", "" + s_lM + f_sM); + test("-1410065408935228928", "" + s_lM + s_l); + test("-1410065408-8400", "" + s_lM + sf_sM); + test("-1410065408C(82)", "" + s_lM + s_o); + test("-1410065408null", "" + s_lM + sf_oNtS); + test("-1410065408true", "" + s_lM + s_bl); + test("-14100654083900", "" + s_lM + s_s); + test("-1410065408null", "" + s_lM + sf_oN); + test("-141006540894000000", "" + s_lM + f_I); + test("-1410065408null", "" + s_lM + f_IN); + test("-1410065408true", "" + s_lM + sf_bl); + test("-14100654085500", "" + s_lM + sf_s); + test("-1410065408-2900", "" + s_lM + s_sM); + test("-1410065408-194313216", "" + s_lM + sf_l); + test("-141006540812", "" + s_lM + s_strU1); + test("-1410065408C(87)", "" + s_lM + sf_o); + test("-141006540891", "" + s_lM + s_strU2); + test("-141006540821", "" + s_lM + f_strU1); + test("-141006540818", "" + s_lM + f_strU2); + test("-1410065408null", "" + s_lM + f_iAN); + test("-1410065408null", "" + s_lM + s_oN); + test("-1410065408\u045180", "" + s_lM + s_strU); + test("-1410065408C", "" + s_lM + sf_c); + test("-141006540875", "" + s_lM + sf_str); + test("-1410065408-43", "" + s_lM + s_bM); + test("-141006540880", "" + s_lM + sf_b); + test("-1410065408null", "" + s_lM + s_IN); + test("-1410065408-52.0", "" + s_lM + s_fM); + test("-141006540875000000", "" + s_lM + sf_i); + test("-141006540844", "" + s_lM + f_b); + test("-1410065408-1705032704", "" + s_lM + sf_lM); + test("-1410065408null", "" + s_lM + f_oAN); + test("-141006540883.0", "" + s_lM + f_d); + test("-1410065408I", "" + s_lM + f_c); + test("-141006540894.0", "" + s_lM + f_f); + test("-141006540812.0", "" + s_lM + sf_d); + test("-1410065408-99.0", "" + s_lM + f_dM); + test("-141006540817.0", "" + s_lM + sf_f); + test("-1410065408-84.0", "" + s_lM + sf_dM); + test("-141006540858000000", "" + s_lM + f_i); + test("-1410065408-55000000", "" + s_lM + f_iM); + test("-14100654081460392448", "" + s_lM + f_l); + test("-1410065408C(70)", "" + s_lM + f_o); + test("-1410065408\u04511", "" + s_lM + sf_strU); + test("-14100654088000", "" + s_lM + f_s); + test("-141006540818", "" + s_lM + s_str); + test("-1410065408-1000000", "" + s_lM + s_iM); + test("-14100654081000000", "" + s_lM + sf_I); + test("-1410065408null", "" + s_lM + f_oNtS); + test("-1410065408false", "" + s_lM + f_bl); + test("-1410065408null", "" + s_lM + sf_iAN); + test("-1410065408-2000000", "" + s_lM + sf_iM); + test("-1410065408-820130816", "" + s_lM + f_lM); + test("-1410065408null", "" + s_lM + sf_oAN); + test("-141006540825000000", "" + s_lM + s_I); + test("8.0-96.0", "" + s_d + s_dM); + test("8.0null", "" + s_d + s_oNtS); + test("8.0\u045176", "" + s_d + f_strU); + test("8.092", "" + s_d + sf_strU2); + test("8.051", "" + s_d + sf_strU1); + test("8.0null", "" + s_d + s_iAN); + test("8.0-54", "" + s_d + f_bM); + test("8.0-87.0", "" + s_d + f_fM); + test("8.0null", "" + s_d + s_oAN); + test("8.019", "" + s_d + f_str); + test("8.0-41", "" + s_d + sf_bM); + test("8.0null", "" + s_d + sf_IN); + test("8.0T", "" + s_d + s_c); + test("8.0-42.0", "" + s_d + sf_fM); + test("8.025", "" + s_d + s_b); + test("8.0null", "" + s_d + f_oN); + test("8.0-1410065408", "" + s_d + s_lM); + test("8.08.0", "" + s_d + s_d); + test("8.055.0", "" + s_d + s_f); + test("8.097000000", "" + s_d + s_i); + test("8.0-9900", "" + s_d + f_sM); + test("8.0935228928", "" + s_d + s_l); + test("8.0-8400", "" + s_d + sf_sM); + test("8.0C(82)", "" + s_d + s_o); + test("8.0null", "" + s_d + sf_oNtS); + test("8.0true", "" + s_d + s_bl); + test("8.03900", "" + s_d + s_s); + test("8.0null", "" + s_d + sf_oN); + test("8.094000000", "" + s_d + f_I); + test("8.0null", "" + s_d + f_IN); + test("8.0true", "" + s_d + sf_bl); + test("8.05500", "" + s_d + sf_s); + test("8.0-2900", "" + s_d + s_sM); + test("8.0-194313216", "" + s_d + sf_l); + test("8.012", "" + s_d + s_strU1); + test("8.0C(87)", "" + s_d + sf_o); + test("8.091", "" + s_d + s_strU2); + test("8.021", "" + s_d + f_strU1); + test("8.018", "" + s_d + f_strU2); + test("8.0null", "" + s_d + f_iAN); + test("8.0null", "" + s_d + s_oN); + test("8.0\u045180", "" + s_d + s_strU); + test("8.0C", "" + s_d + sf_c); + test("8.075", "" + s_d + sf_str); + test("8.0-43", "" + s_d + s_bM); + test("8.080", "" + s_d + sf_b); + test("8.0null", "" + s_d + s_IN); + test("8.0-52.0", "" + s_d + s_fM); + test("8.075000000", "" + s_d + sf_i); + test("8.044", "" + s_d + f_b); + test("8.0-1705032704", "" + s_d + sf_lM); + test("8.0null", "" + s_d + f_oAN); + test("8.083.0", "" + s_d + f_d); + test("8.0I", "" + s_d + f_c); + test("8.094.0", "" + s_d + f_f); + test("8.012.0", "" + s_d + sf_d); + test("8.0-99.0", "" + s_d + f_dM); + test("8.017.0", "" + s_d + sf_f); + test("8.0-84.0", "" + s_d + sf_dM); + test("8.058000000", "" + s_d + f_i); + test("8.0-55000000", "" + s_d + f_iM); + test("8.01460392448", "" + s_d + f_l); + test("8.0C(70)", "" + s_d + f_o); + test("8.0\u04511", "" + s_d + sf_strU); + test("8.08000", "" + s_d + f_s); + test("8.018", "" + s_d + s_str); + test("8.0-1000000", "" + s_d + s_iM); + test("8.01000000", "" + s_d + sf_I); + test("8.0null", "" + s_d + f_oNtS); + test("8.0false", "" + s_d + f_bl); + test("8.0null", "" + s_d + sf_iAN); + test("8.0-2000000", "" + s_d + sf_iM); + test("8.0-820130816", "" + s_d + f_lM); + test("8.0null", "" + s_d + sf_oAN); + test("8.025000000", "" + s_d + s_I); + test("55.0-96.0", "" + s_f + s_dM); + test("55.0null", "" + s_f + s_oNtS); + test("55.0\u045176", "" + s_f + f_strU); + test("55.092", "" + s_f + sf_strU2); + test("55.051", "" + s_f + sf_strU1); + test("55.0null", "" + s_f + s_iAN); + test("55.0-54", "" + s_f + f_bM); + test("55.0-87.0", "" + s_f + f_fM); + test("55.0null", "" + s_f + s_oAN); + test("55.019", "" + s_f + f_str); + test("55.0-41", "" + s_f + sf_bM); + test("55.0null", "" + s_f + sf_IN); + test("55.0T", "" + s_f + s_c); + test("55.0-42.0", "" + s_f + sf_fM); + test("55.025", "" + s_f + s_b); + test("55.0null", "" + s_f + f_oN); + test("55.0-1410065408", "" + s_f + s_lM); + test("55.08.0", "" + s_f + s_d); + test("55.055.0", "" + s_f + s_f); + test("55.097000000", "" + s_f + s_i); + test("55.0-9900", "" + s_f + f_sM); + test("55.0935228928", "" + s_f + s_l); + test("55.0-8400", "" + s_f + sf_sM); + test("55.0C(82)", "" + s_f + s_o); + test("55.0null", "" + s_f + sf_oNtS); + test("55.0true", "" + s_f + s_bl); + test("55.03900", "" + s_f + s_s); + test("55.0null", "" + s_f + sf_oN); + test("55.094000000", "" + s_f + f_I); + test("55.0null", "" + s_f + f_IN); + test("55.0true", "" + s_f + sf_bl); + test("55.05500", "" + s_f + sf_s); + test("55.0-2900", "" + s_f + s_sM); + test("55.0-194313216", "" + s_f + sf_l); + test("55.012", "" + s_f + s_strU1); + test("55.0C(87)", "" + s_f + sf_o); + test("55.091", "" + s_f + s_strU2); + test("55.021", "" + s_f + f_strU1); + test("55.018", "" + s_f + f_strU2); + test("55.0null", "" + s_f + f_iAN); + test("55.0null", "" + s_f + s_oN); + test("55.0\u045180", "" + s_f + s_strU); + test("55.0C", "" + s_f + sf_c); + test("55.075", "" + s_f + sf_str); + test("55.0-43", "" + s_f + s_bM); + test("55.080", "" + s_f + sf_b); + test("55.0null", "" + s_f + s_IN); + test("55.0-52.0", "" + s_f + s_fM); + test("55.075000000", "" + s_f + sf_i); + test("55.044", "" + s_f + f_b); + test("55.0-1705032704", "" + s_f + sf_lM); + test("55.0null", "" + s_f + f_oAN); + test("55.083.0", "" + s_f + f_d); + test("55.0I", "" + s_f + f_c); + test("55.094.0", "" + s_f + f_f); + test("55.012.0", "" + s_f + sf_d); + test("55.0-99.0", "" + s_f + f_dM); + test("55.017.0", "" + s_f + sf_f); + test("55.0-84.0", "" + s_f + sf_dM); + test("55.058000000", "" + s_f + f_i); + test("55.0-55000000", "" + s_f + f_iM); + test("55.01460392448", "" + s_f + f_l); + test("55.0C(70)", "" + s_f + f_o); + test("55.0\u04511", "" + s_f + sf_strU); + test("55.08000", "" + s_f + f_s); + test("55.018", "" + s_f + s_str); + test("55.0-1000000", "" + s_f + s_iM); + test("55.01000000", "" + s_f + sf_I); + test("55.0null", "" + s_f + f_oNtS); + test("55.0false", "" + s_f + f_bl); + test("55.0null", "" + s_f + sf_iAN); + test("55.0-2000000", "" + s_f + sf_iM); + test("55.0-820130816", "" + s_f + f_lM); + test("55.0null", "" + s_f + sf_oAN); + test("55.025000000", "" + s_f + s_I); + test("97000000-96.0", "" + s_i + s_dM); + test("97000000null", "" + s_i + s_oNtS); + test("97000000\u045176", "" + s_i + f_strU); + test("9700000092", "" + s_i + sf_strU2); + test("9700000051", "" + s_i + sf_strU1); + test("97000000null", "" + s_i + s_iAN); + test("97000000-54", "" + s_i + f_bM); + test("97000000-87.0", "" + s_i + f_fM); + test("97000000null", "" + s_i + s_oAN); + test("9700000019", "" + s_i + f_str); + test("97000000-41", "" + s_i + sf_bM); + test("97000000null", "" + s_i + sf_IN); + test("97000000T", "" + s_i + s_c); + test("97000000-42.0", "" + s_i + sf_fM); + test("9700000025", "" + s_i + s_b); + test("97000000null", "" + s_i + f_oN); + test("97000000-1410065408", "" + s_i + s_lM); + test("970000008.0", "" + s_i + s_d); + test("9700000055.0", "" + s_i + s_f); + test("9700000097000000", "" + s_i + s_i); + test("97000000-9900", "" + s_i + f_sM); + test("97000000935228928", "" + s_i + s_l); + test("97000000-8400", "" + s_i + sf_sM); + test("97000000C(82)", "" + s_i + s_o); + test("97000000null", "" + s_i + sf_oNtS); + test("97000000true", "" + s_i + s_bl); + test("970000003900", "" + s_i + s_s); + test("97000000null", "" + s_i + sf_oN); + test("9700000094000000", "" + s_i + f_I); + test("97000000null", "" + s_i + f_IN); + test("97000000true", "" + s_i + sf_bl); + test("970000005500", "" + s_i + sf_s); + test("97000000-2900", "" + s_i + s_sM); + test("97000000-194313216", "" + s_i + sf_l); + test("9700000012", "" + s_i + s_strU1); + test("97000000C(87)", "" + s_i + sf_o); + test("9700000091", "" + s_i + s_strU2); + test("9700000021", "" + s_i + f_strU1); + test("9700000018", "" + s_i + f_strU2); + test("97000000null", "" + s_i + f_iAN); + test("97000000null", "" + s_i + s_oN); + test("97000000\u045180", "" + s_i + s_strU); + test("97000000C", "" + s_i + sf_c); + test("9700000075", "" + s_i + sf_str); + test("97000000-43", "" + s_i + s_bM); + test("9700000080", "" + s_i + sf_b); + test("97000000null", "" + s_i + s_IN); + test("97000000-52.0", "" + s_i + s_fM); + test("9700000075000000", "" + s_i + sf_i); + test("9700000044", "" + s_i + f_b); + test("97000000-1705032704", "" + s_i + sf_lM); + test("97000000null", "" + s_i + f_oAN); + test("9700000083.0", "" + s_i + f_d); + test("97000000I", "" + s_i + f_c); + test("9700000094.0", "" + s_i + f_f); + test("9700000012.0", "" + s_i + sf_d); + test("97000000-99.0", "" + s_i + f_dM); + test("9700000017.0", "" + s_i + sf_f); + test("97000000-84.0", "" + s_i + sf_dM); + test("9700000058000000", "" + s_i + f_i); + test("97000000-55000000", "" + s_i + f_iM); + test("970000001460392448", "" + s_i + f_l); + test("97000000C(70)", "" + s_i + f_o); + test("97000000\u04511", "" + s_i + sf_strU); + test("970000008000", "" + s_i + f_s); + test("9700000018", "" + s_i + s_str); + test("97000000-1000000", "" + s_i + s_iM); + test("970000001000000", "" + s_i + sf_I); + test("97000000null", "" + s_i + f_oNtS); + test("97000000false", "" + s_i + f_bl); + test("97000000null", "" + s_i + sf_iAN); + test("97000000-2000000", "" + s_i + sf_iM); + test("97000000-820130816", "" + s_i + f_lM); + test("97000000null", "" + s_i + sf_oAN); + test("9700000025000000", "" + s_i + s_I); + test("-9900-96.0", "" + f_sM + s_dM); + test("-9900null", "" + f_sM + s_oNtS); + test("-9900\u045176", "" + f_sM + f_strU); + test("-990092", "" + f_sM + sf_strU2); + test("-990051", "" + f_sM + sf_strU1); + test("-9900null", "" + f_sM + s_iAN); + test("-9900-54", "" + f_sM + f_bM); + test("-9900-87.0", "" + f_sM + f_fM); + test("-9900null", "" + f_sM + s_oAN); + test("-990019", "" + f_sM + f_str); + test("-9900-41", "" + f_sM + sf_bM); + test("-9900null", "" + f_sM + sf_IN); + test("-9900T", "" + f_sM + s_c); + test("-9900-42.0", "" + f_sM + sf_fM); + test("-990025", "" + f_sM + s_b); + test("-9900null", "" + f_sM + f_oN); + test("-9900-1410065408", "" + f_sM + s_lM); + test("-99008.0", "" + f_sM + s_d); + test("-990055.0", "" + f_sM + s_f); + test("-990097000000", "" + f_sM + s_i); + test("-9900-9900", "" + f_sM + f_sM); + test("-9900935228928", "" + f_sM + s_l); + test("-9900-8400", "" + f_sM + sf_sM); + test("-9900C(82)", "" + f_sM + s_o); + test("-9900null", "" + f_sM + sf_oNtS); + test("-9900true", "" + f_sM + s_bl); + test("-99003900", "" + f_sM + s_s); + test("-9900null", "" + f_sM + sf_oN); + test("-990094000000", "" + f_sM + f_I); + test("-9900null", "" + f_sM + f_IN); + test("-9900true", "" + f_sM + sf_bl); + test("-99005500", "" + f_sM + sf_s); + test("-9900-2900", "" + f_sM + s_sM); + test("-9900-194313216", "" + f_sM + sf_l); + test("-990012", "" + f_sM + s_strU1); + test("-9900C(87)", "" + f_sM + sf_o); + test("-990091", "" + f_sM + s_strU2); + test("-990021", "" + f_sM + f_strU1); + test("-990018", "" + f_sM + f_strU2); + test("-9900null", "" + f_sM + f_iAN); + test("-9900null", "" + f_sM + s_oN); + test("-9900\u045180", "" + f_sM + s_strU); + test("-9900C", "" + f_sM + sf_c); + test("-990075", "" + f_sM + sf_str); + test("-9900-43", "" + f_sM + s_bM); + test("-990080", "" + f_sM + sf_b); + test("-9900null", "" + f_sM + s_IN); + test("-9900-52.0", "" + f_sM + s_fM); + test("-990075000000", "" + f_sM + sf_i); + test("-990044", "" + f_sM + f_b); + test("-9900-1705032704", "" + f_sM + sf_lM); + test("-9900null", "" + f_sM + f_oAN); + test("-990083.0", "" + f_sM + f_d); + test("-9900I", "" + f_sM + f_c); + test("-990094.0", "" + f_sM + f_f); + test("-990012.0", "" + f_sM + sf_d); + test("-9900-99.0", "" + f_sM + f_dM); + test("-990017.0", "" + f_sM + sf_f); + test("-9900-84.0", "" + f_sM + sf_dM); + test("-990058000000", "" + f_sM + f_i); + test("-9900-55000000", "" + f_sM + f_iM); + test("-99001460392448", "" + f_sM + f_l); + test("-9900C(70)", "" + f_sM + f_o); + test("-9900\u04511", "" + f_sM + sf_strU); + test("-99008000", "" + f_sM + f_s); + test("-990018", "" + f_sM + s_str); + test("-9900-1000000", "" + f_sM + s_iM); + test("-99001000000", "" + f_sM + sf_I); + test("-9900null", "" + f_sM + f_oNtS); + test("-9900false", "" + f_sM + f_bl); + test("-9900null", "" + f_sM + sf_iAN); + test("-9900-2000000", "" + f_sM + sf_iM); + test("-9900-820130816", "" + f_sM + f_lM); + test("-9900null", "" + f_sM + sf_oAN); + test("-990025000000", "" + f_sM + s_I); + test("935228928-96.0", "" + s_l + s_dM); + test("935228928null", "" + s_l + s_oNtS); + test("935228928\u045176", "" + s_l + f_strU); + test("93522892892", "" + s_l + sf_strU2); + test("93522892851", "" + s_l + sf_strU1); + test("935228928null", "" + s_l + s_iAN); + test("935228928-54", "" + s_l + f_bM); + test("935228928-87.0", "" + s_l + f_fM); + test("935228928null", "" + s_l + s_oAN); + test("93522892819", "" + s_l + f_str); + test("935228928-41", "" + s_l + sf_bM); + test("935228928null", "" + s_l + sf_IN); + test("935228928T", "" + s_l + s_c); + test("935228928-42.0", "" + s_l + sf_fM); + test("93522892825", "" + s_l + s_b); + test("935228928null", "" + s_l + f_oN); + test("935228928-1410065408", "" + s_l + s_lM); + test("9352289288.0", "" + s_l + s_d); + test("93522892855.0", "" + s_l + s_f); + test("93522892897000000", "" + s_l + s_i); + test("935228928-9900", "" + s_l + f_sM); + test("935228928935228928", "" + s_l + s_l); + test("935228928-8400", "" + s_l + sf_sM); + test("935228928C(82)", "" + s_l + s_o); + test("935228928null", "" + s_l + sf_oNtS); + test("935228928true", "" + s_l + s_bl); + test("9352289283900", "" + s_l + s_s); + test("935228928null", "" + s_l + sf_oN); + test("93522892894000000", "" + s_l + f_I); + test("935228928null", "" + s_l + f_IN); + test("935228928true", "" + s_l + sf_bl); + test("9352289285500", "" + s_l + sf_s); + test("935228928-2900", "" + s_l + s_sM); + test("935228928-194313216", "" + s_l + sf_l); + test("93522892812", "" + s_l + s_strU1); + test("935228928C(87)", "" + s_l + sf_o); + test("93522892891", "" + s_l + s_strU2); + test("93522892821", "" + s_l + f_strU1); + test("93522892818", "" + s_l + f_strU2); + test("935228928null", "" + s_l + f_iAN); + test("935228928null", "" + s_l + s_oN); + test("935228928\u045180", "" + s_l + s_strU); + test("935228928C", "" + s_l + sf_c); + test("93522892875", "" + s_l + sf_str); + test("935228928-43", "" + s_l + s_bM); + test("93522892880", "" + s_l + sf_b); + test("935228928null", "" + s_l + s_IN); + test("935228928-52.0", "" + s_l + s_fM); + test("93522892875000000", "" + s_l + sf_i); + test("93522892844", "" + s_l + f_b); + test("935228928-1705032704", "" + s_l + sf_lM); + test("935228928null", "" + s_l + f_oAN); + test("93522892883.0", "" + s_l + f_d); + test("935228928I", "" + s_l + f_c); + test("93522892894.0", "" + s_l + f_f); + test("93522892812.0", "" + s_l + sf_d); + test("935228928-99.0", "" + s_l + f_dM); + test("93522892817.0", "" + s_l + sf_f); + test("935228928-84.0", "" + s_l + sf_dM); + test("93522892858000000", "" + s_l + f_i); + test("935228928-55000000", "" + s_l + f_iM); + test("9352289281460392448", "" + s_l + f_l); + test("935228928C(70)", "" + s_l + f_o); + test("935228928\u04511", "" + s_l + sf_strU); + test("9352289288000", "" + s_l + f_s); + test("93522892818", "" + s_l + s_str); + test("935228928-1000000", "" + s_l + s_iM); + test("9352289281000000", "" + s_l + sf_I); + test("935228928null", "" + s_l + f_oNtS); + test("935228928false", "" + s_l + f_bl); + test("935228928null", "" + s_l + sf_iAN); + test("935228928-2000000", "" + s_l + sf_iM); + test("935228928-820130816", "" + s_l + f_lM); + test("935228928null", "" + s_l + sf_oAN); + test("93522892825000000", "" + s_l + s_I); + test("-8400-96.0", "" + sf_sM + s_dM); + test("-8400null", "" + sf_sM + s_oNtS); + test("-8400\u045176", "" + sf_sM + f_strU); + test("-840092", "" + sf_sM + sf_strU2); + test("-840051", "" + sf_sM + sf_strU1); + test("-8400null", "" + sf_sM + s_iAN); + test("-8400-54", "" + sf_sM + f_bM); + test("-8400-87.0", "" + sf_sM + f_fM); + test("-8400null", "" + sf_sM + s_oAN); + test("-840019", "" + sf_sM + f_str); + test("-8400-41", "" + sf_sM + sf_bM); + test("-8400null", "" + sf_sM + sf_IN); + test("-8400T", "" + sf_sM + s_c); + test("-8400-42.0", "" + sf_sM + sf_fM); + test("-840025", "" + sf_sM + s_b); + test("-8400null", "" + sf_sM + f_oN); + test("-8400-1410065408", "" + sf_sM + s_lM); + test("-84008.0", "" + sf_sM + s_d); + test("-840055.0", "" + sf_sM + s_f); + test("-840097000000", "" + sf_sM + s_i); + test("-8400-9900", "" + sf_sM + f_sM); + test("-8400935228928", "" + sf_sM + s_l); + test("-8400-8400", "" + sf_sM + sf_sM); + test("-8400C(82)", "" + sf_sM + s_o); + test("-8400null", "" + sf_sM + sf_oNtS); + test("-8400true", "" + sf_sM + s_bl); + test("-84003900", "" + sf_sM + s_s); + test("-8400null", "" + sf_sM + sf_oN); + test("-840094000000", "" + sf_sM + f_I); + test("-8400null", "" + sf_sM + f_IN); + test("-8400true", "" + sf_sM + sf_bl); + test("-84005500", "" + sf_sM + sf_s); + test("-8400-2900", "" + sf_sM + s_sM); + test("-8400-194313216", "" + sf_sM + sf_l); + test("-840012", "" + sf_sM + s_strU1); + test("-8400C(87)", "" + sf_sM + sf_o); + test("-840091", "" + sf_sM + s_strU2); + test("-840021", "" + sf_sM + f_strU1); + test("-840018", "" + sf_sM + f_strU2); + test("-8400null", "" + sf_sM + f_iAN); + test("-8400null", "" + sf_sM + s_oN); + test("-8400\u045180", "" + sf_sM + s_strU); + test("-8400C", "" + sf_sM + sf_c); + test("-840075", "" + sf_sM + sf_str); + test("-8400-43", "" + sf_sM + s_bM); + test("-840080", "" + sf_sM + sf_b); + test("-8400null", "" + sf_sM + s_IN); + test("-8400-52.0", "" + sf_sM + s_fM); + test("-840075000000", "" + sf_sM + sf_i); + test("-840044", "" + sf_sM + f_b); + test("-8400-1705032704", "" + sf_sM + sf_lM); + test("-8400null", "" + sf_sM + f_oAN); + test("-840083.0", "" + sf_sM + f_d); + test("-8400I", "" + sf_sM + f_c); + test("-840094.0", "" + sf_sM + f_f); + test("-840012.0", "" + sf_sM + sf_d); + test("-8400-99.0", "" + sf_sM + f_dM); + test("-840017.0", "" + sf_sM + sf_f); + test("-8400-84.0", "" + sf_sM + sf_dM); + test("-840058000000", "" + sf_sM + f_i); + test("-8400-55000000", "" + sf_sM + f_iM); + test("-84001460392448", "" + sf_sM + f_l); + test("-8400C(70)", "" + sf_sM + f_o); + test("-8400\u04511", "" + sf_sM + sf_strU); + test("-84008000", "" + sf_sM + f_s); + test("-840018", "" + sf_sM + s_str); + test("-8400-1000000", "" + sf_sM + s_iM); + test("-84001000000", "" + sf_sM + sf_I); + test("-8400null", "" + sf_sM + f_oNtS); + test("-8400false", "" + sf_sM + f_bl); + test("-8400null", "" + sf_sM + sf_iAN); + test("-8400-2000000", "" + sf_sM + sf_iM); + test("-8400-820130816", "" + sf_sM + f_lM); + test("-8400null", "" + sf_sM + sf_oAN); + test("-840025000000", "" + sf_sM + s_I); + test("C(82)-96.0", "" + s_o + s_dM); + test("C(82)null", "" + s_o + s_oNtS); + test("C(82)\u045176", "" + s_o + f_strU); + test("C(82)92", "" + s_o + sf_strU2); + test("C(82)51", "" + s_o + sf_strU1); + test("C(82)null", "" + s_o + s_iAN); + test("C(82)-54", "" + s_o + f_bM); + test("C(82)-87.0", "" + s_o + f_fM); + test("C(82)null", "" + s_o + s_oAN); + test("C(82)19", "" + s_o + f_str); + test("C(82)-41", "" + s_o + sf_bM); + test("C(82)null", "" + s_o + sf_IN); + test("C(82)T", "" + s_o + s_c); + test("C(82)-42.0", "" + s_o + sf_fM); + test("C(82)25", "" + s_o + s_b); + test("C(82)null", "" + s_o + f_oN); + test("C(82)-1410065408", "" + s_o + s_lM); + test("C(82)8.0", "" + s_o + s_d); + test("C(82)55.0", "" + s_o + s_f); + test("C(82)97000000", "" + s_o + s_i); + test("C(82)-9900", "" + s_o + f_sM); + test("C(82)935228928", "" + s_o + s_l); + test("C(82)-8400", "" + s_o + sf_sM); + test("C(82)C(82)", "" + s_o + s_o); + test("C(82)null", "" + s_o + sf_oNtS); + test("C(82)true", "" + s_o + s_bl); + test("C(82)3900", "" + s_o + s_s); + test("C(82)null", "" + s_o + sf_oN); + test("C(82)94000000", "" + s_o + f_I); + test("C(82)null", "" + s_o + f_IN); + test("C(82)true", "" + s_o + sf_bl); + test("C(82)5500", "" + s_o + sf_s); + test("C(82)-2900", "" + s_o + s_sM); + test("C(82)-194313216", "" + s_o + sf_l); + test("C(82)12", "" + s_o + s_strU1); + test("C(82)C(87)", "" + s_o + sf_o); + test("C(82)91", "" + s_o + s_strU2); + test("C(82)21", "" + s_o + f_strU1); + test("C(82)18", "" + s_o + f_strU2); + test("C(82)null", "" + s_o + f_iAN); + test("C(82)null", "" + s_o + s_oN); + test("C(82)\u045180", "" + s_o + s_strU); + test("C(82)C", "" + s_o + sf_c); + test("C(82)75", "" + s_o + sf_str); + test("C(82)-43", "" + s_o + s_bM); + test("C(82)80", "" + s_o + sf_b); + test("C(82)null", "" + s_o + s_IN); + test("C(82)-52.0", "" + s_o + s_fM); + test("C(82)75000000", "" + s_o + sf_i); + test("C(82)44", "" + s_o + f_b); + test("C(82)-1705032704", "" + s_o + sf_lM); + test("C(82)null", "" + s_o + f_oAN); + test("C(82)83.0", "" + s_o + f_d); + test("C(82)I", "" + s_o + f_c); + test("C(82)94.0", "" + s_o + f_f); + test("C(82)12.0", "" + s_o + sf_d); + test("C(82)-99.0", "" + s_o + f_dM); + test("C(82)17.0", "" + s_o + sf_f); + test("C(82)-84.0", "" + s_o + sf_dM); + test("C(82)58000000", "" + s_o + f_i); + test("C(82)-55000000", "" + s_o + f_iM); + test("C(82)1460392448", "" + s_o + f_l); + test("C(82)C(70)", "" + s_o + f_o); + test("C(82)\u04511", "" + s_o + sf_strU); + test("C(82)8000", "" + s_o + f_s); + test("C(82)18", "" + s_o + s_str); + test("C(82)-1000000", "" + s_o + s_iM); + test("C(82)1000000", "" + s_o + sf_I); + test("C(82)null", "" + s_o + f_oNtS); + test("C(82)false", "" + s_o + f_bl); + test("C(82)null", "" + s_o + sf_iAN); + test("C(82)-2000000", "" + s_o + sf_iM); + test("C(82)-820130816", "" + s_o + f_lM); + test("C(82)null", "" + s_o + sf_oAN); + test("C(82)25000000", "" + s_o + s_I); + test("null-96.0", "" + sf_oNtS + s_dM); + test("nullnull", "" + sf_oNtS + s_oNtS); + test("null\u045176", "" + sf_oNtS + f_strU); + test("null92", "" + sf_oNtS + sf_strU2); + test("null51", "" + sf_oNtS + sf_strU1); + test("nullnull", "" + sf_oNtS + s_iAN); + test("null-54", "" + sf_oNtS + f_bM); + test("null-87.0", "" + sf_oNtS + f_fM); + test("nullnull", "" + sf_oNtS + s_oAN); + test("null19", "" + sf_oNtS + f_str); + test("null-41", "" + sf_oNtS + sf_bM); + test("nullnull", "" + sf_oNtS + sf_IN); + test("nullT", "" + sf_oNtS + s_c); + test("null-42.0", "" + sf_oNtS + sf_fM); + test("null25", "" + sf_oNtS + s_b); + test("nullnull", "" + sf_oNtS + f_oN); + test("null-1410065408", "" + sf_oNtS + s_lM); + test("null8.0", "" + sf_oNtS + s_d); + test("null55.0", "" + sf_oNtS + s_f); + test("null97000000", "" + sf_oNtS + s_i); + test("null-9900", "" + sf_oNtS + f_sM); + test("null935228928", "" + sf_oNtS + s_l); + test("null-8400", "" + sf_oNtS + sf_sM); + test("nullC(82)", "" + sf_oNtS + s_o); + test("nullnull", "" + sf_oNtS + sf_oNtS); + test("nulltrue", "" + sf_oNtS + s_bl); + test("null3900", "" + sf_oNtS + s_s); + test("nullnull", "" + sf_oNtS + sf_oN); + test("null94000000", "" + sf_oNtS + f_I); + test("nullnull", "" + sf_oNtS + f_IN); + test("nulltrue", "" + sf_oNtS + sf_bl); + test("null5500", "" + sf_oNtS + sf_s); + test("null-2900", "" + sf_oNtS + s_sM); + test("null-194313216", "" + sf_oNtS + sf_l); + test("null12", "" + sf_oNtS + s_strU1); + test("nullC(87)", "" + sf_oNtS + sf_o); + test("null91", "" + sf_oNtS + s_strU2); + test("null21", "" + sf_oNtS + f_strU1); + test("null18", "" + sf_oNtS + f_strU2); + test("nullnull", "" + sf_oNtS + f_iAN); + test("nullnull", "" + sf_oNtS + s_oN); + test("null\u045180", "" + sf_oNtS + s_strU); + test("nullC", "" + sf_oNtS + sf_c); + test("null75", "" + sf_oNtS + sf_str); + test("null-43", "" + sf_oNtS + s_bM); + test("null80", "" + sf_oNtS + sf_b); + test("nullnull", "" + sf_oNtS + s_IN); + test("null-52.0", "" + sf_oNtS + s_fM); + test("null75000000", "" + sf_oNtS + sf_i); + test("null44", "" + sf_oNtS + f_b); + test("null-1705032704", "" + sf_oNtS + sf_lM); + test("nullnull", "" + sf_oNtS + f_oAN); + test("null83.0", "" + sf_oNtS + f_d); + test("nullI", "" + sf_oNtS + f_c); + test("null94.0", "" + sf_oNtS + f_f); + test("null12.0", "" + sf_oNtS + sf_d); + test("null-99.0", "" + sf_oNtS + f_dM); + test("null17.0", "" + sf_oNtS + sf_f); + test("null-84.0", "" + sf_oNtS + sf_dM); + test("null58000000", "" + sf_oNtS + f_i); + test("null-55000000", "" + sf_oNtS + f_iM); + test("null1460392448", "" + sf_oNtS + f_l); + test("nullC(70)", "" + sf_oNtS + f_o); + test("null\u04511", "" + sf_oNtS + sf_strU); + test("null8000", "" + sf_oNtS + f_s); + test("null18", "" + sf_oNtS + s_str); + test("null-1000000", "" + sf_oNtS + s_iM); + test("null1000000", "" + sf_oNtS + sf_I); + test("nullnull", "" + sf_oNtS + f_oNtS); + test("nullfalse", "" + sf_oNtS + f_bl); + test("nullnull", "" + sf_oNtS + sf_iAN); + test("null-2000000", "" + sf_oNtS + sf_iM); + test("null-820130816", "" + sf_oNtS + f_lM); + test("nullnull", "" + sf_oNtS + sf_oAN); + test("null25000000", "" + sf_oNtS + s_I); + test("true-96.0", "" + s_bl + s_dM); + test("truenull", "" + s_bl + s_oNtS); + test("true\u045176", "" + s_bl + f_strU); + test("true92", "" + s_bl + sf_strU2); + test("true51", "" + s_bl + sf_strU1); + test("truenull", "" + s_bl + s_iAN); + test("true-54", "" + s_bl + f_bM); + test("true-87.0", "" + s_bl + f_fM); + test("truenull", "" + s_bl + s_oAN); + test("true19", "" + s_bl + f_str); + test("true-41", "" + s_bl + sf_bM); + test("truenull", "" + s_bl + sf_IN); + test("trueT", "" + s_bl + s_c); + test("true-42.0", "" + s_bl + sf_fM); + test("true25", "" + s_bl + s_b); + test("truenull", "" + s_bl + f_oN); + test("true-1410065408", "" + s_bl + s_lM); + test("true8.0", "" + s_bl + s_d); + test("true55.0", "" + s_bl + s_f); + test("true97000000", "" + s_bl + s_i); + test("true-9900", "" + s_bl + f_sM); + test("true935228928", "" + s_bl + s_l); + test("true-8400", "" + s_bl + sf_sM); + test("trueC(82)", "" + s_bl + s_o); + test("truenull", "" + s_bl + sf_oNtS); + test("truetrue", "" + s_bl + s_bl); + test("true3900", "" + s_bl + s_s); + test("truenull", "" + s_bl + sf_oN); + test("true94000000", "" + s_bl + f_I); + test("truenull", "" + s_bl + f_IN); + test("truetrue", "" + s_bl + sf_bl); + test("true5500", "" + s_bl + sf_s); + test("true-2900", "" + s_bl + s_sM); + test("true-194313216", "" + s_bl + sf_l); + test("true12", "" + s_bl + s_strU1); + test("trueC(87)", "" + s_bl + sf_o); + test("true91", "" + s_bl + s_strU2); + test("true21", "" + s_bl + f_strU1); + test("true18", "" + s_bl + f_strU2); + test("truenull", "" + s_bl + f_iAN); + test("truenull", "" + s_bl + s_oN); + test("true\u045180", "" + s_bl + s_strU); + test("trueC", "" + s_bl + sf_c); + test("true75", "" + s_bl + sf_str); + test("true-43", "" + s_bl + s_bM); + test("true80", "" + s_bl + sf_b); + test("truenull", "" + s_bl + s_IN); + test("true-52.0", "" + s_bl + s_fM); + test("true75000000", "" + s_bl + sf_i); + test("true44", "" + s_bl + f_b); + } + + public void run2() { + test("true-1705032704", "" + s_bl + sf_lM); + test("truenull", "" + s_bl + f_oAN); + test("true83.0", "" + s_bl + f_d); + test("trueI", "" + s_bl + f_c); + test("true94.0", "" + s_bl + f_f); + test("true12.0", "" + s_bl + sf_d); + test("true-99.0", "" + s_bl + f_dM); + test("true17.0", "" + s_bl + sf_f); + test("true-84.0", "" + s_bl + sf_dM); + test("true58000000", "" + s_bl + f_i); + test("true-55000000", "" + s_bl + f_iM); + test("true1460392448", "" + s_bl + f_l); + test("trueC(70)", "" + s_bl + f_o); + test("true\u04511", "" + s_bl + sf_strU); + test("true8000", "" + s_bl + f_s); + test("true18", "" + s_bl + s_str); + test("true-1000000", "" + s_bl + s_iM); + test("true1000000", "" + s_bl + sf_I); + test("truenull", "" + s_bl + f_oNtS); + test("truefalse", "" + s_bl + f_bl); + test("truenull", "" + s_bl + sf_iAN); + test("true-2000000", "" + s_bl + sf_iM); + test("true-820130816", "" + s_bl + f_lM); + test("truenull", "" + s_bl + sf_oAN); + test("true25000000", "" + s_bl + s_I); + test("3900-96.0", "" + s_s + s_dM); + test("3900null", "" + s_s + s_oNtS); + test("3900\u045176", "" + s_s + f_strU); + test("390092", "" + s_s + sf_strU2); + test("390051", "" + s_s + sf_strU1); + test("3900null", "" + s_s + s_iAN); + test("3900-54", "" + s_s + f_bM); + test("3900-87.0", "" + s_s + f_fM); + test("3900null", "" + s_s + s_oAN); + test("390019", "" + s_s + f_str); + test("3900-41", "" + s_s + sf_bM); + test("3900null", "" + s_s + sf_IN); + test("3900T", "" + s_s + s_c); + test("3900-42.0", "" + s_s + sf_fM); + test("390025", "" + s_s + s_b); + test("3900null", "" + s_s + f_oN); + test("3900-1410065408", "" + s_s + s_lM); + test("39008.0", "" + s_s + s_d); + test("390055.0", "" + s_s + s_f); + test("390097000000", "" + s_s + s_i); + test("3900-9900", "" + s_s + f_sM); + test("3900935228928", "" + s_s + s_l); + test("3900-8400", "" + s_s + sf_sM); + test("3900C(82)", "" + s_s + s_o); + test("3900null", "" + s_s + sf_oNtS); + test("3900true", "" + s_s + s_bl); + test("39003900", "" + s_s + s_s); + test("3900null", "" + s_s + sf_oN); + test("390094000000", "" + s_s + f_I); + test("3900null", "" + s_s + f_IN); + test("3900true", "" + s_s + sf_bl); + test("39005500", "" + s_s + sf_s); + test("3900-2900", "" + s_s + s_sM); + test("3900-194313216", "" + s_s + sf_l); + test("390012", "" + s_s + s_strU1); + test("3900C(87)", "" + s_s + sf_o); + test("390091", "" + s_s + s_strU2); + test("390021", "" + s_s + f_strU1); + test("390018", "" + s_s + f_strU2); + test("3900null", "" + s_s + f_iAN); + test("3900null", "" + s_s + s_oN); + test("3900\u045180", "" + s_s + s_strU); + test("3900C", "" + s_s + sf_c); + test("390075", "" + s_s + sf_str); + test("3900-43", "" + s_s + s_bM); + test("390080", "" + s_s + sf_b); + test("3900null", "" + s_s + s_IN); + test("3900-52.0", "" + s_s + s_fM); + test("390075000000", "" + s_s + sf_i); + test("390044", "" + s_s + f_b); + test("3900-1705032704", "" + s_s + sf_lM); + test("3900null", "" + s_s + f_oAN); + test("390083.0", "" + s_s + f_d); + test("3900I", "" + s_s + f_c); + test("390094.0", "" + s_s + f_f); + test("390012.0", "" + s_s + sf_d); + test("3900-99.0", "" + s_s + f_dM); + test("390017.0", "" + s_s + sf_f); + test("3900-84.0", "" + s_s + sf_dM); + test("390058000000", "" + s_s + f_i); + test("3900-55000000", "" + s_s + f_iM); + test("39001460392448", "" + s_s + f_l); + test("3900C(70)", "" + s_s + f_o); + test("3900\u04511", "" + s_s + sf_strU); + test("39008000", "" + s_s + f_s); + test("390018", "" + s_s + s_str); + test("3900-1000000", "" + s_s + s_iM); + test("39001000000", "" + s_s + sf_I); + test("3900null", "" + s_s + f_oNtS); + test("3900false", "" + s_s + f_bl); + test("3900null", "" + s_s + sf_iAN); + test("3900-2000000", "" + s_s + sf_iM); + test("3900-820130816", "" + s_s + f_lM); + test("3900null", "" + s_s + sf_oAN); + test("390025000000", "" + s_s + s_I); + test("null-96.0", "" + sf_oN + s_dM); + test("nullnull", "" + sf_oN + s_oNtS); + test("null\u045176", "" + sf_oN + f_strU); + test("null92", "" + sf_oN + sf_strU2); + test("null51", "" + sf_oN + sf_strU1); + test("nullnull", "" + sf_oN + s_iAN); + test("null-54", "" + sf_oN + f_bM); + test("null-87.0", "" + sf_oN + f_fM); + test("nullnull", "" + sf_oN + s_oAN); + test("null19", "" + sf_oN + f_str); + test("null-41", "" + sf_oN + sf_bM); + test("nullnull", "" + sf_oN + sf_IN); + test("nullT", "" + sf_oN + s_c); + test("null-42.0", "" + sf_oN + sf_fM); + test("null25", "" + sf_oN + s_b); + test("nullnull", "" + sf_oN + f_oN); + test("null-1410065408", "" + sf_oN + s_lM); + test("null8.0", "" + sf_oN + s_d); + test("null55.0", "" + sf_oN + s_f); + test("null97000000", "" + sf_oN + s_i); + test("null-9900", "" + sf_oN + f_sM); + test("null935228928", "" + sf_oN + s_l); + test("null-8400", "" + sf_oN + sf_sM); + test("nullC(82)", "" + sf_oN + s_o); + test("nullnull", "" + sf_oN + sf_oNtS); + test("nulltrue", "" + sf_oN + s_bl); + test("null3900", "" + sf_oN + s_s); + test("nullnull", "" + sf_oN + sf_oN); + test("null94000000", "" + sf_oN + f_I); + test("nullnull", "" + sf_oN + f_IN); + test("nulltrue", "" + sf_oN + sf_bl); + test("null5500", "" + sf_oN + sf_s); + test("null-2900", "" + sf_oN + s_sM); + test("null-194313216", "" + sf_oN + sf_l); + test("null12", "" + sf_oN + s_strU1); + test("nullC(87)", "" + sf_oN + sf_o); + test("null91", "" + sf_oN + s_strU2); + test("null21", "" + sf_oN + f_strU1); + test("null18", "" + sf_oN + f_strU2); + test("nullnull", "" + sf_oN + f_iAN); + test("nullnull", "" + sf_oN + s_oN); + test("null\u045180", "" + sf_oN + s_strU); + test("nullC", "" + sf_oN + sf_c); + test("null75", "" + sf_oN + sf_str); + test("null-43", "" + sf_oN + s_bM); + test("null80", "" + sf_oN + sf_b); + test("nullnull", "" + sf_oN + s_IN); + test("null-52.0", "" + sf_oN + s_fM); + test("null75000000", "" + sf_oN + sf_i); + test("null44", "" + sf_oN + f_b); + test("null-1705032704", "" + sf_oN + sf_lM); + test("nullnull", "" + sf_oN + f_oAN); + test("null83.0", "" + sf_oN + f_d); + test("nullI", "" + sf_oN + f_c); + test("null94.0", "" + sf_oN + f_f); + test("null12.0", "" + sf_oN + sf_d); + test("null-99.0", "" + sf_oN + f_dM); + test("null17.0", "" + sf_oN + sf_f); + test("null-84.0", "" + sf_oN + sf_dM); + test("null58000000", "" + sf_oN + f_i); + test("null-55000000", "" + sf_oN + f_iM); + test("null1460392448", "" + sf_oN + f_l); + test("nullC(70)", "" + sf_oN + f_o); + test("null\u04511", "" + sf_oN + sf_strU); + test("null8000", "" + sf_oN + f_s); + test("null18", "" + sf_oN + s_str); + test("null-1000000", "" + sf_oN + s_iM); + test("null1000000", "" + sf_oN + sf_I); + test("nullnull", "" + sf_oN + f_oNtS); + test("nullfalse", "" + sf_oN + f_bl); + test("nullnull", "" + sf_oN + sf_iAN); + test("null-2000000", "" + sf_oN + sf_iM); + test("null-820130816", "" + sf_oN + f_lM); + test("nullnull", "" + sf_oN + sf_oAN); + test("null25000000", "" + sf_oN + s_I); + test("94000000-96.0", "" + f_I + s_dM); + test("94000000null", "" + f_I + s_oNtS); + test("94000000\u045176", "" + f_I + f_strU); + test("9400000092", "" + f_I + sf_strU2); + test("9400000051", "" + f_I + sf_strU1); + test("94000000null", "" + f_I + s_iAN); + test("94000000-54", "" + f_I + f_bM); + test("94000000-87.0", "" + f_I + f_fM); + test("94000000null", "" + f_I + s_oAN); + test("9400000019", "" + f_I + f_str); + test("94000000-41", "" + f_I + sf_bM); + test("94000000null", "" + f_I + sf_IN); + test("94000000T", "" + f_I + s_c); + test("94000000-42.0", "" + f_I + sf_fM); + test("9400000025", "" + f_I + s_b); + test("94000000null", "" + f_I + f_oN); + test("94000000-1410065408", "" + f_I + s_lM); + test("940000008.0", "" + f_I + s_d); + test("9400000055.0", "" + f_I + s_f); + test("9400000097000000", "" + f_I + s_i); + test("94000000-9900", "" + f_I + f_sM); + test("94000000935228928", "" + f_I + s_l); + test("94000000-8400", "" + f_I + sf_sM); + test("94000000C(82)", "" + f_I + s_o); + test("94000000null", "" + f_I + sf_oNtS); + test("94000000true", "" + f_I + s_bl); + test("940000003900", "" + f_I + s_s); + test("94000000null", "" + f_I + sf_oN); + test("9400000094000000", "" + f_I + f_I); + test("94000000null", "" + f_I + f_IN); + test("94000000true", "" + f_I + sf_bl); + test("940000005500", "" + f_I + sf_s); + test("94000000-2900", "" + f_I + s_sM); + test("94000000-194313216", "" + f_I + sf_l); + test("9400000012", "" + f_I + s_strU1); + test("94000000C(87)", "" + f_I + sf_o); + test("9400000091", "" + f_I + s_strU2); + test("9400000021", "" + f_I + f_strU1); + test("9400000018", "" + f_I + f_strU2); + test("94000000null", "" + f_I + f_iAN); + test("94000000null", "" + f_I + s_oN); + test("94000000\u045180", "" + f_I + s_strU); + test("94000000C", "" + f_I + sf_c); + test("9400000075", "" + f_I + sf_str); + test("94000000-43", "" + f_I + s_bM); + test("9400000080", "" + f_I + sf_b); + test("94000000null", "" + f_I + s_IN); + test("94000000-52.0", "" + f_I + s_fM); + test("9400000075000000", "" + f_I + sf_i); + test("9400000044", "" + f_I + f_b); + test("94000000-1705032704", "" + f_I + sf_lM); + test("94000000null", "" + f_I + f_oAN); + test("9400000083.0", "" + f_I + f_d); + test("94000000I", "" + f_I + f_c); + test("9400000094.0", "" + f_I + f_f); + test("9400000012.0", "" + f_I + sf_d); + test("94000000-99.0", "" + f_I + f_dM); + test("9400000017.0", "" + f_I + sf_f); + test("94000000-84.0", "" + f_I + sf_dM); + test("9400000058000000", "" + f_I + f_i); + test("94000000-55000000", "" + f_I + f_iM); + test("940000001460392448", "" + f_I + f_l); + test("94000000C(70)", "" + f_I + f_o); + test("94000000\u04511", "" + f_I + sf_strU); + test("940000008000", "" + f_I + f_s); + test("9400000018", "" + f_I + s_str); + test("94000000-1000000", "" + f_I + s_iM); + test("940000001000000", "" + f_I + sf_I); + test("94000000null", "" + f_I + f_oNtS); + test("94000000false", "" + f_I + f_bl); + test("94000000null", "" + f_I + sf_iAN); + test("94000000-2000000", "" + f_I + sf_iM); + test("94000000-820130816", "" + f_I + f_lM); + test("94000000null", "" + f_I + sf_oAN); + test("9400000025000000", "" + f_I + s_I); + test("null-96.0", "" + f_IN + s_dM); + test("nullnull", "" + f_IN + s_oNtS); + test("null\u045176", "" + f_IN + f_strU); + test("null92", "" + f_IN + sf_strU2); + test("null51", "" + f_IN + sf_strU1); + test("nullnull", "" + f_IN + s_iAN); + test("null-54", "" + f_IN + f_bM); + test("null-87.0", "" + f_IN + f_fM); + test("nullnull", "" + f_IN + s_oAN); + test("null19", "" + f_IN + f_str); + test("null-41", "" + f_IN + sf_bM); + test("nullnull", "" + f_IN + sf_IN); + test("nullT", "" + f_IN + s_c); + test("null-42.0", "" + f_IN + sf_fM); + test("null25", "" + f_IN + s_b); + test("nullnull", "" + f_IN + f_oN); + test("null-1410065408", "" + f_IN + s_lM); + test("null8.0", "" + f_IN + s_d); + test("null55.0", "" + f_IN + s_f); + test("null97000000", "" + f_IN + s_i); + test("null-9900", "" + f_IN + f_sM); + test("null935228928", "" + f_IN + s_l); + test("null-8400", "" + f_IN + sf_sM); + test("nullC(82)", "" + f_IN + s_o); + test("nullnull", "" + f_IN + sf_oNtS); + test("nulltrue", "" + f_IN + s_bl); + test("null3900", "" + f_IN + s_s); + test("nullnull", "" + f_IN + sf_oN); + test("null94000000", "" + f_IN + f_I); + test("nullnull", "" + f_IN + f_IN); + test("nulltrue", "" + f_IN + sf_bl); + test("null5500", "" + f_IN + sf_s); + test("null-2900", "" + f_IN + s_sM); + test("null-194313216", "" + f_IN + sf_l); + test("null12", "" + f_IN + s_strU1); + test("nullC(87)", "" + f_IN + sf_o); + test("null91", "" + f_IN + s_strU2); + test("null21", "" + f_IN + f_strU1); + test("null18", "" + f_IN + f_strU2); + test("nullnull", "" + f_IN + f_iAN); + test("nullnull", "" + f_IN + s_oN); + test("null\u045180", "" + f_IN + s_strU); + test("nullC", "" + f_IN + sf_c); + test("null75", "" + f_IN + sf_str); + test("null-43", "" + f_IN + s_bM); + test("null80", "" + f_IN + sf_b); + test("nullnull", "" + f_IN + s_IN); + test("null-52.0", "" + f_IN + s_fM); + test("null75000000", "" + f_IN + sf_i); + test("null44", "" + f_IN + f_b); + test("null-1705032704", "" + f_IN + sf_lM); + test("nullnull", "" + f_IN + f_oAN); + test("null83.0", "" + f_IN + f_d); + test("nullI", "" + f_IN + f_c); + test("null94.0", "" + f_IN + f_f); + test("null12.0", "" + f_IN + sf_d); + test("null-99.0", "" + f_IN + f_dM); + test("null17.0", "" + f_IN + sf_f); + test("null-84.0", "" + f_IN + sf_dM); + test("null58000000", "" + f_IN + f_i); + test("null-55000000", "" + f_IN + f_iM); + test("null1460392448", "" + f_IN + f_l); + test("nullC(70)", "" + f_IN + f_o); + test("null\u04511", "" + f_IN + sf_strU); + test("null8000", "" + f_IN + f_s); + test("null18", "" + f_IN + s_str); + test("null-1000000", "" + f_IN + s_iM); + test("null1000000", "" + f_IN + sf_I); + test("nullnull", "" + f_IN + f_oNtS); + test("nullfalse", "" + f_IN + f_bl); + test("nullnull", "" + f_IN + sf_iAN); + test("null-2000000", "" + f_IN + sf_iM); + test("null-820130816", "" + f_IN + f_lM); + test("nullnull", "" + f_IN + sf_oAN); + test("null25000000", "" + f_IN + s_I); + test("true-96.0", "" + sf_bl + s_dM); + test("truenull", "" + sf_bl + s_oNtS); + test("true\u045176", "" + sf_bl + f_strU); + test("true92", "" + sf_bl + sf_strU2); + test("true51", "" + sf_bl + sf_strU1); + test("truenull", "" + sf_bl + s_iAN); + test("true-54", "" + sf_bl + f_bM); + test("true-87.0", "" + sf_bl + f_fM); + test("truenull", "" + sf_bl + s_oAN); + test("true19", "" + sf_bl + f_str); + test("true-41", "" + sf_bl + sf_bM); + test("truenull", "" + sf_bl + sf_IN); + test("trueT", "" + sf_bl + s_c); + test("true-42.0", "" + sf_bl + sf_fM); + test("true25", "" + sf_bl + s_b); + test("truenull", "" + sf_bl + f_oN); + test("true-1410065408", "" + sf_bl + s_lM); + test("true8.0", "" + sf_bl + s_d); + test("true55.0", "" + sf_bl + s_f); + test("true97000000", "" + sf_bl + s_i); + test("true-9900", "" + sf_bl + f_sM); + test("true935228928", "" + sf_bl + s_l); + test("true-8400", "" + sf_bl + sf_sM); + test("trueC(82)", "" + sf_bl + s_o); + test("truenull", "" + sf_bl + sf_oNtS); + test("truetrue", "" + sf_bl + s_bl); + test("true3900", "" + sf_bl + s_s); + test("truenull", "" + sf_bl + sf_oN); + test("true94000000", "" + sf_bl + f_I); + test("truenull", "" + sf_bl + f_IN); + test("truetrue", "" + sf_bl + sf_bl); + test("true5500", "" + sf_bl + sf_s); + test("true-2900", "" + sf_bl + s_sM); + test("true-194313216", "" + sf_bl + sf_l); + test("true12", "" + sf_bl + s_strU1); + test("trueC(87)", "" + sf_bl + sf_o); + test("true91", "" + sf_bl + s_strU2); + test("true21", "" + sf_bl + f_strU1); + test("true18", "" + sf_bl + f_strU2); + test("truenull", "" + sf_bl + f_iAN); + test("truenull", "" + sf_bl + s_oN); + test("true\u045180", "" + sf_bl + s_strU); + test("trueC", "" + sf_bl + sf_c); + test("true75", "" + sf_bl + sf_str); + test("true-43", "" + sf_bl + s_bM); + test("true80", "" + sf_bl + sf_b); + test("truenull", "" + sf_bl + s_IN); + test("true-52.0", "" + sf_bl + s_fM); + test("true75000000", "" + sf_bl + sf_i); + test("true44", "" + sf_bl + f_b); + test("true-1705032704", "" + sf_bl + sf_lM); + test("truenull", "" + sf_bl + f_oAN); + test("true83.0", "" + sf_bl + f_d); + test("trueI", "" + sf_bl + f_c); + test("true94.0", "" + sf_bl + f_f); + test("true12.0", "" + sf_bl + sf_d); + test("true-99.0", "" + sf_bl + f_dM); + test("true17.0", "" + sf_bl + sf_f); + test("true-84.0", "" + sf_bl + sf_dM); + test("true58000000", "" + sf_bl + f_i); + test("true-55000000", "" + sf_bl + f_iM); + test("true1460392448", "" + sf_bl + f_l); + test("trueC(70)", "" + sf_bl + f_o); + test("true\u04511", "" + sf_bl + sf_strU); + test("true8000", "" + sf_bl + f_s); + test("true18", "" + sf_bl + s_str); + test("true-1000000", "" + sf_bl + s_iM); + test("true1000000", "" + sf_bl + sf_I); + test("truenull", "" + sf_bl + f_oNtS); + test("truefalse", "" + sf_bl + f_bl); + test("truenull", "" + sf_bl + sf_iAN); + test("true-2000000", "" + sf_bl + sf_iM); + test("true-820130816", "" + sf_bl + f_lM); + test("truenull", "" + sf_bl + sf_oAN); + test("true25000000", "" + sf_bl + s_I); + test("5500-96.0", "" + sf_s + s_dM); + test("5500null", "" + sf_s + s_oNtS); + test("5500\u045176", "" + sf_s + f_strU); + test("550092", "" + sf_s + sf_strU2); + test("550051", "" + sf_s + sf_strU1); + test("5500null", "" + sf_s + s_iAN); + test("5500-54", "" + sf_s + f_bM); + test("5500-87.0", "" + sf_s + f_fM); + test("5500null", "" + sf_s + s_oAN); + test("550019", "" + sf_s + f_str); + test("5500-41", "" + sf_s + sf_bM); + test("5500null", "" + sf_s + sf_IN); + test("5500T", "" + sf_s + s_c); + test("5500-42.0", "" + sf_s + sf_fM); + test("550025", "" + sf_s + s_b); + test("5500null", "" + sf_s + f_oN); + test("5500-1410065408", "" + sf_s + s_lM); + test("55008.0", "" + sf_s + s_d); + test("550055.0", "" + sf_s + s_f); + test("550097000000", "" + sf_s + s_i); + test("5500-9900", "" + sf_s + f_sM); + test("5500935228928", "" + sf_s + s_l); + test("5500-8400", "" + sf_s + sf_sM); + test("5500C(82)", "" + sf_s + s_o); + test("5500null", "" + sf_s + sf_oNtS); + test("5500true", "" + sf_s + s_bl); + test("55003900", "" + sf_s + s_s); + test("5500null", "" + sf_s + sf_oN); + test("550094000000", "" + sf_s + f_I); + test("5500null", "" + sf_s + f_IN); + test("5500true", "" + sf_s + sf_bl); + test("55005500", "" + sf_s + sf_s); + test("5500-2900", "" + sf_s + s_sM); + test("5500-194313216", "" + sf_s + sf_l); + test("550012", "" + sf_s + s_strU1); + test("5500C(87)", "" + sf_s + sf_o); + test("550091", "" + sf_s + s_strU2); + test("550021", "" + sf_s + f_strU1); + test("550018", "" + sf_s + f_strU2); + test("5500null", "" + sf_s + f_iAN); + test("5500null", "" + sf_s + s_oN); + test("5500\u045180", "" + sf_s + s_strU); + test("5500C", "" + sf_s + sf_c); + test("550075", "" + sf_s + sf_str); + test("5500-43", "" + sf_s + s_bM); + test("550080", "" + sf_s + sf_b); + test("5500null", "" + sf_s + s_IN); + test("5500-52.0", "" + sf_s + s_fM); + test("550075000000", "" + sf_s + sf_i); + test("550044", "" + sf_s + f_b); + test("5500-1705032704", "" + sf_s + sf_lM); + test("5500null", "" + sf_s + f_oAN); + test("550083.0", "" + sf_s + f_d); + test("5500I", "" + sf_s + f_c); + test("550094.0", "" + sf_s + f_f); + test("550012.0", "" + sf_s + sf_d); + test("5500-99.0", "" + sf_s + f_dM); + test("550017.0", "" + sf_s + sf_f); + test("5500-84.0", "" + sf_s + sf_dM); + test("550058000000", "" + sf_s + f_i); + test("5500-55000000", "" + sf_s + f_iM); + test("55001460392448", "" + sf_s + f_l); + test("5500C(70)", "" + sf_s + f_o); + test("5500\u04511", "" + sf_s + sf_strU); + test("55008000", "" + sf_s + f_s); + test("550018", "" + sf_s + s_str); + test("5500-1000000", "" + sf_s + s_iM); + test("55001000000", "" + sf_s + sf_I); + test("5500null", "" + sf_s + f_oNtS); + test("5500false", "" + sf_s + f_bl); + test("5500null", "" + sf_s + sf_iAN); + test("5500-2000000", "" + sf_s + sf_iM); + test("5500-820130816", "" + sf_s + f_lM); + test("5500null", "" + sf_s + sf_oAN); + test("550025000000", "" + sf_s + s_I); + test("-2900-96.0", "" + s_sM + s_dM); + test("-2900null", "" + s_sM + s_oNtS); + test("-2900\u045176", "" + s_sM + f_strU); + test("-290092", "" + s_sM + sf_strU2); + test("-290051", "" + s_sM + sf_strU1); + test("-2900null", "" + s_sM + s_iAN); + test("-2900-54", "" + s_sM + f_bM); + test("-2900-87.0", "" + s_sM + f_fM); + test("-2900null", "" + s_sM + s_oAN); + test("-290019", "" + s_sM + f_str); + test("-2900-41", "" + s_sM + sf_bM); + test("-2900null", "" + s_sM + sf_IN); + test("-2900T", "" + s_sM + s_c); + test("-2900-42.0", "" + s_sM + sf_fM); + test("-290025", "" + s_sM + s_b); + test("-2900null", "" + s_sM + f_oN); + test("-2900-1410065408", "" + s_sM + s_lM); + test("-29008.0", "" + s_sM + s_d); + test("-290055.0", "" + s_sM + s_f); + test("-290097000000", "" + s_sM + s_i); + test("-2900-9900", "" + s_sM + f_sM); + test("-2900935228928", "" + s_sM + s_l); + test("-2900-8400", "" + s_sM + sf_sM); + test("-2900C(82)", "" + s_sM + s_o); + test("-2900null", "" + s_sM + sf_oNtS); + test("-2900true", "" + s_sM + s_bl); + test("-29003900", "" + s_sM + s_s); + test("-2900null", "" + s_sM + sf_oN); + test("-290094000000", "" + s_sM + f_I); + test("-2900null", "" + s_sM + f_IN); + test("-2900true", "" + s_sM + sf_bl); + test("-29005500", "" + s_sM + sf_s); + test("-2900-2900", "" + s_sM + s_sM); + test("-2900-194313216", "" + s_sM + sf_l); + test("-290012", "" + s_sM + s_strU1); + test("-2900C(87)", "" + s_sM + sf_o); + test("-290091", "" + s_sM + s_strU2); + test("-290021", "" + s_sM + f_strU1); + test("-290018", "" + s_sM + f_strU2); + test("-2900null", "" + s_sM + f_iAN); + test("-2900null", "" + s_sM + s_oN); + test("-2900\u045180", "" + s_sM + s_strU); + test("-2900C", "" + s_sM + sf_c); + test("-290075", "" + s_sM + sf_str); + test("-2900-43", "" + s_sM + s_bM); + test("-290080", "" + s_sM + sf_b); + test("-2900null", "" + s_sM + s_IN); + test("-2900-52.0", "" + s_sM + s_fM); + test("-290075000000", "" + s_sM + sf_i); + test("-290044", "" + s_sM + f_b); + test("-2900-1705032704", "" + s_sM + sf_lM); + test("-2900null", "" + s_sM + f_oAN); + test("-290083.0", "" + s_sM + f_d); + test("-2900I", "" + s_sM + f_c); + test("-290094.0", "" + s_sM + f_f); + test("-290012.0", "" + s_sM + sf_d); + test("-2900-99.0", "" + s_sM + f_dM); + test("-290017.0", "" + s_sM + sf_f); + test("-2900-84.0", "" + s_sM + sf_dM); + test("-290058000000", "" + s_sM + f_i); + test("-2900-55000000", "" + s_sM + f_iM); + test("-29001460392448", "" + s_sM + f_l); + test("-2900C(70)", "" + s_sM + f_o); + test("-2900\u04511", "" + s_sM + sf_strU); + test("-29008000", "" + s_sM + f_s); + test("-290018", "" + s_sM + s_str); + test("-2900-1000000", "" + s_sM + s_iM); + test("-29001000000", "" + s_sM + sf_I); + test("-2900null", "" + s_sM + f_oNtS); + test("-2900false", "" + s_sM + f_bl); + test("-2900null", "" + s_sM + sf_iAN); + test("-2900-2000000", "" + s_sM + sf_iM); + test("-2900-820130816", "" + s_sM + f_lM); + test("-2900null", "" + s_sM + sf_oAN); + test("-290025000000", "" + s_sM + s_I); + test("-194313216-96.0", "" + sf_l + s_dM); + test("-194313216null", "" + sf_l + s_oNtS); + test("-194313216\u045176", "" + sf_l + f_strU); + test("-19431321692", "" + sf_l + sf_strU2); + test("-19431321651", "" + sf_l + sf_strU1); + test("-194313216null", "" + sf_l + s_iAN); + test("-194313216-54", "" + sf_l + f_bM); + test("-194313216-87.0", "" + sf_l + f_fM); + test("-194313216null", "" + sf_l + s_oAN); + test("-19431321619", "" + sf_l + f_str); + test("-194313216-41", "" + sf_l + sf_bM); + test("-194313216null", "" + sf_l + sf_IN); + test("-194313216T", "" + sf_l + s_c); + test("-194313216-42.0", "" + sf_l + sf_fM); + test("-19431321625", "" + sf_l + s_b); + test("-194313216null", "" + sf_l + f_oN); + test("-194313216-1410065408", "" + sf_l + s_lM); + test("-1943132168.0", "" + sf_l + s_d); + test("-19431321655.0", "" + sf_l + s_f); + test("-19431321697000000", "" + sf_l + s_i); + test("-194313216-9900", "" + sf_l + f_sM); + test("-194313216935228928", "" + sf_l + s_l); + test("-194313216-8400", "" + sf_l + sf_sM); + test("-194313216C(82)", "" + sf_l + s_o); + test("-194313216null", "" + sf_l + sf_oNtS); + test("-194313216true", "" + sf_l + s_bl); + test("-1943132163900", "" + sf_l + s_s); + test("-194313216null", "" + sf_l + sf_oN); + test("-19431321694000000", "" + sf_l + f_I); + test("-194313216null", "" + sf_l + f_IN); + test("-194313216true", "" + sf_l + sf_bl); + test("-1943132165500", "" + sf_l + sf_s); + test("-194313216-2900", "" + sf_l + s_sM); + test("-194313216-194313216", "" + sf_l + sf_l); + test("-19431321612", "" + sf_l + s_strU1); + test("-194313216C(87)", "" + sf_l + sf_o); + test("-19431321691", "" + sf_l + s_strU2); + test("-19431321621", "" + sf_l + f_strU1); + test("-19431321618", "" + sf_l + f_strU2); + test("-194313216null", "" + sf_l + f_iAN); + test("-194313216null", "" + sf_l + s_oN); + test("-194313216\u045180", "" + sf_l + s_strU); + test("-194313216C", "" + sf_l + sf_c); + test("-19431321675", "" + sf_l + sf_str); + test("-194313216-43", "" + sf_l + s_bM); + test("-19431321680", "" + sf_l + sf_b); + test("-194313216null", "" + sf_l + s_IN); + test("-194313216-52.0", "" + sf_l + s_fM); + test("-19431321675000000", "" + sf_l + sf_i); + test("-19431321644", "" + sf_l + f_b); + test("-194313216-1705032704", "" + sf_l + sf_lM); + test("-194313216null", "" + sf_l + f_oAN); + test("-19431321683.0", "" + sf_l + f_d); + test("-194313216I", "" + sf_l + f_c); + test("-19431321694.0", "" + sf_l + f_f); + test("-19431321612.0", "" + sf_l + sf_d); + test("-194313216-99.0", "" + sf_l + f_dM); + test("-19431321617.0", "" + sf_l + sf_f); + test("-194313216-84.0", "" + sf_l + sf_dM); + test("-19431321658000000", "" + sf_l + f_i); + test("-194313216-55000000", "" + sf_l + f_iM); + test("-1943132161460392448", "" + sf_l + f_l); + test("-194313216C(70)", "" + sf_l + f_o); + test("-194313216\u04511", "" + sf_l + sf_strU); + test("-1943132168000", "" + sf_l + f_s); + test("-19431321618", "" + sf_l + s_str); + test("-194313216-1000000", "" + sf_l + s_iM); + test("-1943132161000000", "" + sf_l + sf_I); + test("-194313216null", "" + sf_l + f_oNtS); + test("-194313216false", "" + sf_l + f_bl); + test("-194313216null", "" + sf_l + sf_iAN); + test("-194313216-2000000", "" + sf_l + sf_iM); + test("-194313216-820130816", "" + sf_l + f_lM); + test("-194313216null", "" + sf_l + sf_oAN); + test("-19431321625000000", "" + sf_l + s_I); + test("12-96.0", "" + s_strU1 + s_dM); + test("12null", "" + s_strU1 + s_oNtS); + test("12\u045176", "" + s_strU1 + f_strU); + test("1292", "" + s_strU1 + sf_strU2); + test("1251", "" + s_strU1 + sf_strU1); + test("12null", "" + s_strU1 + s_iAN); + test("12-54", "" + s_strU1 + f_bM); + test("12-87.0", "" + s_strU1 + f_fM); + test("12null", "" + s_strU1 + s_oAN); + test("1219", "" + s_strU1 + f_str); + test("12-41", "" + s_strU1 + sf_bM); + test("12null", "" + s_strU1 + sf_IN); + test("12T", "" + s_strU1 + s_c); + test("12-42.0", "" + s_strU1 + sf_fM); + test("1225", "" + s_strU1 + s_b); + test("12null", "" + s_strU1 + f_oN); + test("12-1410065408", "" + s_strU1 + s_lM); + test("128.0", "" + s_strU1 + s_d); + test("1255.0", "" + s_strU1 + s_f); + test("1297000000", "" + s_strU1 + s_i); + test("12-9900", "" + s_strU1 + f_sM); + test("12935228928", "" + s_strU1 + s_l); + test("12-8400", "" + s_strU1 + sf_sM); + test("12C(82)", "" + s_strU1 + s_o); + test("12null", "" + s_strU1 + sf_oNtS); + test("12true", "" + s_strU1 + s_bl); + test("123900", "" + s_strU1 + s_s); + test("12null", "" + s_strU1 + sf_oN); + test("1294000000", "" + s_strU1 + f_I); + test("12null", "" + s_strU1 + f_IN); + test("12true", "" + s_strU1 + sf_bl); + test("125500", "" + s_strU1 + sf_s); + test("12-2900", "" + s_strU1 + s_sM); + test("12-194313216", "" + s_strU1 + sf_l); + test("1212", "" + s_strU1 + s_strU1); + test("12C(87)", "" + s_strU1 + sf_o); + test("1291", "" + s_strU1 + s_strU2); + test("1221", "" + s_strU1 + f_strU1); + test("1218", "" + s_strU1 + f_strU2); + test("12null", "" + s_strU1 + f_iAN); + test("12null", "" + s_strU1 + s_oN); + test("12\u045180", "" + s_strU1 + s_strU); + test("12C", "" + s_strU1 + sf_c); + test("1275", "" + s_strU1 + sf_str); + test("12-43", "" + s_strU1 + s_bM); + test("1280", "" + s_strU1 + sf_b); + test("12null", "" + s_strU1 + s_IN); + test("12-52.0", "" + s_strU1 + s_fM); + test("1275000000", "" + s_strU1 + sf_i); + test("1244", "" + s_strU1 + f_b); + test("12-1705032704", "" + s_strU1 + sf_lM); + test("12null", "" + s_strU1 + f_oAN); + test("1283.0", "" + s_strU1 + f_d); + test("12I", "" + s_strU1 + f_c); + test("1294.0", "" + s_strU1 + f_f); + test("1212.0", "" + s_strU1 + sf_d); + test("12-99.0", "" + s_strU1 + f_dM); + test("1217.0", "" + s_strU1 + sf_f); + test("12-84.0", "" + s_strU1 + sf_dM); + test("1258000000", "" + s_strU1 + f_i); + test("12-55000000", "" + s_strU1 + f_iM); + test("121460392448", "" + s_strU1 + f_l); + test("12C(70)", "" + s_strU1 + f_o); + test("12\u04511", "" + s_strU1 + sf_strU); + test("128000", "" + s_strU1 + f_s); + test("1218", "" + s_strU1 + s_str); + test("12-1000000", "" + s_strU1 + s_iM); + test("121000000", "" + s_strU1 + sf_I); + test("12null", "" + s_strU1 + f_oNtS); + test("12false", "" + s_strU1 + f_bl); + test("12null", "" + s_strU1 + sf_iAN); + test("12-2000000", "" + s_strU1 + sf_iM); + test("12-820130816", "" + s_strU1 + f_lM); + test("12null", "" + s_strU1 + sf_oAN); + test("1225000000", "" + s_strU1 + s_I); + test("C(87)-96.0", "" + sf_o + s_dM); + test("C(87)null", "" + sf_o + s_oNtS); + test("C(87)\u045176", "" + sf_o + f_strU); + test("C(87)92", "" + sf_o + sf_strU2); + test("C(87)51", "" + sf_o + sf_strU1); + test("C(87)null", "" + sf_o + s_iAN); + test("C(87)-54", "" + sf_o + f_bM); + test("C(87)-87.0", "" + sf_o + f_fM); + test("C(87)null", "" + sf_o + s_oAN); + test("C(87)19", "" + sf_o + f_str); + test("C(87)-41", "" + sf_o + sf_bM); + test("C(87)null", "" + sf_o + sf_IN); + test("C(87)T", "" + sf_o + s_c); + test("C(87)-42.0", "" + sf_o + sf_fM); + test("C(87)25", "" + sf_o + s_b); + test("C(87)null", "" + sf_o + f_oN); + test("C(87)-1410065408", "" + sf_o + s_lM); + test("C(87)8.0", "" + sf_o + s_d); + test("C(87)55.0", "" + sf_o + s_f); + test("C(87)97000000", "" + sf_o + s_i); + test("C(87)-9900", "" + sf_o + f_sM); + test("C(87)935228928", "" + sf_o + s_l); + test("C(87)-8400", "" + sf_o + sf_sM); + test("C(87)C(82)", "" + sf_o + s_o); + test("C(87)null", "" + sf_o + sf_oNtS); + test("C(87)true", "" + sf_o + s_bl); + test("C(87)3900", "" + sf_o + s_s); + test("C(87)null", "" + sf_o + sf_oN); + test("C(87)94000000", "" + sf_o + f_I); + test("C(87)null", "" + sf_o + f_IN); + test("C(87)true", "" + sf_o + sf_bl); + test("C(87)5500", "" + sf_o + sf_s); + test("C(87)-2900", "" + sf_o + s_sM); + test("C(87)-194313216", "" + sf_o + sf_l); + test("C(87)12", "" + sf_o + s_strU1); + test("C(87)C(87)", "" + sf_o + sf_o); + test("C(87)91", "" + sf_o + s_strU2); + test("C(87)21", "" + sf_o + f_strU1); + test("C(87)18", "" + sf_o + f_strU2); + test("C(87)null", "" + sf_o + f_iAN); + test("C(87)null", "" + sf_o + s_oN); + test("C(87)\u045180", "" + sf_o + s_strU); + test("C(87)C", "" + sf_o + sf_c); + test("C(87)75", "" + sf_o + sf_str); + test("C(87)-43", "" + sf_o + s_bM); + test("C(87)80", "" + sf_o + sf_b); + test("C(87)null", "" + sf_o + s_IN); + test("C(87)-52.0", "" + sf_o + s_fM); + test("C(87)75000000", "" + sf_o + sf_i); + test("C(87)44", "" + sf_o + f_b); + test("C(87)-1705032704", "" + sf_o + sf_lM); + test("C(87)null", "" + sf_o + f_oAN); + test("C(87)83.0", "" + sf_o + f_d); + test("C(87)I", "" + sf_o + f_c); + test("C(87)94.0", "" + sf_o + f_f); + test("C(87)12.0", "" + sf_o + sf_d); + test("C(87)-99.0", "" + sf_o + f_dM); + test("C(87)17.0", "" + sf_o + sf_f); + test("C(87)-84.0", "" + sf_o + sf_dM); + test("C(87)58000000", "" + sf_o + f_i); + test("C(87)-55000000", "" + sf_o + f_iM); + test("C(87)1460392448", "" + sf_o + f_l); + test("C(87)C(70)", "" + sf_o + f_o); + test("C(87)\u04511", "" + sf_o + sf_strU); + test("C(87)8000", "" + sf_o + f_s); + test("C(87)18", "" + sf_o + s_str); + test("C(87)-1000000", "" + sf_o + s_iM); + test("C(87)1000000", "" + sf_o + sf_I); + test("C(87)null", "" + sf_o + f_oNtS); + test("C(87)false", "" + sf_o + f_bl); + test("C(87)null", "" + sf_o + sf_iAN); + test("C(87)-2000000", "" + sf_o + sf_iM); + test("C(87)-820130816", "" + sf_o + f_lM); + test("C(87)null", "" + sf_o + sf_oAN); + test("C(87)25000000", "" + sf_o + s_I); + test("91-96.0", "" + s_strU2 + s_dM); + test("91null", "" + s_strU2 + s_oNtS); + test("91\u045176", "" + s_strU2 + f_strU); + test("9192", "" + s_strU2 + sf_strU2); + test("9151", "" + s_strU2 + sf_strU1); + test("91null", "" + s_strU2 + s_iAN); + test("91-54", "" + s_strU2 + f_bM); + test("91-87.0", "" + s_strU2 + f_fM); + test("91null", "" + s_strU2 + s_oAN); + test("9119", "" + s_strU2 + f_str); + test("91-41", "" + s_strU2 + sf_bM); + test("91null", "" + s_strU2 + sf_IN); + test("91T", "" + s_strU2 + s_c); + test("91-42.0", "" + s_strU2 + sf_fM); + test("9125", "" + s_strU2 + s_b); + test("91null", "" + s_strU2 + f_oN); + test("91-1410065408", "" + s_strU2 + s_lM); + test("918.0", "" + s_strU2 + s_d); + test("9155.0", "" + s_strU2 + s_f); + test("9197000000", "" + s_strU2 + s_i); + test("91-9900", "" + s_strU2 + f_sM); + test("91935228928", "" + s_strU2 + s_l); + test("91-8400", "" + s_strU2 + sf_sM); + test("91C(82)", "" + s_strU2 + s_o); + test("91null", "" + s_strU2 + sf_oNtS); + test("91true", "" + s_strU2 + s_bl); + test("913900", "" + s_strU2 + s_s); + test("91null", "" + s_strU2 + sf_oN); + test("9194000000", "" + s_strU2 + f_I); + test("91null", "" + s_strU2 + f_IN); + test("91true", "" + s_strU2 + sf_bl); + test("915500", "" + s_strU2 + sf_s); + test("91-2900", "" + s_strU2 + s_sM); + test("91-194313216", "" + s_strU2 + sf_l); + test("9112", "" + s_strU2 + s_strU1); + test("91C(87)", "" + s_strU2 + sf_o); + test("9191", "" + s_strU2 + s_strU2); + test("9121", "" + s_strU2 + f_strU1); + test("9118", "" + s_strU2 + f_strU2); + test("91null", "" + s_strU2 + f_iAN); + test("91null", "" + s_strU2 + s_oN); + test("91\u045180", "" + s_strU2 + s_strU); + test("91C", "" + s_strU2 + sf_c); + test("9175", "" + s_strU2 + sf_str); + test("91-43", "" + s_strU2 + s_bM); + test("9180", "" + s_strU2 + sf_b); + test("91null", "" + s_strU2 + s_IN); + test("91-52.0", "" + s_strU2 + s_fM); + test("9175000000", "" + s_strU2 + sf_i); + test("9144", "" + s_strU2 + f_b); + test("91-1705032704", "" + s_strU2 + sf_lM); + test("91null", "" + s_strU2 + f_oAN); + test("9183.0", "" + s_strU2 + f_d); + test("91I", "" + s_strU2 + f_c); + test("9194.0", "" + s_strU2 + f_f); + test("9112.0", "" + s_strU2 + sf_d); + test("91-99.0", "" + s_strU2 + f_dM); + test("9117.0", "" + s_strU2 + sf_f); + test("91-84.0", "" + s_strU2 + sf_dM); + test("9158000000", "" + s_strU2 + f_i); + test("91-55000000", "" + s_strU2 + f_iM); + test("911460392448", "" + s_strU2 + f_l); + test("91C(70)", "" + s_strU2 + f_o); + test("91\u04511", "" + s_strU2 + sf_strU); + test("918000", "" + s_strU2 + f_s); + test("9118", "" + s_strU2 + s_str); + test("91-1000000", "" + s_strU2 + s_iM); + test("911000000", "" + s_strU2 + sf_I); + test("91null", "" + s_strU2 + f_oNtS); + test("91false", "" + s_strU2 + f_bl); + test("91null", "" + s_strU2 + sf_iAN); + test("91-2000000", "" + s_strU2 + sf_iM); + test("91-820130816", "" + s_strU2 + f_lM); + test("91null", "" + s_strU2 + sf_oAN); + test("9125000000", "" + s_strU2 + s_I); + test("21-96.0", "" + f_strU1 + s_dM); + test("21null", "" + f_strU1 + s_oNtS); + test("21\u045176", "" + f_strU1 + f_strU); + test("2192", "" + f_strU1 + sf_strU2); + test("2151", "" + f_strU1 + sf_strU1); + test("21null", "" + f_strU1 + s_iAN); + test("21-54", "" + f_strU1 + f_bM); + test("21-87.0", "" + f_strU1 + f_fM); + test("21null", "" + f_strU1 + s_oAN); + test("2119", "" + f_strU1 + f_str); + test("21-41", "" + f_strU1 + sf_bM); + test("21null", "" + f_strU1 + sf_IN); + test("21T", "" + f_strU1 + s_c); + test("21-42.0", "" + f_strU1 + sf_fM); + test("2125", "" + f_strU1 + s_b); + test("21null", "" + f_strU1 + f_oN); + test("21-1410065408", "" + f_strU1 + s_lM); + test("218.0", "" + f_strU1 + s_d); + test("2155.0", "" + f_strU1 + s_f); + test("2197000000", "" + f_strU1 + s_i); + test("21-9900", "" + f_strU1 + f_sM); + test("21935228928", "" + f_strU1 + s_l); + test("21-8400", "" + f_strU1 + sf_sM); + test("21C(82)", "" + f_strU1 + s_o); + test("21null", "" + f_strU1 + sf_oNtS); + test("21true", "" + f_strU1 + s_bl); + test("213900", "" + f_strU1 + s_s); + test("21null", "" + f_strU1 + sf_oN); + test("2194000000", "" + f_strU1 + f_I); + test("21null", "" + f_strU1 + f_IN); + test("21true", "" + f_strU1 + sf_bl); + test("215500", "" + f_strU1 + sf_s); + test("21-2900", "" + f_strU1 + s_sM); + test("21-194313216", "" + f_strU1 + sf_l); + test("2112", "" + f_strU1 + s_strU1); + test("21C(87)", "" + f_strU1 + sf_o); + test("2191", "" + f_strU1 + s_strU2); + test("2121", "" + f_strU1 + f_strU1); + test("2118", "" + f_strU1 + f_strU2); + test("21null", "" + f_strU1 + f_iAN); + test("21null", "" + f_strU1 + s_oN); + test("21\u045180", "" + f_strU1 + s_strU); + test("21C", "" + f_strU1 + sf_c); + test("2175", "" + f_strU1 + sf_str); + test("21-43", "" + f_strU1 + s_bM); + test("2180", "" + f_strU1 + sf_b); + test("21null", "" + f_strU1 + s_IN); + test("21-52.0", "" + f_strU1 + s_fM); + test("2175000000", "" + f_strU1 + sf_i); + test("2144", "" + f_strU1 + f_b); + test("21-1705032704", "" + f_strU1 + sf_lM); + test("21null", "" + f_strU1 + f_oAN); + test("2183.0", "" + f_strU1 + f_d); + test("21I", "" + f_strU1 + f_c); + test("2194.0", "" + f_strU1 + f_f); + test("2112.0", "" + f_strU1 + sf_d); + test("21-99.0", "" + f_strU1 + f_dM); + test("2117.0", "" + f_strU1 + sf_f); + test("21-84.0", "" + f_strU1 + sf_dM); + test("2158000000", "" + f_strU1 + f_i); + test("21-55000000", "" + f_strU1 + f_iM); + test("211460392448", "" + f_strU1 + f_l); + test("21C(70)", "" + f_strU1 + f_o); + test("21\u04511", "" + f_strU1 + sf_strU); + test("218000", "" + f_strU1 + f_s); + test("2118", "" + f_strU1 + s_str); + test("21-1000000", "" + f_strU1 + s_iM); + test("211000000", "" + f_strU1 + sf_I); + test("21null", "" + f_strU1 + f_oNtS); + test("21false", "" + f_strU1 + f_bl); + test("21null", "" + f_strU1 + sf_iAN); + test("21-2000000", "" + f_strU1 + sf_iM); + test("21-820130816", "" + f_strU1 + f_lM); + test("21null", "" + f_strU1 + sf_oAN); + test("2125000000", "" + f_strU1 + s_I); + test("18-96.0", "" + f_strU2 + s_dM); + test("18null", "" + f_strU2 + s_oNtS); + test("18\u045176", "" + f_strU2 + f_strU); + test("1892", "" + f_strU2 + sf_strU2); + test("1851", "" + f_strU2 + sf_strU1); + test("18null", "" + f_strU2 + s_iAN); + test("18-54", "" + f_strU2 + f_bM); + test("18-87.0", "" + f_strU2 + f_fM); + test("18null", "" + f_strU2 + s_oAN); + test("1819", "" + f_strU2 + f_str); + test("18-41", "" + f_strU2 + sf_bM); + test("18null", "" + f_strU2 + sf_IN); + test("18T", "" + f_strU2 + s_c); + test("18-42.0", "" + f_strU2 + sf_fM); + test("1825", "" + f_strU2 + s_b); + test("18null", "" + f_strU2 + f_oN); + test("18-1410065408", "" + f_strU2 + s_lM); + test("188.0", "" + f_strU2 + s_d); + test("1855.0", "" + f_strU2 + s_f); + test("1897000000", "" + f_strU2 + s_i); + test("18-9900", "" + f_strU2 + f_sM); + test("18935228928", "" + f_strU2 + s_l); + test("18-8400", "" + f_strU2 + sf_sM); + test("18C(82)", "" + f_strU2 + s_o); + test("18null", "" + f_strU2 + sf_oNtS); + test("18true", "" + f_strU2 + s_bl); + test("183900", "" + f_strU2 + s_s); + test("18null", "" + f_strU2 + sf_oN); + test("1894000000", "" + f_strU2 + f_I); + test("18null", "" + f_strU2 + f_IN); + test("18true", "" + f_strU2 + sf_bl); + test("185500", "" + f_strU2 + sf_s); + test("18-2900", "" + f_strU2 + s_sM); + test("18-194313216", "" + f_strU2 + sf_l); + test("1812", "" + f_strU2 + s_strU1); + test("18C(87)", "" + f_strU2 + sf_o); + test("1891", "" + f_strU2 + s_strU2); + test("1821", "" + f_strU2 + f_strU1); + test("1818", "" + f_strU2 + f_strU2); + test("18null", "" + f_strU2 + f_iAN); + test("18null", "" + f_strU2 + s_oN); + test("18\u045180", "" + f_strU2 + s_strU); + test("18C", "" + f_strU2 + sf_c); + test("1875", "" + f_strU2 + sf_str); + test("18-43", "" + f_strU2 + s_bM); + test("1880", "" + f_strU2 + sf_b); + test("18null", "" + f_strU2 + s_IN); + test("18-52.0", "" + f_strU2 + s_fM); + test("1875000000", "" + f_strU2 + sf_i); + test("1844", "" + f_strU2 + f_b); + test("18-1705032704", "" + f_strU2 + sf_lM); + test("18null", "" + f_strU2 + f_oAN); + test("1883.0", "" + f_strU2 + f_d); + test("18I", "" + f_strU2 + f_c); + test("1894.0", "" + f_strU2 + f_f); + test("1812.0", "" + f_strU2 + sf_d); + test("18-99.0", "" + f_strU2 + f_dM); + test("1817.0", "" + f_strU2 + sf_f); + test("18-84.0", "" + f_strU2 + sf_dM); + test("1858000000", "" + f_strU2 + f_i); + test("18-55000000", "" + f_strU2 + f_iM); + test("181460392448", "" + f_strU2 + f_l); + test("18C(70)", "" + f_strU2 + f_o); + test("18\u04511", "" + f_strU2 + sf_strU); + test("188000", "" + f_strU2 + f_s); + test("1818", "" + f_strU2 + s_str); + test("18-1000000", "" + f_strU2 + s_iM); + test("181000000", "" + f_strU2 + sf_I); + test("18null", "" + f_strU2 + f_oNtS); + test("18false", "" + f_strU2 + f_bl); + test("18null", "" + f_strU2 + sf_iAN); + test("18-2000000", "" + f_strU2 + sf_iM); + test("18-820130816", "" + f_strU2 + f_lM); + test("18null", "" + f_strU2 + sf_oAN); + test("1825000000", "" + f_strU2 + s_I); + } + + public void run3() { + test("null-96.0", "" + f_iAN + s_dM); + test("nullnull", "" + f_iAN + s_oNtS); + test("null\u045176", "" + f_iAN + f_strU); + test("null92", "" + f_iAN + sf_strU2); + test("null51", "" + f_iAN + sf_strU1); + test("nullnull", "" + f_iAN + s_iAN); + test("null-54", "" + f_iAN + f_bM); + test("null-87.0", "" + f_iAN + f_fM); + test("nullnull", "" + f_iAN + s_oAN); + test("null19", "" + f_iAN + f_str); + test("null-41", "" + f_iAN + sf_bM); + test("nullnull", "" + f_iAN + sf_IN); + test("nullT", "" + f_iAN + s_c); + test("null-42.0", "" + f_iAN + sf_fM); + test("null25", "" + f_iAN + s_b); + test("nullnull", "" + f_iAN + f_oN); + test("null-1410065408", "" + f_iAN + s_lM); + test("null8.0", "" + f_iAN + s_d); + test("null55.0", "" + f_iAN + s_f); + test("null97000000", "" + f_iAN + s_i); + test("null-9900", "" + f_iAN + f_sM); + test("null935228928", "" + f_iAN + s_l); + test("null-8400", "" + f_iAN + sf_sM); + test("nullC(82)", "" + f_iAN + s_o); + test("nullnull", "" + f_iAN + sf_oNtS); + test("nulltrue", "" + f_iAN + s_bl); + test("null3900", "" + f_iAN + s_s); + test("nullnull", "" + f_iAN + sf_oN); + test("null94000000", "" + f_iAN + f_I); + test("nullnull", "" + f_iAN + f_IN); + test("nulltrue", "" + f_iAN + sf_bl); + test("null5500", "" + f_iAN + sf_s); + test("null-2900", "" + f_iAN + s_sM); + test("null-194313216", "" + f_iAN + sf_l); + test("null12", "" + f_iAN + s_strU1); + test("nullC(87)", "" + f_iAN + sf_o); + test("null91", "" + f_iAN + s_strU2); + test("null21", "" + f_iAN + f_strU1); + test("null18", "" + f_iAN + f_strU2); + test("nullnull", "" + f_iAN + f_iAN); + test("nullnull", "" + f_iAN + s_oN); + test("null\u045180", "" + f_iAN + s_strU); + test("nullC", "" + f_iAN + sf_c); + test("null75", "" + f_iAN + sf_str); + test("null-43", "" + f_iAN + s_bM); + test("null80", "" + f_iAN + sf_b); + test("nullnull", "" + f_iAN + s_IN); + test("null-52.0", "" + f_iAN + s_fM); + test("null75000000", "" + f_iAN + sf_i); + test("null44", "" + f_iAN + f_b); + test("null-1705032704", "" + f_iAN + sf_lM); + test("nullnull", "" + f_iAN + f_oAN); + test("null83.0", "" + f_iAN + f_d); + test("nullI", "" + f_iAN + f_c); + test("null94.0", "" + f_iAN + f_f); + test("null12.0", "" + f_iAN + sf_d); + test("null-99.0", "" + f_iAN + f_dM); + test("null17.0", "" + f_iAN + sf_f); + test("null-84.0", "" + f_iAN + sf_dM); + test("null58000000", "" + f_iAN + f_i); + test("null-55000000", "" + f_iAN + f_iM); + test("null1460392448", "" + f_iAN + f_l); + test("nullC(70)", "" + f_iAN + f_o); + test("null\u04511", "" + f_iAN + sf_strU); + test("null8000", "" + f_iAN + f_s); + test("null18", "" + f_iAN + s_str); + test("null-1000000", "" + f_iAN + s_iM); + test("null1000000", "" + f_iAN + sf_I); + test("nullnull", "" + f_iAN + f_oNtS); + test("nullfalse", "" + f_iAN + f_bl); + test("nullnull", "" + f_iAN + sf_iAN); + test("null-2000000", "" + f_iAN + sf_iM); + test("null-820130816", "" + f_iAN + f_lM); + test("nullnull", "" + f_iAN + sf_oAN); + test("null25000000", "" + f_iAN + s_I); + test("null-96.0", "" + s_oN + s_dM); + test("nullnull", "" + s_oN + s_oNtS); + test("null\u045176", "" + s_oN + f_strU); + test("null92", "" + s_oN + sf_strU2); + test("null51", "" + s_oN + sf_strU1); + test("nullnull", "" + s_oN + s_iAN); + test("null-54", "" + s_oN + f_bM); + test("null-87.0", "" + s_oN + f_fM); + test("nullnull", "" + s_oN + s_oAN); + test("null19", "" + s_oN + f_str); + test("null-41", "" + s_oN + sf_bM); + test("nullnull", "" + s_oN + sf_IN); + test("nullT", "" + s_oN + s_c); + test("null-42.0", "" + s_oN + sf_fM); + test("null25", "" + s_oN + s_b); + test("nullnull", "" + s_oN + f_oN); + test("null-1410065408", "" + s_oN + s_lM); + test("null8.0", "" + s_oN + s_d); + test("null55.0", "" + s_oN + s_f); + test("null97000000", "" + s_oN + s_i); + test("null-9900", "" + s_oN + f_sM); + test("null935228928", "" + s_oN + s_l); + test("null-8400", "" + s_oN + sf_sM); + test("nullC(82)", "" + s_oN + s_o); + test("nullnull", "" + s_oN + sf_oNtS); + test("nulltrue", "" + s_oN + s_bl); + test("null3900", "" + s_oN + s_s); + test("nullnull", "" + s_oN + sf_oN); + test("null94000000", "" + s_oN + f_I); + test("nullnull", "" + s_oN + f_IN); + test("nulltrue", "" + s_oN + sf_bl); + test("null5500", "" + s_oN + sf_s); + test("null-2900", "" + s_oN + s_sM); + test("null-194313216", "" + s_oN + sf_l); + test("null12", "" + s_oN + s_strU1); + test("nullC(87)", "" + s_oN + sf_o); + test("null91", "" + s_oN + s_strU2); + test("null21", "" + s_oN + f_strU1); + test("null18", "" + s_oN + f_strU2); + test("nullnull", "" + s_oN + f_iAN); + test("nullnull", "" + s_oN + s_oN); + test("null\u045180", "" + s_oN + s_strU); + test("nullC", "" + s_oN + sf_c); + test("null75", "" + s_oN + sf_str); + test("null-43", "" + s_oN + s_bM); + test("null80", "" + s_oN + sf_b); + test("nullnull", "" + s_oN + s_IN); + test("null-52.0", "" + s_oN + s_fM); + test("null75000000", "" + s_oN + sf_i); + test("null44", "" + s_oN + f_b); + test("null-1705032704", "" + s_oN + sf_lM); + test("nullnull", "" + s_oN + f_oAN); + test("null83.0", "" + s_oN + f_d); + test("nullI", "" + s_oN + f_c); + test("null94.0", "" + s_oN + f_f); + test("null12.0", "" + s_oN + sf_d); + test("null-99.0", "" + s_oN + f_dM); + test("null17.0", "" + s_oN + sf_f); + test("null-84.0", "" + s_oN + sf_dM); + test("null58000000", "" + s_oN + f_i); + test("null-55000000", "" + s_oN + f_iM); + test("null1460392448", "" + s_oN + f_l); + test("nullC(70)", "" + s_oN + f_o); + test("null\u04511", "" + s_oN + sf_strU); + test("null8000", "" + s_oN + f_s); + test("null18", "" + s_oN + s_str); + test("null-1000000", "" + s_oN + s_iM); + test("null1000000", "" + s_oN + sf_I); + test("nullnull", "" + s_oN + f_oNtS); + test("nullfalse", "" + s_oN + f_bl); + test("nullnull", "" + s_oN + sf_iAN); + test("null-2000000", "" + s_oN + sf_iM); + test("null-820130816", "" + s_oN + f_lM); + test("nullnull", "" + s_oN + sf_oAN); + test("null25000000", "" + s_oN + s_I); + test("\u045180-96.0", "" + s_strU + s_dM); + test("\u045180null", "" + s_strU + s_oNtS); + test("\u045180\u045176", "" + s_strU + f_strU); + test("\u04518092", "" + s_strU + sf_strU2); + test("\u04518051", "" + s_strU + sf_strU1); + test("\u045180null", "" + s_strU + s_iAN); + test("\u045180-54", "" + s_strU + f_bM); + test("\u045180-87.0", "" + s_strU + f_fM); + test("\u045180null", "" + s_strU + s_oAN); + test("\u04518019", "" + s_strU + f_str); + test("\u045180-41", "" + s_strU + sf_bM); + test("\u045180null", "" + s_strU + sf_IN); + test("\u045180T", "" + s_strU + s_c); + test("\u045180-42.0", "" + s_strU + sf_fM); + test("\u04518025", "" + s_strU + s_b); + test("\u045180null", "" + s_strU + f_oN); + test("\u045180-1410065408", "" + s_strU + s_lM); + test("\u0451808.0", "" + s_strU + s_d); + test("\u04518055.0", "" + s_strU + s_f); + test("\u04518097000000", "" + s_strU + s_i); + test("\u045180-9900", "" + s_strU + f_sM); + test("\u045180935228928", "" + s_strU + s_l); + test("\u045180-8400", "" + s_strU + sf_sM); + test("\u045180C(82)", "" + s_strU + s_o); + test("\u045180null", "" + s_strU + sf_oNtS); + test("\u045180true", "" + s_strU + s_bl); + test("\u0451803900", "" + s_strU + s_s); + test("\u045180null", "" + s_strU + sf_oN); + test("\u04518094000000", "" + s_strU + f_I); + test("\u045180null", "" + s_strU + f_IN); + test("\u045180true", "" + s_strU + sf_bl); + test("\u0451805500", "" + s_strU + sf_s); + test("\u045180-2900", "" + s_strU + s_sM); + test("\u045180-194313216", "" + s_strU + sf_l); + test("\u04518012", "" + s_strU + s_strU1); + test("\u045180C(87)", "" + s_strU + sf_o); + test("\u04518091", "" + s_strU + s_strU2); + test("\u04518021", "" + s_strU + f_strU1); + test("\u04518018", "" + s_strU + f_strU2); + test("\u045180null", "" + s_strU + f_iAN); + test("\u045180null", "" + s_strU + s_oN); + test("\u045180\u045180", "" + s_strU + s_strU); + test("\u045180C", "" + s_strU + sf_c); + test("\u04518075", "" + s_strU + sf_str); + test("\u045180-43", "" + s_strU + s_bM); + test("\u04518080", "" + s_strU + sf_b); + test("\u045180null", "" + s_strU + s_IN); + test("\u045180-52.0", "" + s_strU + s_fM); + test("\u04518075000000", "" + s_strU + sf_i); + test("\u04518044", "" + s_strU + f_b); + test("\u045180-1705032704", "" + s_strU + sf_lM); + test("\u045180null", "" + s_strU + f_oAN); + test("\u04518083.0", "" + s_strU + f_d); + test("\u045180I", "" + s_strU + f_c); + test("\u04518094.0", "" + s_strU + f_f); + test("\u04518012.0", "" + s_strU + sf_d); + test("\u045180-99.0", "" + s_strU + f_dM); + test("\u04518017.0", "" + s_strU + sf_f); + test("\u045180-84.0", "" + s_strU + sf_dM); + test("\u04518058000000", "" + s_strU + f_i); + test("\u045180-55000000", "" + s_strU + f_iM); + test("\u0451801460392448", "" + s_strU + f_l); + test("\u045180C(70)", "" + s_strU + f_o); + test("\u045180\u04511", "" + s_strU + sf_strU); + test("\u0451808000", "" + s_strU + f_s); + test("\u04518018", "" + s_strU + s_str); + test("\u045180-1000000", "" + s_strU + s_iM); + test("\u0451801000000", "" + s_strU + sf_I); + test("\u045180null", "" + s_strU + f_oNtS); + test("\u045180false", "" + s_strU + f_bl); + test("\u045180null", "" + s_strU + sf_iAN); + test("\u045180-2000000", "" + s_strU + sf_iM); + test("\u045180-820130816", "" + s_strU + f_lM); + test("\u045180null", "" + s_strU + sf_oAN); + test("\u04518025000000", "" + s_strU + s_I); + test("C-96.0", "" + sf_c + s_dM); + test("Cnull", "" + sf_c + s_oNtS); + test("C\u045176", "" + sf_c + f_strU); + test("C92", "" + sf_c + sf_strU2); + test("C51", "" + sf_c + sf_strU1); + test("Cnull", "" + sf_c + s_iAN); + test("C-54", "" + sf_c + f_bM); + test("C-87.0", "" + sf_c + f_fM); + test("Cnull", "" + sf_c + s_oAN); + test("C19", "" + sf_c + f_str); + test("C-41", "" + sf_c + sf_bM); + test("Cnull", "" + sf_c + sf_IN); + test("CT", "" + sf_c + s_c); + test("C-42.0", "" + sf_c + sf_fM); + test("C25", "" + sf_c + s_b); + test("Cnull", "" + sf_c + f_oN); + test("C-1410065408", "" + sf_c + s_lM); + test("C8.0", "" + sf_c + s_d); + test("C55.0", "" + sf_c + s_f); + test("C97000000", "" + sf_c + s_i); + test("C-9900", "" + sf_c + f_sM); + test("C935228928", "" + sf_c + s_l); + test("C-8400", "" + sf_c + sf_sM); + test("CC(82)", "" + sf_c + s_o); + test("Cnull", "" + sf_c + sf_oNtS); + test("Ctrue", "" + sf_c + s_bl); + test("C3900", "" + sf_c + s_s); + test("Cnull", "" + sf_c + sf_oN); + test("C94000000", "" + sf_c + f_I); + test("Cnull", "" + sf_c + f_IN); + test("Ctrue", "" + sf_c + sf_bl); + test("C5500", "" + sf_c + sf_s); + test("C-2900", "" + sf_c + s_sM); + test("C-194313216", "" + sf_c + sf_l); + test("C12", "" + sf_c + s_strU1); + test("CC(87)", "" + sf_c + sf_o); + test("C91", "" + sf_c + s_strU2); + test("C21", "" + sf_c + f_strU1); + test("C18", "" + sf_c + f_strU2); + test("Cnull", "" + sf_c + f_iAN); + test("Cnull", "" + sf_c + s_oN); + test("C\u045180", "" + sf_c + s_strU); + test("CC", "" + sf_c + sf_c); + test("C75", "" + sf_c + sf_str); + test("C-43", "" + sf_c + s_bM); + test("C80", "" + sf_c + sf_b); + test("Cnull", "" + sf_c + s_IN); + test("C-52.0", "" + sf_c + s_fM); + test("C75000000", "" + sf_c + sf_i); + test("C44", "" + sf_c + f_b); + test("C-1705032704", "" + sf_c + sf_lM); + test("Cnull", "" + sf_c + f_oAN); + test("C83.0", "" + sf_c + f_d); + test("CI", "" + sf_c + f_c); + test("C94.0", "" + sf_c + f_f); + test("C12.0", "" + sf_c + sf_d); + test("C-99.0", "" + sf_c + f_dM); + test("C17.0", "" + sf_c + sf_f); + test("C-84.0", "" + sf_c + sf_dM); + test("C58000000", "" + sf_c + f_i); + test("C-55000000", "" + sf_c + f_iM); + test("C1460392448", "" + sf_c + f_l); + test("CC(70)", "" + sf_c + f_o); + test("C\u04511", "" + sf_c + sf_strU); + test("C8000", "" + sf_c + f_s); + test("C18", "" + sf_c + s_str); + test("C-1000000", "" + sf_c + s_iM); + test("C1000000", "" + sf_c + sf_I); + test("Cnull", "" + sf_c + f_oNtS); + test("Cfalse", "" + sf_c + f_bl); + test("Cnull", "" + sf_c + sf_iAN); + test("C-2000000", "" + sf_c + sf_iM); + test("C-820130816", "" + sf_c + f_lM); + test("Cnull", "" + sf_c + sf_oAN); + test("C25000000", "" + sf_c + s_I); + test("75-96.0", "" + sf_str + s_dM); + test("75null", "" + sf_str + s_oNtS); + test("75\u045176", "" + sf_str + f_strU); + test("7592", "" + sf_str + sf_strU2); + test("7551", "" + sf_str + sf_strU1); + test("75null", "" + sf_str + s_iAN); + test("75-54", "" + sf_str + f_bM); + test("75-87.0", "" + sf_str + f_fM); + test("75null", "" + sf_str + s_oAN); + test("7519", "" + sf_str + f_str); + test("75-41", "" + sf_str + sf_bM); + test("75null", "" + sf_str + sf_IN); + test("75T", "" + sf_str + s_c); + test("75-42.0", "" + sf_str + sf_fM); + test("7525", "" + sf_str + s_b); + test("75null", "" + sf_str + f_oN); + test("75-1410065408", "" + sf_str + s_lM); + test("758.0", "" + sf_str + s_d); + test("7555.0", "" + sf_str + s_f); + test("7597000000", "" + sf_str + s_i); + test("75-9900", "" + sf_str + f_sM); + test("75935228928", "" + sf_str + s_l); + test("75-8400", "" + sf_str + sf_sM); + test("75C(82)", "" + sf_str + s_o); + test("75null", "" + sf_str + sf_oNtS); + test("75true", "" + sf_str + s_bl); + test("753900", "" + sf_str + s_s); + test("75null", "" + sf_str + sf_oN); + test("7594000000", "" + sf_str + f_I); + test("75null", "" + sf_str + f_IN); + test("75true", "" + sf_str + sf_bl); + test("755500", "" + sf_str + sf_s); + test("75-2900", "" + sf_str + s_sM); + test("75-194313216", "" + sf_str + sf_l); + test("7512", "" + sf_str + s_strU1); + test("75C(87)", "" + sf_str + sf_o); + test("7591", "" + sf_str + s_strU2); + test("7521", "" + sf_str + f_strU1); + test("7518", "" + sf_str + f_strU2); + test("75null", "" + sf_str + f_iAN); + test("75null", "" + sf_str + s_oN); + test("75\u045180", "" + sf_str + s_strU); + test("75C", "" + sf_str + sf_c); + test("7575", "" + sf_str + sf_str); + test("75-43", "" + sf_str + s_bM); + test("7580", "" + sf_str + sf_b); + test("75null", "" + sf_str + s_IN); + test("75-52.0", "" + sf_str + s_fM); + test("7575000000", "" + sf_str + sf_i); + test("7544", "" + sf_str + f_b); + test("75-1705032704", "" + sf_str + sf_lM); + test("75null", "" + sf_str + f_oAN); + test("7583.0", "" + sf_str + f_d); + test("75I", "" + sf_str + f_c); + test("7594.0", "" + sf_str + f_f); + test("7512.0", "" + sf_str + sf_d); + test("75-99.0", "" + sf_str + f_dM); + test("7517.0", "" + sf_str + sf_f); + test("75-84.0", "" + sf_str + sf_dM); + test("7558000000", "" + sf_str + f_i); + test("75-55000000", "" + sf_str + f_iM); + test("751460392448", "" + sf_str + f_l); + test("75C(70)", "" + sf_str + f_o); + test("75\u04511", "" + sf_str + sf_strU); + test("758000", "" + sf_str + f_s); + test("7518", "" + sf_str + s_str); + test("75-1000000", "" + sf_str + s_iM); + test("751000000", "" + sf_str + sf_I); + test("75null", "" + sf_str + f_oNtS); + test("75false", "" + sf_str + f_bl); + test("75null", "" + sf_str + sf_iAN); + test("75-2000000", "" + sf_str + sf_iM); + test("75-820130816", "" + sf_str + f_lM); + test("75null", "" + sf_str + sf_oAN); + test("7525000000", "" + sf_str + s_I); + test("-43-96.0", "" + s_bM + s_dM); + test("-43null", "" + s_bM + s_oNtS); + test("-43\u045176", "" + s_bM + f_strU); + test("-4392", "" + s_bM + sf_strU2); + test("-4351", "" + s_bM + sf_strU1); + test("-43null", "" + s_bM + s_iAN); + test("-43-54", "" + s_bM + f_bM); + test("-43-87.0", "" + s_bM + f_fM); + test("-43null", "" + s_bM + s_oAN); + test("-4319", "" + s_bM + f_str); + test("-43-41", "" + s_bM + sf_bM); + test("-43null", "" + s_bM + sf_IN); + test("-43T", "" + s_bM + s_c); + test("-43-42.0", "" + s_bM + sf_fM); + test("-4325", "" + s_bM + s_b); + test("-43null", "" + s_bM + f_oN); + test("-43-1410065408", "" + s_bM + s_lM); + test("-438.0", "" + s_bM + s_d); + test("-4355.0", "" + s_bM + s_f); + test("-4397000000", "" + s_bM + s_i); + test("-43-9900", "" + s_bM + f_sM); + test("-43935228928", "" + s_bM + s_l); + test("-43-8400", "" + s_bM + sf_sM); + test("-43C(82)", "" + s_bM + s_o); + test("-43null", "" + s_bM + sf_oNtS); + test("-43true", "" + s_bM + s_bl); + test("-433900", "" + s_bM + s_s); + test("-43null", "" + s_bM + sf_oN); + test("-4394000000", "" + s_bM + f_I); + test("-43null", "" + s_bM + f_IN); + test("-43true", "" + s_bM + sf_bl); + test("-435500", "" + s_bM + sf_s); + test("-43-2900", "" + s_bM + s_sM); + test("-43-194313216", "" + s_bM + sf_l); + test("-4312", "" + s_bM + s_strU1); + test("-43C(87)", "" + s_bM + sf_o); + test("-4391", "" + s_bM + s_strU2); + test("-4321", "" + s_bM + f_strU1); + test("-4318", "" + s_bM + f_strU2); + test("-43null", "" + s_bM + f_iAN); + test("-43null", "" + s_bM + s_oN); + test("-43\u045180", "" + s_bM + s_strU); + test("-43C", "" + s_bM + sf_c); + test("-4375", "" + s_bM + sf_str); + test("-43-43", "" + s_bM + s_bM); + test("-4380", "" + s_bM + sf_b); + test("-43null", "" + s_bM + s_IN); + test("-43-52.0", "" + s_bM + s_fM); + test("-4375000000", "" + s_bM + sf_i); + test("-4344", "" + s_bM + f_b); + test("-43-1705032704", "" + s_bM + sf_lM); + test("-43null", "" + s_bM + f_oAN); + test("-4383.0", "" + s_bM + f_d); + test("-43I", "" + s_bM + f_c); + test("-4394.0", "" + s_bM + f_f); + test("-4312.0", "" + s_bM + sf_d); + test("-43-99.0", "" + s_bM + f_dM); + test("-4317.0", "" + s_bM + sf_f); + test("-43-84.0", "" + s_bM + sf_dM); + test("-4358000000", "" + s_bM + f_i); + test("-43-55000000", "" + s_bM + f_iM); + test("-431460392448", "" + s_bM + f_l); + test("-43C(70)", "" + s_bM + f_o); + test("-43\u04511", "" + s_bM + sf_strU); + test("-438000", "" + s_bM + f_s); + test("-4318", "" + s_bM + s_str); + test("-43-1000000", "" + s_bM + s_iM); + test("-431000000", "" + s_bM + sf_I); + test("-43null", "" + s_bM + f_oNtS); + test("-43false", "" + s_bM + f_bl); + test("-43null", "" + s_bM + sf_iAN); + test("-43-2000000", "" + s_bM + sf_iM); + test("-43-820130816", "" + s_bM + f_lM); + test("-43null", "" + s_bM + sf_oAN); + test("-4325000000", "" + s_bM + s_I); + test("80-96.0", "" + sf_b + s_dM); + test("80null", "" + sf_b + s_oNtS); + test("80\u045176", "" + sf_b + f_strU); + test("8092", "" + sf_b + sf_strU2); + test("8051", "" + sf_b + sf_strU1); + test("80null", "" + sf_b + s_iAN); + test("80-54", "" + sf_b + f_bM); + test("80-87.0", "" + sf_b + f_fM); + test("80null", "" + sf_b + s_oAN); + test("8019", "" + sf_b + f_str); + test("80-41", "" + sf_b + sf_bM); + test("80null", "" + sf_b + sf_IN); + test("80T", "" + sf_b + s_c); + test("80-42.0", "" + sf_b + sf_fM); + test("8025", "" + sf_b + s_b); + test("80null", "" + sf_b + f_oN); + test("80-1410065408", "" + sf_b + s_lM); + test("808.0", "" + sf_b + s_d); + test("8055.0", "" + sf_b + s_f); + test("8097000000", "" + sf_b + s_i); + test("80-9900", "" + sf_b + f_sM); + test("80935228928", "" + sf_b + s_l); + test("80-8400", "" + sf_b + sf_sM); + test("80C(82)", "" + sf_b + s_o); + test("80null", "" + sf_b + sf_oNtS); + test("80true", "" + sf_b + s_bl); + test("803900", "" + sf_b + s_s); + test("80null", "" + sf_b + sf_oN); + test("8094000000", "" + sf_b + f_I); + test("80null", "" + sf_b + f_IN); + test("80true", "" + sf_b + sf_bl); + test("805500", "" + sf_b + sf_s); + test("80-2900", "" + sf_b + s_sM); + test("80-194313216", "" + sf_b + sf_l); + test("8012", "" + sf_b + s_strU1); + test("80C(87)", "" + sf_b + sf_o); + test("8091", "" + sf_b + s_strU2); + test("8021", "" + sf_b + f_strU1); + test("8018", "" + sf_b + f_strU2); + test("80null", "" + sf_b + f_iAN); + test("80null", "" + sf_b + s_oN); + test("80\u045180", "" + sf_b + s_strU); + test("80C", "" + sf_b + sf_c); + test("8075", "" + sf_b + sf_str); + test("80-43", "" + sf_b + s_bM); + test("8080", "" + sf_b + sf_b); + test("80null", "" + sf_b + s_IN); + test("80-52.0", "" + sf_b + s_fM); + test("8075000000", "" + sf_b + sf_i); + test("8044", "" + sf_b + f_b); + test("80-1705032704", "" + sf_b + sf_lM); + test("80null", "" + sf_b + f_oAN); + test("8083.0", "" + sf_b + f_d); + test("80I", "" + sf_b + f_c); + test("8094.0", "" + sf_b + f_f); + test("8012.0", "" + sf_b + sf_d); + test("80-99.0", "" + sf_b + f_dM); + test("8017.0", "" + sf_b + sf_f); + test("80-84.0", "" + sf_b + sf_dM); + test("8058000000", "" + sf_b + f_i); + test("80-55000000", "" + sf_b + f_iM); + test("801460392448", "" + sf_b + f_l); + test("80C(70)", "" + sf_b + f_o); + test("80\u04511", "" + sf_b + sf_strU); + test("808000", "" + sf_b + f_s); + test("8018", "" + sf_b + s_str); + test("80-1000000", "" + sf_b + s_iM); + test("801000000", "" + sf_b + sf_I); + test("80null", "" + sf_b + f_oNtS); + test("80false", "" + sf_b + f_bl); + test("80null", "" + sf_b + sf_iAN); + test("80-2000000", "" + sf_b + sf_iM); + test("80-820130816", "" + sf_b + f_lM); + test("80null", "" + sf_b + sf_oAN); + test("8025000000", "" + sf_b + s_I); + test("null-96.0", "" + s_IN + s_dM); + test("nullnull", "" + s_IN + s_oNtS); + test("null\u045176", "" + s_IN + f_strU); + test("null92", "" + s_IN + sf_strU2); + test("null51", "" + s_IN + sf_strU1); + test("nullnull", "" + s_IN + s_iAN); + test("null-54", "" + s_IN + f_bM); + test("null-87.0", "" + s_IN + f_fM); + test("nullnull", "" + s_IN + s_oAN); + test("null19", "" + s_IN + f_str); + test("null-41", "" + s_IN + sf_bM); + test("nullnull", "" + s_IN + sf_IN); + test("nullT", "" + s_IN + s_c); + test("null-42.0", "" + s_IN + sf_fM); + test("null25", "" + s_IN + s_b); + test("nullnull", "" + s_IN + f_oN); + test("null-1410065408", "" + s_IN + s_lM); + test("null8.0", "" + s_IN + s_d); + test("null55.0", "" + s_IN + s_f); + test("null97000000", "" + s_IN + s_i); + test("null-9900", "" + s_IN + f_sM); + test("null935228928", "" + s_IN + s_l); + test("null-8400", "" + s_IN + sf_sM); + test("nullC(82)", "" + s_IN + s_o); + test("nullnull", "" + s_IN + sf_oNtS); + test("nulltrue", "" + s_IN + s_bl); + test("null3900", "" + s_IN + s_s); + test("nullnull", "" + s_IN + sf_oN); + test("null94000000", "" + s_IN + f_I); + test("nullnull", "" + s_IN + f_IN); + test("nulltrue", "" + s_IN + sf_bl); + test("null5500", "" + s_IN + sf_s); + test("null-2900", "" + s_IN + s_sM); + test("null-194313216", "" + s_IN + sf_l); + test("null12", "" + s_IN + s_strU1); + test("nullC(87)", "" + s_IN + sf_o); + test("null91", "" + s_IN + s_strU2); + test("null21", "" + s_IN + f_strU1); + test("null18", "" + s_IN + f_strU2); + test("nullnull", "" + s_IN + f_iAN); + test("nullnull", "" + s_IN + s_oN); + test("null\u045180", "" + s_IN + s_strU); + test("nullC", "" + s_IN + sf_c); + test("null75", "" + s_IN + sf_str); + test("null-43", "" + s_IN + s_bM); + test("null80", "" + s_IN + sf_b); + test("nullnull", "" + s_IN + s_IN); + test("null-52.0", "" + s_IN + s_fM); + test("null75000000", "" + s_IN + sf_i); + test("null44", "" + s_IN + f_b); + test("null-1705032704", "" + s_IN + sf_lM); + test("nullnull", "" + s_IN + f_oAN); + test("null83.0", "" + s_IN + f_d); + test("nullI", "" + s_IN + f_c); + test("null94.0", "" + s_IN + f_f); + test("null12.0", "" + s_IN + sf_d); + test("null-99.0", "" + s_IN + f_dM); + test("null17.0", "" + s_IN + sf_f); + test("null-84.0", "" + s_IN + sf_dM); + test("null58000000", "" + s_IN + f_i); + test("null-55000000", "" + s_IN + f_iM); + test("null1460392448", "" + s_IN + f_l); + test("nullC(70)", "" + s_IN + f_o); + test("null\u04511", "" + s_IN + sf_strU); + test("null8000", "" + s_IN + f_s); + test("null18", "" + s_IN + s_str); + test("null-1000000", "" + s_IN + s_iM); + test("null1000000", "" + s_IN + sf_I); + test("nullnull", "" + s_IN + f_oNtS); + test("nullfalse", "" + s_IN + f_bl); + test("nullnull", "" + s_IN + sf_iAN); + test("null-2000000", "" + s_IN + sf_iM); + test("null-820130816", "" + s_IN + f_lM); + test("nullnull", "" + s_IN + sf_oAN); + test("null25000000", "" + s_IN + s_I); + test("-52.0-96.0", "" + s_fM + s_dM); + test("-52.0null", "" + s_fM + s_oNtS); + test("-52.0\u045176", "" + s_fM + f_strU); + test("-52.092", "" + s_fM + sf_strU2); + test("-52.051", "" + s_fM + sf_strU1); + test("-52.0null", "" + s_fM + s_iAN); + test("-52.0-54", "" + s_fM + f_bM); + test("-52.0-87.0", "" + s_fM + f_fM); + test("-52.0null", "" + s_fM + s_oAN); + test("-52.019", "" + s_fM + f_str); + test("-52.0-41", "" + s_fM + sf_bM); + test("-52.0null", "" + s_fM + sf_IN); + test("-52.0T", "" + s_fM + s_c); + test("-52.0-42.0", "" + s_fM + sf_fM); + test("-52.025", "" + s_fM + s_b); + test("-52.0null", "" + s_fM + f_oN); + test("-52.0-1410065408", "" + s_fM + s_lM); + test("-52.08.0", "" + s_fM + s_d); + test("-52.055.0", "" + s_fM + s_f); + test("-52.097000000", "" + s_fM + s_i); + test("-52.0-9900", "" + s_fM + f_sM); + test("-52.0935228928", "" + s_fM + s_l); + test("-52.0-8400", "" + s_fM + sf_sM); + test("-52.0C(82)", "" + s_fM + s_o); + test("-52.0null", "" + s_fM + sf_oNtS); + test("-52.0true", "" + s_fM + s_bl); + test("-52.03900", "" + s_fM + s_s); + test("-52.0null", "" + s_fM + sf_oN); + test("-52.094000000", "" + s_fM + f_I); + test("-52.0null", "" + s_fM + f_IN); + test("-52.0true", "" + s_fM + sf_bl); + test("-52.05500", "" + s_fM + sf_s); + test("-52.0-2900", "" + s_fM + s_sM); + test("-52.0-194313216", "" + s_fM + sf_l); + test("-52.012", "" + s_fM + s_strU1); + test("-52.0C(87)", "" + s_fM + sf_o); + test("-52.091", "" + s_fM + s_strU2); + test("-52.021", "" + s_fM + f_strU1); + test("-52.018", "" + s_fM + f_strU2); + test("-52.0null", "" + s_fM + f_iAN); + test("-52.0null", "" + s_fM + s_oN); + test("-52.0\u045180", "" + s_fM + s_strU); + test("-52.0C", "" + s_fM + sf_c); + test("-52.075", "" + s_fM + sf_str); + test("-52.0-43", "" + s_fM + s_bM); + test("-52.080", "" + s_fM + sf_b); + test("-52.0null", "" + s_fM + s_IN); + test("-52.0-52.0", "" + s_fM + s_fM); + test("-52.075000000", "" + s_fM + sf_i); + test("-52.044", "" + s_fM + f_b); + test("-52.0-1705032704", "" + s_fM + sf_lM); + test("-52.0null", "" + s_fM + f_oAN); + test("-52.083.0", "" + s_fM + f_d); + test("-52.0I", "" + s_fM + f_c); + test("-52.094.0", "" + s_fM + f_f); + test("-52.012.0", "" + s_fM + sf_d); + test("-52.0-99.0", "" + s_fM + f_dM); + test("-52.017.0", "" + s_fM + sf_f); + test("-52.0-84.0", "" + s_fM + sf_dM); + test("-52.058000000", "" + s_fM + f_i); + test("-52.0-55000000", "" + s_fM + f_iM); + test("-52.01460392448", "" + s_fM + f_l); + test("-52.0C(70)", "" + s_fM + f_o); + test("-52.0\u04511", "" + s_fM + sf_strU); + test("-52.08000", "" + s_fM + f_s); + test("-52.018", "" + s_fM + s_str); + test("-52.0-1000000", "" + s_fM + s_iM); + test("-52.01000000", "" + s_fM + sf_I); + test("-52.0null", "" + s_fM + f_oNtS); + test("-52.0false", "" + s_fM + f_bl); + test("-52.0null", "" + s_fM + sf_iAN); + test("-52.0-2000000", "" + s_fM + sf_iM); + test("-52.0-820130816", "" + s_fM + f_lM); + test("-52.0null", "" + s_fM + sf_oAN); + test("-52.025000000", "" + s_fM + s_I); + test("75000000-96.0", "" + sf_i + s_dM); + test("75000000null", "" + sf_i + s_oNtS); + test("75000000\u045176", "" + sf_i + f_strU); + test("7500000092", "" + sf_i + sf_strU2); + test("7500000051", "" + sf_i + sf_strU1); + test("75000000null", "" + sf_i + s_iAN); + test("75000000-54", "" + sf_i + f_bM); + test("75000000-87.0", "" + sf_i + f_fM); + test("75000000null", "" + sf_i + s_oAN); + test("7500000019", "" + sf_i + f_str); + test("75000000-41", "" + sf_i + sf_bM); + test("75000000null", "" + sf_i + sf_IN); + test("75000000T", "" + sf_i + s_c); + test("75000000-42.0", "" + sf_i + sf_fM); + test("7500000025", "" + sf_i + s_b); + test("75000000null", "" + sf_i + f_oN); + test("75000000-1410065408", "" + sf_i + s_lM); + test("750000008.0", "" + sf_i + s_d); + test("7500000055.0", "" + sf_i + s_f); + test("7500000097000000", "" + sf_i + s_i); + test("75000000-9900", "" + sf_i + f_sM); + test("75000000935228928", "" + sf_i + s_l); + test("75000000-8400", "" + sf_i + sf_sM); + test("75000000C(82)", "" + sf_i + s_o); + test("75000000null", "" + sf_i + sf_oNtS); + test("75000000true", "" + sf_i + s_bl); + test("750000003900", "" + sf_i + s_s); + test("75000000null", "" + sf_i + sf_oN); + test("7500000094000000", "" + sf_i + f_I); + test("75000000null", "" + sf_i + f_IN); + test("75000000true", "" + sf_i + sf_bl); + test("750000005500", "" + sf_i + sf_s); + test("75000000-2900", "" + sf_i + s_sM); + test("75000000-194313216", "" + sf_i + sf_l); + test("7500000012", "" + sf_i + s_strU1); + test("75000000C(87)", "" + sf_i + sf_o); + test("7500000091", "" + sf_i + s_strU2); + test("7500000021", "" + sf_i + f_strU1); + test("7500000018", "" + sf_i + f_strU2); + test("75000000null", "" + sf_i + f_iAN); + test("75000000null", "" + sf_i + s_oN); + test("75000000\u045180", "" + sf_i + s_strU); + test("75000000C", "" + sf_i + sf_c); + test("7500000075", "" + sf_i + sf_str); + test("75000000-43", "" + sf_i + s_bM); + test("7500000080", "" + sf_i + sf_b); + test("75000000null", "" + sf_i + s_IN); + test("75000000-52.0", "" + sf_i + s_fM); + test("7500000075000000", "" + sf_i + sf_i); + test("7500000044", "" + sf_i + f_b); + test("75000000-1705032704", "" + sf_i + sf_lM); + test("75000000null", "" + sf_i + f_oAN); + test("7500000083.0", "" + sf_i + f_d); + test("75000000I", "" + sf_i + f_c); + test("7500000094.0", "" + sf_i + f_f); + test("7500000012.0", "" + sf_i + sf_d); + test("75000000-99.0", "" + sf_i + f_dM); + test("7500000017.0", "" + sf_i + sf_f); + test("75000000-84.0", "" + sf_i + sf_dM); + test("7500000058000000", "" + sf_i + f_i); + test("75000000-55000000", "" + sf_i + f_iM); + test("750000001460392448", "" + sf_i + f_l); + test("75000000C(70)", "" + sf_i + f_o); + test("75000000\u04511", "" + sf_i + sf_strU); + test("750000008000", "" + sf_i + f_s); + test("7500000018", "" + sf_i + s_str); + test("75000000-1000000", "" + sf_i + s_iM); + test("750000001000000", "" + sf_i + sf_I); + test("75000000null", "" + sf_i + f_oNtS); + test("75000000false", "" + sf_i + f_bl); + test("75000000null", "" + sf_i + sf_iAN); + test("75000000-2000000", "" + sf_i + sf_iM); + test("75000000-820130816", "" + sf_i + f_lM); + test("75000000null", "" + sf_i + sf_oAN); + test("7500000025000000", "" + sf_i + s_I); + test("44-96.0", "" + f_b + s_dM); + test("44null", "" + f_b + s_oNtS); + test("44\u045176", "" + f_b + f_strU); + test("4492", "" + f_b + sf_strU2); + test("4451", "" + f_b + sf_strU1); + test("44null", "" + f_b + s_iAN); + test("44-54", "" + f_b + f_bM); + test("44-87.0", "" + f_b + f_fM); + test("44null", "" + f_b + s_oAN); + test("4419", "" + f_b + f_str); + test("44-41", "" + f_b + sf_bM); + test("44null", "" + f_b + sf_IN); + test("44T", "" + f_b + s_c); + test("44-42.0", "" + f_b + sf_fM); + test("4425", "" + f_b + s_b); + test("44null", "" + f_b + f_oN); + test("44-1410065408", "" + f_b + s_lM); + test("448.0", "" + f_b + s_d); + test("4455.0", "" + f_b + s_f); + test("4497000000", "" + f_b + s_i); + test("44-9900", "" + f_b + f_sM); + test("44935228928", "" + f_b + s_l); + test("44-8400", "" + f_b + sf_sM); + test("44C(82)", "" + f_b + s_o); + test("44null", "" + f_b + sf_oNtS); + test("44true", "" + f_b + s_bl); + test("443900", "" + f_b + s_s); + test("44null", "" + f_b + sf_oN); + test("4494000000", "" + f_b + f_I); + test("44null", "" + f_b + f_IN); + test("44true", "" + f_b + sf_bl); + test("445500", "" + f_b + sf_s); + test("44-2900", "" + f_b + s_sM); + test("44-194313216", "" + f_b + sf_l); + test("4412", "" + f_b + s_strU1); + test("44C(87)", "" + f_b + sf_o); + test("4491", "" + f_b + s_strU2); + test("4421", "" + f_b + f_strU1); + test("4418", "" + f_b + f_strU2); + test("44null", "" + f_b + f_iAN); + test("44null", "" + f_b + s_oN); + test("44\u045180", "" + f_b + s_strU); + test("44C", "" + f_b + sf_c); + test("4475", "" + f_b + sf_str); + test("44-43", "" + f_b + s_bM); + test("4480", "" + f_b + sf_b); + test("44null", "" + f_b + s_IN); + test("44-52.0", "" + f_b + s_fM); + test("4475000000", "" + f_b + sf_i); + test("4444", "" + f_b + f_b); + test("44-1705032704", "" + f_b + sf_lM); + test("44null", "" + f_b + f_oAN); + test("4483.0", "" + f_b + f_d); + test("44I", "" + f_b + f_c); + test("4494.0", "" + f_b + f_f); + test("4412.0", "" + f_b + sf_d); + test("44-99.0", "" + f_b + f_dM); + test("4417.0", "" + f_b + sf_f); + test("44-84.0", "" + f_b + sf_dM); + test("4458000000", "" + f_b + f_i); + test("44-55000000", "" + f_b + f_iM); + test("441460392448", "" + f_b + f_l); + test("44C(70)", "" + f_b + f_o); + test("44\u04511", "" + f_b + sf_strU); + test("448000", "" + f_b + f_s); + test("4418", "" + f_b + s_str); + test("44-1000000", "" + f_b + s_iM); + test("441000000", "" + f_b + sf_I); + test("44null", "" + f_b + f_oNtS); + test("44false", "" + f_b + f_bl); + test("44null", "" + f_b + sf_iAN); + test("44-2000000", "" + f_b + sf_iM); + test("44-820130816", "" + f_b + f_lM); + test("44null", "" + f_b + sf_oAN); + test("4425000000", "" + f_b + s_I); + test("-1705032704-96.0", "" + sf_lM + s_dM); + test("-1705032704null", "" + sf_lM + s_oNtS); + test("-1705032704\u045176", "" + sf_lM + f_strU); + test("-170503270492", "" + sf_lM + sf_strU2); + test("-170503270451", "" + sf_lM + sf_strU1); + test("-1705032704null", "" + sf_lM + s_iAN); + test("-1705032704-54", "" + sf_lM + f_bM); + test("-1705032704-87.0", "" + sf_lM + f_fM); + test("-1705032704null", "" + sf_lM + s_oAN); + test("-170503270419", "" + sf_lM + f_str); + test("-1705032704-41", "" + sf_lM + sf_bM); + test("-1705032704null", "" + sf_lM + sf_IN); + test("-1705032704T", "" + sf_lM + s_c); + test("-1705032704-42.0", "" + sf_lM + sf_fM); + test("-170503270425", "" + sf_lM + s_b); + test("-1705032704null", "" + sf_lM + f_oN); + test("-1705032704-1410065408", "" + sf_lM + s_lM); + test("-17050327048.0", "" + sf_lM + s_d); + test("-170503270455.0", "" + sf_lM + s_f); + test("-170503270497000000", "" + sf_lM + s_i); + test("-1705032704-9900", "" + sf_lM + f_sM); + test("-1705032704935228928", "" + sf_lM + s_l); + test("-1705032704-8400", "" + sf_lM + sf_sM); + test("-1705032704C(82)", "" + sf_lM + s_o); + test("-1705032704null", "" + sf_lM + sf_oNtS); + test("-1705032704true", "" + sf_lM + s_bl); + test("-17050327043900", "" + sf_lM + s_s); + test("-1705032704null", "" + sf_lM + sf_oN); + test("-170503270494000000", "" + sf_lM + f_I); + test("-1705032704null", "" + sf_lM + f_IN); + test("-1705032704true", "" + sf_lM + sf_bl); + test("-17050327045500", "" + sf_lM + sf_s); + test("-1705032704-2900", "" + sf_lM + s_sM); + test("-1705032704-194313216", "" + sf_lM + sf_l); + test("-170503270412", "" + sf_lM + s_strU1); + test("-1705032704C(87)", "" + sf_lM + sf_o); + test("-170503270491", "" + sf_lM + s_strU2); + test("-170503270421", "" + sf_lM + f_strU1); + test("-170503270418", "" + sf_lM + f_strU2); + test("-1705032704null", "" + sf_lM + f_iAN); + test("-1705032704null", "" + sf_lM + s_oN); + test("-1705032704\u045180", "" + sf_lM + s_strU); + test("-1705032704C", "" + sf_lM + sf_c); + test("-170503270475", "" + sf_lM + sf_str); + test("-1705032704-43", "" + sf_lM + s_bM); + test("-170503270480", "" + sf_lM + sf_b); + test("-1705032704null", "" + sf_lM + s_IN); + test("-1705032704-52.0", "" + sf_lM + s_fM); + test("-170503270475000000", "" + sf_lM + sf_i); + test("-170503270444", "" + sf_lM + f_b); + test("-1705032704-1705032704", "" + sf_lM + sf_lM); + test("-1705032704null", "" + sf_lM + f_oAN); + test("-170503270483.0", "" + sf_lM + f_d); + test("-1705032704I", "" + sf_lM + f_c); + test("-170503270494.0", "" + sf_lM + f_f); + test("-170503270412.0", "" + sf_lM + sf_d); + test("-1705032704-99.0", "" + sf_lM + f_dM); + test("-170503270417.0", "" + sf_lM + sf_f); + test("-1705032704-84.0", "" + sf_lM + sf_dM); + test("-170503270458000000", "" + sf_lM + f_i); + test("-1705032704-55000000", "" + sf_lM + f_iM); + test("-17050327041460392448", "" + sf_lM + f_l); + test("-1705032704C(70)", "" + sf_lM + f_o); + test("-1705032704\u04511", "" + sf_lM + sf_strU); + test("-17050327048000", "" + sf_lM + f_s); + test("-170503270418", "" + sf_lM + s_str); + test("-1705032704-1000000", "" + sf_lM + s_iM); + test("-17050327041000000", "" + sf_lM + sf_I); + test("-1705032704null", "" + sf_lM + f_oNtS); + test("-1705032704false", "" + sf_lM + f_bl); + test("-1705032704null", "" + sf_lM + sf_iAN); + test("-1705032704-2000000", "" + sf_lM + sf_iM); + test("-1705032704-820130816", "" + sf_lM + f_lM); + test("-1705032704null", "" + sf_lM + sf_oAN); + test("-170503270425000000", "" + sf_lM + s_I); + test("null-96.0", "" + f_oAN + s_dM); + test("nullnull", "" + f_oAN + s_oNtS); + test("null\u045176", "" + f_oAN + f_strU); + test("null92", "" + f_oAN + sf_strU2); + test("null51", "" + f_oAN + sf_strU1); + test("nullnull", "" + f_oAN + s_iAN); + test("null-54", "" + f_oAN + f_bM); + test("null-87.0", "" + f_oAN + f_fM); + test("nullnull", "" + f_oAN + s_oAN); + test("null19", "" + f_oAN + f_str); + test("null-41", "" + f_oAN + sf_bM); + test("nullnull", "" + f_oAN + sf_IN); + test("nullT", "" + f_oAN + s_c); + test("null-42.0", "" + f_oAN + sf_fM); + test("null25", "" + f_oAN + s_b); + test("nullnull", "" + f_oAN + f_oN); + test("null-1410065408", "" + f_oAN + s_lM); + test("null8.0", "" + f_oAN + s_d); + test("null55.0", "" + f_oAN + s_f); + test("null97000000", "" + f_oAN + s_i); + test("null-9900", "" + f_oAN + f_sM); + test("null935228928", "" + f_oAN + s_l); + test("null-8400", "" + f_oAN + sf_sM); + test("nullC(82)", "" + f_oAN + s_o); + test("nullnull", "" + f_oAN + sf_oNtS); + test("nulltrue", "" + f_oAN + s_bl); + test("null3900", "" + f_oAN + s_s); + test("nullnull", "" + f_oAN + sf_oN); + test("null94000000", "" + f_oAN + f_I); + test("nullnull", "" + f_oAN + f_IN); + test("nulltrue", "" + f_oAN + sf_bl); + test("null5500", "" + f_oAN + sf_s); + test("null-2900", "" + f_oAN + s_sM); + test("null-194313216", "" + f_oAN + sf_l); + test("null12", "" + f_oAN + s_strU1); + test("nullC(87)", "" + f_oAN + sf_o); + test("null91", "" + f_oAN + s_strU2); + test("null21", "" + f_oAN + f_strU1); + test("null18", "" + f_oAN + f_strU2); + test("nullnull", "" + f_oAN + f_iAN); + test("nullnull", "" + f_oAN + s_oN); + test("null\u045180", "" + f_oAN + s_strU); + test("nullC", "" + f_oAN + sf_c); + test("null75", "" + f_oAN + sf_str); + test("null-43", "" + f_oAN + s_bM); + test("null80", "" + f_oAN + sf_b); + test("nullnull", "" + f_oAN + s_IN); + test("null-52.0", "" + f_oAN + s_fM); + test("null75000000", "" + f_oAN + sf_i); + test("null44", "" + f_oAN + f_b); + test("null-1705032704", "" + f_oAN + sf_lM); + test("nullnull", "" + f_oAN + f_oAN); + test("null83.0", "" + f_oAN + f_d); + test("nullI", "" + f_oAN + f_c); + test("null94.0", "" + f_oAN + f_f); + test("null12.0", "" + f_oAN + sf_d); + test("null-99.0", "" + f_oAN + f_dM); + test("null17.0", "" + f_oAN + sf_f); + test("null-84.0", "" + f_oAN + sf_dM); + test("null58000000", "" + f_oAN + f_i); + test("null-55000000", "" + f_oAN + f_iM); + test("null1460392448", "" + f_oAN + f_l); + test("nullC(70)", "" + f_oAN + f_o); + test("null\u04511", "" + f_oAN + sf_strU); + test("null8000", "" + f_oAN + f_s); + test("null18", "" + f_oAN + s_str); + test("null-1000000", "" + f_oAN + s_iM); + test("null1000000", "" + f_oAN + sf_I); + test("nullnull", "" + f_oAN + f_oNtS); + test("nullfalse", "" + f_oAN + f_bl); + test("nullnull", "" + f_oAN + sf_iAN); + test("null-2000000", "" + f_oAN + sf_iM); + test("null-820130816", "" + f_oAN + f_lM); + test("nullnull", "" + f_oAN + sf_oAN); + test("null25000000", "" + f_oAN + s_I); + test("83.0-96.0", "" + f_d + s_dM); + test("83.0null", "" + f_d + s_oNtS); + test("83.0\u045176", "" + f_d + f_strU); + test("83.092", "" + f_d + sf_strU2); + test("83.051", "" + f_d + sf_strU1); + test("83.0null", "" + f_d + s_iAN); + test("83.0-54", "" + f_d + f_bM); + test("83.0-87.0", "" + f_d + f_fM); + test("83.0null", "" + f_d + s_oAN); + test("83.019", "" + f_d + f_str); + test("83.0-41", "" + f_d + sf_bM); + test("83.0null", "" + f_d + sf_IN); + test("83.0T", "" + f_d + s_c); + test("83.0-42.0", "" + f_d + sf_fM); + test("83.025", "" + f_d + s_b); + test("83.0null", "" + f_d + f_oN); + test("83.0-1410065408", "" + f_d + s_lM); + test("83.08.0", "" + f_d + s_d); + test("83.055.0", "" + f_d + s_f); + test("83.097000000", "" + f_d + s_i); + test("83.0-9900", "" + f_d + f_sM); + test("83.0935228928", "" + f_d + s_l); + test("83.0-8400", "" + f_d + sf_sM); + test("83.0C(82)", "" + f_d + s_o); + test("83.0null", "" + f_d + sf_oNtS); + } + + public void run4() { + test("83.0true", "" + f_d + s_bl); + test("83.03900", "" + f_d + s_s); + test("83.0null", "" + f_d + sf_oN); + test("83.094000000", "" + f_d + f_I); + test("83.0null", "" + f_d + f_IN); + test("83.0true", "" + f_d + sf_bl); + test("83.05500", "" + f_d + sf_s); + test("83.0-2900", "" + f_d + s_sM); + test("83.0-194313216", "" + f_d + sf_l); + test("83.012", "" + f_d + s_strU1); + test("83.0C(87)", "" + f_d + sf_o); + test("83.091", "" + f_d + s_strU2); + test("83.021", "" + f_d + f_strU1); + test("83.018", "" + f_d + f_strU2); + test("83.0null", "" + f_d + f_iAN); + test("83.0null", "" + f_d + s_oN); + test("83.0\u045180", "" + f_d + s_strU); + test("83.0C", "" + f_d + sf_c); + test("83.075", "" + f_d + sf_str); + test("83.0-43", "" + f_d + s_bM); + test("83.080", "" + f_d + sf_b); + test("83.0null", "" + f_d + s_IN); + test("83.0-52.0", "" + f_d + s_fM); + test("83.075000000", "" + f_d + sf_i); + test("83.044", "" + f_d + f_b); + test("83.0-1705032704", "" + f_d + sf_lM); + test("83.0null", "" + f_d + f_oAN); + test("83.083.0", "" + f_d + f_d); + test("83.0I", "" + f_d + f_c); + test("83.094.0", "" + f_d + f_f); + test("83.012.0", "" + f_d + sf_d); + test("83.0-99.0", "" + f_d + f_dM); + test("83.017.0", "" + f_d + sf_f); + test("83.0-84.0", "" + f_d + sf_dM); + test("83.058000000", "" + f_d + f_i); + test("83.0-55000000", "" + f_d + f_iM); + test("83.01460392448", "" + f_d + f_l); + test("83.0C(70)", "" + f_d + f_o); + test("83.0\u04511", "" + f_d + sf_strU); + test("83.08000", "" + f_d + f_s); + test("83.018", "" + f_d + s_str); + test("83.0-1000000", "" + f_d + s_iM); + test("83.01000000", "" + f_d + sf_I); + test("83.0null", "" + f_d + f_oNtS); + test("83.0false", "" + f_d + f_bl); + test("83.0null", "" + f_d + sf_iAN); + test("83.0-2000000", "" + f_d + sf_iM); + test("83.0-820130816", "" + f_d + f_lM); + test("83.0null", "" + f_d + sf_oAN); + test("83.025000000", "" + f_d + s_I); + test("I-96.0", "" + f_c + s_dM); + test("Inull", "" + f_c + s_oNtS); + test("I\u045176", "" + f_c + f_strU); + test("I92", "" + f_c + sf_strU2); + test("I51", "" + f_c + sf_strU1); + test("Inull", "" + f_c + s_iAN); + test("I-54", "" + f_c + f_bM); + test("I-87.0", "" + f_c + f_fM); + test("Inull", "" + f_c + s_oAN); + test("I19", "" + f_c + f_str); + test("I-41", "" + f_c + sf_bM); + test("Inull", "" + f_c + sf_IN); + test("IT", "" + f_c + s_c); + test("I-42.0", "" + f_c + sf_fM); + test("I25", "" + f_c + s_b); + test("Inull", "" + f_c + f_oN); + test("I-1410065408", "" + f_c + s_lM); + test("I8.0", "" + f_c + s_d); + test("I55.0", "" + f_c + s_f); + test("I97000000", "" + f_c + s_i); + test("I-9900", "" + f_c + f_sM); + test("I935228928", "" + f_c + s_l); + test("I-8400", "" + f_c + sf_sM); + test("IC(82)", "" + f_c + s_o); + test("Inull", "" + f_c + sf_oNtS); + test("Itrue", "" + f_c + s_bl); + test("I3900", "" + f_c + s_s); + test("Inull", "" + f_c + sf_oN); + test("I94000000", "" + f_c + f_I); + test("Inull", "" + f_c + f_IN); + test("Itrue", "" + f_c + sf_bl); + test("I5500", "" + f_c + sf_s); + test("I-2900", "" + f_c + s_sM); + test("I-194313216", "" + f_c + sf_l); + test("I12", "" + f_c + s_strU1); + test("IC(87)", "" + f_c + sf_o); + test("I91", "" + f_c + s_strU2); + test("I21", "" + f_c + f_strU1); + test("I18", "" + f_c + f_strU2); + test("Inull", "" + f_c + f_iAN); + test("Inull", "" + f_c + s_oN); + test("I\u045180", "" + f_c + s_strU); + test("IC", "" + f_c + sf_c); + test("I75", "" + f_c + sf_str); + test("I-43", "" + f_c + s_bM); + test("I80", "" + f_c + sf_b); + test("Inull", "" + f_c + s_IN); + test("I-52.0", "" + f_c + s_fM); + test("I75000000", "" + f_c + sf_i); + test("I44", "" + f_c + f_b); + test("I-1705032704", "" + f_c + sf_lM); + test("Inull", "" + f_c + f_oAN); + test("I83.0", "" + f_c + f_d); + test("II", "" + f_c + f_c); + test("I94.0", "" + f_c + f_f); + test("I12.0", "" + f_c + sf_d); + test("I-99.0", "" + f_c + f_dM); + test("I17.0", "" + f_c + sf_f); + test("I-84.0", "" + f_c + sf_dM); + test("I58000000", "" + f_c + f_i); + test("I-55000000", "" + f_c + f_iM); + test("I1460392448", "" + f_c + f_l); + test("IC(70)", "" + f_c + f_o); + test("I\u04511", "" + f_c + sf_strU); + test("I8000", "" + f_c + f_s); + test("I18", "" + f_c + s_str); + test("I-1000000", "" + f_c + s_iM); + test("I1000000", "" + f_c + sf_I); + test("Inull", "" + f_c + f_oNtS); + test("Ifalse", "" + f_c + f_bl); + test("Inull", "" + f_c + sf_iAN); + test("I-2000000", "" + f_c + sf_iM); + test("I-820130816", "" + f_c + f_lM); + test("Inull", "" + f_c + sf_oAN); + test("I25000000", "" + f_c + s_I); + test("94.0-96.0", "" + f_f + s_dM); + test("94.0null", "" + f_f + s_oNtS); + test("94.0\u045176", "" + f_f + f_strU); + test("94.092", "" + f_f + sf_strU2); + test("94.051", "" + f_f + sf_strU1); + test("94.0null", "" + f_f + s_iAN); + test("94.0-54", "" + f_f + f_bM); + test("94.0-87.0", "" + f_f + f_fM); + test("94.0null", "" + f_f + s_oAN); + test("94.019", "" + f_f + f_str); + test("94.0-41", "" + f_f + sf_bM); + test("94.0null", "" + f_f + sf_IN); + test("94.0T", "" + f_f + s_c); + test("94.0-42.0", "" + f_f + sf_fM); + test("94.025", "" + f_f + s_b); + test("94.0null", "" + f_f + f_oN); + test("94.0-1410065408", "" + f_f + s_lM); + test("94.08.0", "" + f_f + s_d); + test("94.055.0", "" + f_f + s_f); + test("94.097000000", "" + f_f + s_i); + test("94.0-9900", "" + f_f + f_sM); + test("94.0935228928", "" + f_f + s_l); + test("94.0-8400", "" + f_f + sf_sM); + test("94.0C(82)", "" + f_f + s_o); + test("94.0null", "" + f_f + sf_oNtS); + test("94.0true", "" + f_f + s_bl); + test("94.03900", "" + f_f + s_s); + test("94.0null", "" + f_f + sf_oN); + test("94.094000000", "" + f_f + f_I); + test("94.0null", "" + f_f + f_IN); + test("94.0true", "" + f_f + sf_bl); + test("94.05500", "" + f_f + sf_s); + test("94.0-2900", "" + f_f + s_sM); + test("94.0-194313216", "" + f_f + sf_l); + test("94.012", "" + f_f + s_strU1); + test("94.0C(87)", "" + f_f + sf_o); + test("94.091", "" + f_f + s_strU2); + test("94.021", "" + f_f + f_strU1); + test("94.018", "" + f_f + f_strU2); + test("94.0null", "" + f_f + f_iAN); + test("94.0null", "" + f_f + s_oN); + test("94.0\u045180", "" + f_f + s_strU); + test("94.0C", "" + f_f + sf_c); + test("94.075", "" + f_f + sf_str); + test("94.0-43", "" + f_f + s_bM); + test("94.080", "" + f_f + sf_b); + test("94.0null", "" + f_f + s_IN); + test("94.0-52.0", "" + f_f + s_fM); + test("94.075000000", "" + f_f + sf_i); + test("94.044", "" + f_f + f_b); + test("94.0-1705032704", "" + f_f + sf_lM); + test("94.0null", "" + f_f + f_oAN); + test("94.083.0", "" + f_f + f_d); + test("94.0I", "" + f_f + f_c); + test("94.094.0", "" + f_f + f_f); + test("94.012.0", "" + f_f + sf_d); + test("94.0-99.0", "" + f_f + f_dM); + test("94.017.0", "" + f_f + sf_f); + test("94.0-84.0", "" + f_f + sf_dM); + test("94.058000000", "" + f_f + f_i); + test("94.0-55000000", "" + f_f + f_iM); + test("94.01460392448", "" + f_f + f_l); + test("94.0C(70)", "" + f_f + f_o); + test("94.0\u04511", "" + f_f + sf_strU); + test("94.08000", "" + f_f + f_s); + test("94.018", "" + f_f + s_str); + test("94.0-1000000", "" + f_f + s_iM); + test("94.01000000", "" + f_f + sf_I); + test("94.0null", "" + f_f + f_oNtS); + test("94.0false", "" + f_f + f_bl); + test("94.0null", "" + f_f + sf_iAN); + test("94.0-2000000", "" + f_f + sf_iM); + test("94.0-820130816", "" + f_f + f_lM); + test("94.0null", "" + f_f + sf_oAN); + test("94.025000000", "" + f_f + s_I); + test("12.0-96.0", "" + sf_d + s_dM); + test("12.0null", "" + sf_d + s_oNtS); + test("12.0\u045176", "" + sf_d + f_strU); + test("12.092", "" + sf_d + sf_strU2); + test("12.051", "" + sf_d + sf_strU1); + test("12.0null", "" + sf_d + s_iAN); + test("12.0-54", "" + sf_d + f_bM); + test("12.0-87.0", "" + sf_d + f_fM); + test("12.0null", "" + sf_d + s_oAN); + test("12.019", "" + sf_d + f_str); + test("12.0-41", "" + sf_d + sf_bM); + test("12.0null", "" + sf_d + sf_IN); + test("12.0T", "" + sf_d + s_c); + test("12.0-42.0", "" + sf_d + sf_fM); + test("12.025", "" + sf_d + s_b); + test("12.0null", "" + sf_d + f_oN); + test("12.0-1410065408", "" + sf_d + s_lM); + test("12.08.0", "" + sf_d + s_d); + test("12.055.0", "" + sf_d + s_f); + test("12.097000000", "" + sf_d + s_i); + test("12.0-9900", "" + sf_d + f_sM); + test("12.0935228928", "" + sf_d + s_l); + test("12.0-8400", "" + sf_d + sf_sM); + test("12.0C(82)", "" + sf_d + s_o); + test("12.0null", "" + sf_d + sf_oNtS); + test("12.0true", "" + sf_d + s_bl); + test("12.03900", "" + sf_d + s_s); + test("12.0null", "" + sf_d + sf_oN); + test("12.094000000", "" + sf_d + f_I); + test("12.0null", "" + sf_d + f_IN); + test("12.0true", "" + sf_d + sf_bl); + test("12.05500", "" + sf_d + sf_s); + test("12.0-2900", "" + sf_d + s_sM); + test("12.0-194313216", "" + sf_d + sf_l); + test("12.012", "" + sf_d + s_strU1); + test("12.0C(87)", "" + sf_d + sf_o); + test("12.091", "" + sf_d + s_strU2); + test("12.021", "" + sf_d + f_strU1); + test("12.018", "" + sf_d + f_strU2); + test("12.0null", "" + sf_d + f_iAN); + test("12.0null", "" + sf_d + s_oN); + test("12.0\u045180", "" + sf_d + s_strU); + test("12.0C", "" + sf_d + sf_c); + test("12.075", "" + sf_d + sf_str); + test("12.0-43", "" + sf_d + s_bM); + test("12.080", "" + sf_d + sf_b); + test("12.0null", "" + sf_d + s_IN); + test("12.0-52.0", "" + sf_d + s_fM); + test("12.075000000", "" + sf_d + sf_i); + test("12.044", "" + sf_d + f_b); + test("12.0-1705032704", "" + sf_d + sf_lM); + test("12.0null", "" + sf_d + f_oAN); + test("12.083.0", "" + sf_d + f_d); + test("12.0I", "" + sf_d + f_c); + test("12.094.0", "" + sf_d + f_f); + test("12.012.0", "" + sf_d + sf_d); + test("12.0-99.0", "" + sf_d + f_dM); + test("12.017.0", "" + sf_d + sf_f); + test("12.0-84.0", "" + sf_d + sf_dM); + test("12.058000000", "" + sf_d + f_i); + test("12.0-55000000", "" + sf_d + f_iM); + test("12.01460392448", "" + sf_d + f_l); + test("12.0C(70)", "" + sf_d + f_o); + test("12.0\u04511", "" + sf_d + sf_strU); + test("12.08000", "" + sf_d + f_s); + test("12.018", "" + sf_d + s_str); + test("12.0-1000000", "" + sf_d + s_iM); + test("12.01000000", "" + sf_d + sf_I); + test("12.0null", "" + sf_d + f_oNtS); + test("12.0false", "" + sf_d + f_bl); + test("12.0null", "" + sf_d + sf_iAN); + test("12.0-2000000", "" + sf_d + sf_iM); + test("12.0-820130816", "" + sf_d + f_lM); + test("12.0null", "" + sf_d + sf_oAN); + test("12.025000000", "" + sf_d + s_I); + test("-99.0-96.0", "" + f_dM + s_dM); + test("-99.0null", "" + f_dM + s_oNtS); + test("-99.0\u045176", "" + f_dM + f_strU); + test("-99.092", "" + f_dM + sf_strU2); + test("-99.051", "" + f_dM + sf_strU1); + test("-99.0null", "" + f_dM + s_iAN); + test("-99.0-54", "" + f_dM + f_bM); + test("-99.0-87.0", "" + f_dM + f_fM); + test("-99.0null", "" + f_dM + s_oAN); + test("-99.019", "" + f_dM + f_str); + test("-99.0-41", "" + f_dM + sf_bM); + test("-99.0null", "" + f_dM + sf_IN); + test("-99.0T", "" + f_dM + s_c); + test("-99.0-42.0", "" + f_dM + sf_fM); + test("-99.025", "" + f_dM + s_b); + test("-99.0null", "" + f_dM + f_oN); + test("-99.0-1410065408", "" + f_dM + s_lM); + test("-99.08.0", "" + f_dM + s_d); + test("-99.055.0", "" + f_dM + s_f); + test("-99.097000000", "" + f_dM + s_i); + test("-99.0-9900", "" + f_dM + f_sM); + test("-99.0935228928", "" + f_dM + s_l); + test("-99.0-8400", "" + f_dM + sf_sM); + test("-99.0C(82)", "" + f_dM + s_o); + test("-99.0null", "" + f_dM + sf_oNtS); + test("-99.0true", "" + f_dM + s_bl); + test("-99.03900", "" + f_dM + s_s); + test("-99.0null", "" + f_dM + sf_oN); + test("-99.094000000", "" + f_dM + f_I); + test("-99.0null", "" + f_dM + f_IN); + test("-99.0true", "" + f_dM + sf_bl); + test("-99.05500", "" + f_dM + sf_s); + test("-99.0-2900", "" + f_dM + s_sM); + test("-99.0-194313216", "" + f_dM + sf_l); + test("-99.012", "" + f_dM + s_strU1); + test("-99.0C(87)", "" + f_dM + sf_o); + test("-99.091", "" + f_dM + s_strU2); + test("-99.021", "" + f_dM + f_strU1); + test("-99.018", "" + f_dM + f_strU2); + test("-99.0null", "" + f_dM + f_iAN); + test("-99.0null", "" + f_dM + s_oN); + test("-99.0\u045180", "" + f_dM + s_strU); + test("-99.0C", "" + f_dM + sf_c); + test("-99.075", "" + f_dM + sf_str); + test("-99.0-43", "" + f_dM + s_bM); + test("-99.080", "" + f_dM + sf_b); + test("-99.0null", "" + f_dM + s_IN); + test("-99.0-52.0", "" + f_dM + s_fM); + test("-99.075000000", "" + f_dM + sf_i); + test("-99.044", "" + f_dM + f_b); + test("-99.0-1705032704", "" + f_dM + sf_lM); + test("-99.0null", "" + f_dM + f_oAN); + test("-99.083.0", "" + f_dM + f_d); + test("-99.0I", "" + f_dM + f_c); + test("-99.094.0", "" + f_dM + f_f); + test("-99.012.0", "" + f_dM + sf_d); + test("-99.0-99.0", "" + f_dM + f_dM); + test("-99.017.0", "" + f_dM + sf_f); + test("-99.0-84.0", "" + f_dM + sf_dM); + test("-99.058000000", "" + f_dM + f_i); + test("-99.0-55000000", "" + f_dM + f_iM); + test("-99.01460392448", "" + f_dM + f_l); + test("-99.0C(70)", "" + f_dM + f_o); + test("-99.0\u04511", "" + f_dM + sf_strU); + test("-99.08000", "" + f_dM + f_s); + test("-99.018", "" + f_dM + s_str); + test("-99.0-1000000", "" + f_dM + s_iM); + test("-99.01000000", "" + f_dM + sf_I); + test("-99.0null", "" + f_dM + f_oNtS); + test("-99.0false", "" + f_dM + f_bl); + test("-99.0null", "" + f_dM + sf_iAN); + test("-99.0-2000000", "" + f_dM + sf_iM); + test("-99.0-820130816", "" + f_dM + f_lM); + test("-99.0null", "" + f_dM + sf_oAN); + test("-99.025000000", "" + f_dM + s_I); + test("17.0-96.0", "" + sf_f + s_dM); + test("17.0null", "" + sf_f + s_oNtS); + test("17.0\u045176", "" + sf_f + f_strU); + test("17.092", "" + sf_f + sf_strU2); + test("17.051", "" + sf_f + sf_strU1); + test("17.0null", "" + sf_f + s_iAN); + test("17.0-54", "" + sf_f + f_bM); + test("17.0-87.0", "" + sf_f + f_fM); + test("17.0null", "" + sf_f + s_oAN); + test("17.019", "" + sf_f + f_str); + test("17.0-41", "" + sf_f + sf_bM); + test("17.0null", "" + sf_f + sf_IN); + test("17.0T", "" + sf_f + s_c); + test("17.0-42.0", "" + sf_f + sf_fM); + test("17.025", "" + sf_f + s_b); + test("17.0null", "" + sf_f + f_oN); + test("17.0-1410065408", "" + sf_f + s_lM); + test("17.08.0", "" + sf_f + s_d); + test("17.055.0", "" + sf_f + s_f); + test("17.097000000", "" + sf_f + s_i); + test("17.0-9900", "" + sf_f + f_sM); + test("17.0935228928", "" + sf_f + s_l); + test("17.0-8400", "" + sf_f + sf_sM); + test("17.0C(82)", "" + sf_f + s_o); + test("17.0null", "" + sf_f + sf_oNtS); + test("17.0true", "" + sf_f + s_bl); + test("17.03900", "" + sf_f + s_s); + test("17.0null", "" + sf_f + sf_oN); + test("17.094000000", "" + sf_f + f_I); + test("17.0null", "" + sf_f + f_IN); + test("17.0true", "" + sf_f + sf_bl); + test("17.05500", "" + sf_f + sf_s); + test("17.0-2900", "" + sf_f + s_sM); + test("17.0-194313216", "" + sf_f + sf_l); + test("17.012", "" + sf_f + s_strU1); + test("17.0C(87)", "" + sf_f + sf_o); + test("17.091", "" + sf_f + s_strU2); + test("17.021", "" + sf_f + f_strU1); + test("17.018", "" + sf_f + f_strU2); + test("17.0null", "" + sf_f + f_iAN); + test("17.0null", "" + sf_f + s_oN); + test("17.0\u045180", "" + sf_f + s_strU); + test("17.0C", "" + sf_f + sf_c); + test("17.075", "" + sf_f + sf_str); + test("17.0-43", "" + sf_f + s_bM); + test("17.080", "" + sf_f + sf_b); + test("17.0null", "" + sf_f + s_IN); + test("17.0-52.0", "" + sf_f + s_fM); + test("17.075000000", "" + sf_f + sf_i); + test("17.044", "" + sf_f + f_b); + test("17.0-1705032704", "" + sf_f + sf_lM); + test("17.0null", "" + sf_f + f_oAN); + test("17.083.0", "" + sf_f + f_d); + test("17.0I", "" + sf_f + f_c); + test("17.094.0", "" + sf_f + f_f); + test("17.012.0", "" + sf_f + sf_d); + test("17.0-99.0", "" + sf_f + f_dM); + test("17.017.0", "" + sf_f + sf_f); + test("17.0-84.0", "" + sf_f + sf_dM); + test("17.058000000", "" + sf_f + f_i); + test("17.0-55000000", "" + sf_f + f_iM); + test("17.01460392448", "" + sf_f + f_l); + test("17.0C(70)", "" + sf_f + f_o); + test("17.0\u04511", "" + sf_f + sf_strU); + test("17.08000", "" + sf_f + f_s); + test("17.018", "" + sf_f + s_str); + test("17.0-1000000", "" + sf_f + s_iM); + test("17.01000000", "" + sf_f + sf_I); + test("17.0null", "" + sf_f + f_oNtS); + test("17.0false", "" + sf_f + f_bl); + test("17.0null", "" + sf_f + sf_iAN); + test("17.0-2000000", "" + sf_f + sf_iM); + test("17.0-820130816", "" + sf_f + f_lM); + test("17.0null", "" + sf_f + sf_oAN); + test("17.025000000", "" + sf_f + s_I); + test("-84.0-96.0", "" + sf_dM + s_dM); + test("-84.0null", "" + sf_dM + s_oNtS); + test("-84.0\u045176", "" + sf_dM + f_strU); + test("-84.092", "" + sf_dM + sf_strU2); + test("-84.051", "" + sf_dM + sf_strU1); + test("-84.0null", "" + sf_dM + s_iAN); + test("-84.0-54", "" + sf_dM + f_bM); + test("-84.0-87.0", "" + sf_dM + f_fM); + test("-84.0null", "" + sf_dM + s_oAN); + test("-84.019", "" + sf_dM + f_str); + test("-84.0-41", "" + sf_dM + sf_bM); + test("-84.0null", "" + sf_dM + sf_IN); + test("-84.0T", "" + sf_dM + s_c); + test("-84.0-42.0", "" + sf_dM + sf_fM); + test("-84.025", "" + sf_dM + s_b); + test("-84.0null", "" + sf_dM + f_oN); + test("-84.0-1410065408", "" + sf_dM + s_lM); + test("-84.08.0", "" + sf_dM + s_d); + test("-84.055.0", "" + sf_dM + s_f); + test("-84.097000000", "" + sf_dM + s_i); + test("-84.0-9900", "" + sf_dM + f_sM); + test("-84.0935228928", "" + sf_dM + s_l); + test("-84.0-8400", "" + sf_dM + sf_sM); + test("-84.0C(82)", "" + sf_dM + s_o); + test("-84.0null", "" + sf_dM + sf_oNtS); + test("-84.0true", "" + sf_dM + s_bl); + test("-84.03900", "" + sf_dM + s_s); + test("-84.0null", "" + sf_dM + sf_oN); + test("-84.094000000", "" + sf_dM + f_I); + test("-84.0null", "" + sf_dM + f_IN); + test("-84.0true", "" + sf_dM + sf_bl); + test("-84.05500", "" + sf_dM + sf_s); + test("-84.0-2900", "" + sf_dM + s_sM); + test("-84.0-194313216", "" + sf_dM + sf_l); + test("-84.012", "" + sf_dM + s_strU1); + test("-84.0C(87)", "" + sf_dM + sf_o); + test("-84.091", "" + sf_dM + s_strU2); + test("-84.021", "" + sf_dM + f_strU1); + test("-84.018", "" + sf_dM + f_strU2); + test("-84.0null", "" + sf_dM + f_iAN); + test("-84.0null", "" + sf_dM + s_oN); + test("-84.0\u045180", "" + sf_dM + s_strU); + test("-84.0C", "" + sf_dM + sf_c); + test("-84.075", "" + sf_dM + sf_str); + test("-84.0-43", "" + sf_dM + s_bM); + test("-84.080", "" + sf_dM + sf_b); + test("-84.0null", "" + sf_dM + s_IN); + test("-84.0-52.0", "" + sf_dM + s_fM); + test("-84.075000000", "" + sf_dM + sf_i); + test("-84.044", "" + sf_dM + f_b); + test("-84.0-1705032704", "" + sf_dM + sf_lM); + test("-84.0null", "" + sf_dM + f_oAN); + test("-84.083.0", "" + sf_dM + f_d); + test("-84.0I", "" + sf_dM + f_c); + test("-84.094.0", "" + sf_dM + f_f); + test("-84.012.0", "" + sf_dM + sf_d); + test("-84.0-99.0", "" + sf_dM + f_dM); + test("-84.017.0", "" + sf_dM + sf_f); + test("-84.0-84.0", "" + sf_dM + sf_dM); + test("-84.058000000", "" + sf_dM + f_i); + test("-84.0-55000000", "" + sf_dM + f_iM); + test("-84.01460392448", "" + sf_dM + f_l); + test("-84.0C(70)", "" + sf_dM + f_o); + test("-84.0\u04511", "" + sf_dM + sf_strU); + test("-84.08000", "" + sf_dM + f_s); + test("-84.018", "" + sf_dM + s_str); + test("-84.0-1000000", "" + sf_dM + s_iM); + test("-84.01000000", "" + sf_dM + sf_I); + test("-84.0null", "" + sf_dM + f_oNtS); + test("-84.0false", "" + sf_dM + f_bl); + test("-84.0null", "" + sf_dM + sf_iAN); + test("-84.0-2000000", "" + sf_dM + sf_iM); + test("-84.0-820130816", "" + sf_dM + f_lM); + test("-84.0null", "" + sf_dM + sf_oAN); + test("-84.025000000", "" + sf_dM + s_I); + test("58000000-96.0", "" + f_i + s_dM); + test("58000000null", "" + f_i + s_oNtS); + test("58000000\u045176", "" + f_i + f_strU); + test("5800000092", "" + f_i + sf_strU2); + test("5800000051", "" + f_i + sf_strU1); + test("58000000null", "" + f_i + s_iAN); + test("58000000-54", "" + f_i + f_bM); + test("58000000-87.0", "" + f_i + f_fM); + test("58000000null", "" + f_i + s_oAN); + test("5800000019", "" + f_i + f_str); + test("58000000-41", "" + f_i + sf_bM); + test("58000000null", "" + f_i + sf_IN); + test("58000000T", "" + f_i + s_c); + test("58000000-42.0", "" + f_i + sf_fM); + test("5800000025", "" + f_i + s_b); + test("58000000null", "" + f_i + f_oN); + test("58000000-1410065408", "" + f_i + s_lM); + test("580000008.0", "" + f_i + s_d); + test("5800000055.0", "" + f_i + s_f); + test("5800000097000000", "" + f_i + s_i); + test("58000000-9900", "" + f_i + f_sM); + test("58000000935228928", "" + f_i + s_l); + test("58000000-8400", "" + f_i + sf_sM); + test("58000000C(82)", "" + f_i + s_o); + test("58000000null", "" + f_i + sf_oNtS); + test("58000000true", "" + f_i + s_bl); + test("580000003900", "" + f_i + s_s); + test("58000000null", "" + f_i + sf_oN); + test("5800000094000000", "" + f_i + f_I); + test("58000000null", "" + f_i + f_IN); + test("58000000true", "" + f_i + sf_bl); + test("580000005500", "" + f_i + sf_s); + test("58000000-2900", "" + f_i + s_sM); + test("58000000-194313216", "" + f_i + sf_l); + test("5800000012", "" + f_i + s_strU1); + test("58000000C(87)", "" + f_i + sf_o); + test("5800000091", "" + f_i + s_strU2); + test("5800000021", "" + f_i + f_strU1); + test("5800000018", "" + f_i + f_strU2); + test("58000000null", "" + f_i + f_iAN); + test("58000000null", "" + f_i + s_oN); + test("58000000\u045180", "" + f_i + s_strU); + test("58000000C", "" + f_i + sf_c); + test("5800000075", "" + f_i + sf_str); + test("58000000-43", "" + f_i + s_bM); + test("5800000080", "" + f_i + sf_b); + test("58000000null", "" + f_i + s_IN); + test("58000000-52.0", "" + f_i + s_fM); + test("5800000075000000", "" + f_i + sf_i); + test("5800000044", "" + f_i + f_b); + test("58000000-1705032704", "" + f_i + sf_lM); + test("58000000null", "" + f_i + f_oAN); + test("5800000083.0", "" + f_i + f_d); + test("58000000I", "" + f_i + f_c); + test("5800000094.0", "" + f_i + f_f); + test("5800000012.0", "" + f_i + sf_d); + test("58000000-99.0", "" + f_i + f_dM); + test("5800000017.0", "" + f_i + sf_f); + test("58000000-84.0", "" + f_i + sf_dM); + test("5800000058000000", "" + f_i + f_i); + test("58000000-55000000", "" + f_i + f_iM); + test("580000001460392448", "" + f_i + f_l); + test("58000000C(70)", "" + f_i + f_o); + test("58000000\u04511", "" + f_i + sf_strU); + test("580000008000", "" + f_i + f_s); + test("5800000018", "" + f_i + s_str); + test("58000000-1000000", "" + f_i + s_iM); + test("580000001000000", "" + f_i + sf_I); + test("58000000null", "" + f_i + f_oNtS); + test("58000000false", "" + f_i + f_bl); + test("58000000null", "" + f_i + sf_iAN); + test("58000000-2000000", "" + f_i + sf_iM); + test("58000000-820130816", "" + f_i + f_lM); + test("58000000null", "" + f_i + sf_oAN); + test("5800000025000000", "" + f_i + s_I); + test("-55000000-96.0", "" + f_iM + s_dM); + test("-55000000null", "" + f_iM + s_oNtS); + test("-55000000\u045176", "" + f_iM + f_strU); + test("-5500000092", "" + f_iM + sf_strU2); + test("-5500000051", "" + f_iM + sf_strU1); + test("-55000000null", "" + f_iM + s_iAN); + test("-55000000-54", "" + f_iM + f_bM); + test("-55000000-87.0", "" + f_iM + f_fM); + test("-55000000null", "" + f_iM + s_oAN); + test("-5500000019", "" + f_iM + f_str); + test("-55000000-41", "" + f_iM + sf_bM); + test("-55000000null", "" + f_iM + sf_IN); + test("-55000000T", "" + f_iM + s_c); + test("-55000000-42.0", "" + f_iM + sf_fM); + test("-5500000025", "" + f_iM + s_b); + test("-55000000null", "" + f_iM + f_oN); + test("-55000000-1410065408", "" + f_iM + s_lM); + test("-550000008.0", "" + f_iM + s_d); + test("-5500000055.0", "" + f_iM + s_f); + test("-5500000097000000", "" + f_iM + s_i); + test("-55000000-9900", "" + f_iM + f_sM); + test("-55000000935228928", "" + f_iM + s_l); + test("-55000000-8400", "" + f_iM + sf_sM); + test("-55000000C(82)", "" + f_iM + s_o); + test("-55000000null", "" + f_iM + sf_oNtS); + test("-55000000true", "" + f_iM + s_bl); + test("-550000003900", "" + f_iM + s_s); + test("-55000000null", "" + f_iM + sf_oN); + test("-5500000094000000", "" + f_iM + f_I); + test("-55000000null", "" + f_iM + f_IN); + test("-55000000true", "" + f_iM + sf_bl); + test("-550000005500", "" + f_iM + sf_s); + test("-55000000-2900", "" + f_iM + s_sM); + test("-55000000-194313216", "" + f_iM + sf_l); + test("-5500000012", "" + f_iM + s_strU1); + test("-55000000C(87)", "" + f_iM + sf_o); + test("-5500000091", "" + f_iM + s_strU2); + test("-5500000021", "" + f_iM + f_strU1); + test("-5500000018", "" + f_iM + f_strU2); + test("-55000000null", "" + f_iM + f_iAN); + test("-55000000null", "" + f_iM + s_oN); + test("-55000000\u045180", "" + f_iM + s_strU); + test("-55000000C", "" + f_iM + sf_c); + test("-5500000075", "" + f_iM + sf_str); + test("-55000000-43", "" + f_iM + s_bM); + test("-5500000080", "" + f_iM + sf_b); + test("-55000000null", "" + f_iM + s_IN); + test("-55000000-52.0", "" + f_iM + s_fM); + test("-5500000075000000", "" + f_iM + sf_i); + test("-5500000044", "" + f_iM + f_b); + test("-55000000-1705032704", "" + f_iM + sf_lM); + test("-55000000null", "" + f_iM + f_oAN); + test("-5500000083.0", "" + f_iM + f_d); + test("-55000000I", "" + f_iM + f_c); + test("-5500000094.0", "" + f_iM + f_f); + test("-5500000012.0", "" + f_iM + sf_d); + test("-55000000-99.0", "" + f_iM + f_dM); + test("-5500000017.0", "" + f_iM + sf_f); + test("-55000000-84.0", "" + f_iM + sf_dM); + test("-5500000058000000", "" + f_iM + f_i); + test("-55000000-55000000", "" + f_iM + f_iM); + test("-550000001460392448", "" + f_iM + f_l); + test("-55000000C(70)", "" + f_iM + f_o); + test("-55000000\u04511", "" + f_iM + sf_strU); + test("-550000008000", "" + f_iM + f_s); + test("-5500000018", "" + f_iM + s_str); + test("-55000000-1000000", "" + f_iM + s_iM); + test("-550000001000000", "" + f_iM + sf_I); + test("-55000000null", "" + f_iM + f_oNtS); + test("-55000000false", "" + f_iM + f_bl); + test("-55000000null", "" + f_iM + sf_iAN); + test("-55000000-2000000", "" + f_iM + sf_iM); + test("-55000000-820130816", "" + f_iM + f_lM); + test("-55000000null", "" + f_iM + sf_oAN); + test("-5500000025000000", "" + f_iM + s_I); + test("1460392448-96.0", "" + f_l + s_dM); + test("1460392448null", "" + f_l + s_oNtS); + test("1460392448\u045176", "" + f_l + f_strU); + test("146039244892", "" + f_l + sf_strU2); + test("146039244851", "" + f_l + sf_strU1); + test("1460392448null", "" + f_l + s_iAN); + test("1460392448-54", "" + f_l + f_bM); + test("1460392448-87.0", "" + f_l + f_fM); + test("1460392448null", "" + f_l + s_oAN); + test("146039244819", "" + f_l + f_str); + test("1460392448-41", "" + f_l + sf_bM); + test("1460392448null", "" + f_l + sf_IN); + test("1460392448T", "" + f_l + s_c); + test("1460392448-42.0", "" + f_l + sf_fM); + test("146039244825", "" + f_l + s_b); + test("1460392448null", "" + f_l + f_oN); + test("1460392448-1410065408", "" + f_l + s_lM); + test("14603924488.0", "" + f_l + s_d); + test("146039244855.0", "" + f_l + s_f); + test("146039244897000000", "" + f_l + s_i); + test("1460392448-9900", "" + f_l + f_sM); + test("1460392448935228928", "" + f_l + s_l); + test("1460392448-8400", "" + f_l + sf_sM); + test("1460392448C(82)", "" + f_l + s_o); + test("1460392448null", "" + f_l + sf_oNtS); + test("1460392448true", "" + f_l + s_bl); + test("14603924483900", "" + f_l + s_s); + test("1460392448null", "" + f_l + sf_oN); + test("146039244894000000", "" + f_l + f_I); + test("1460392448null", "" + f_l + f_IN); + test("1460392448true", "" + f_l + sf_bl); + test("14603924485500", "" + f_l + sf_s); + test("1460392448-2900", "" + f_l + s_sM); + test("1460392448-194313216", "" + f_l + sf_l); + test("146039244812", "" + f_l + s_strU1); + test("1460392448C(87)", "" + f_l + sf_o); + test("146039244891", "" + f_l + s_strU2); + test("146039244821", "" + f_l + f_strU1); + test("146039244818", "" + f_l + f_strU2); + test("1460392448null", "" + f_l + f_iAN); + test("1460392448null", "" + f_l + s_oN); + test("1460392448\u045180", "" + f_l + s_strU); + test("1460392448C", "" + f_l + sf_c); + test("146039244875", "" + f_l + sf_str); + test("1460392448-43", "" + f_l + s_bM); + test("146039244880", "" + f_l + sf_b); + test("1460392448null", "" + f_l + s_IN); + test("1460392448-52.0", "" + f_l + s_fM); + test("146039244875000000", "" + f_l + sf_i); + test("146039244844", "" + f_l + f_b); + test("1460392448-1705032704", "" + f_l + sf_lM); + test("1460392448null", "" + f_l + f_oAN); + test("146039244883.0", "" + f_l + f_d); + test("1460392448I", "" + f_l + f_c); + test("146039244894.0", "" + f_l + f_f); + test("146039244812.0", "" + f_l + sf_d); + test("1460392448-99.0", "" + f_l + f_dM); + test("146039244817.0", "" + f_l + sf_f); + test("1460392448-84.0", "" + f_l + sf_dM); + test("146039244858000000", "" + f_l + f_i); + test("1460392448-55000000", "" + f_l + f_iM); + test("14603924481460392448", "" + f_l + f_l); + test("1460392448C(70)", "" + f_l + f_o); + test("1460392448\u04511", "" + f_l + sf_strU); + test("14603924488000", "" + f_l + f_s); + test("146039244818", "" + f_l + s_str); + test("1460392448-1000000", "" + f_l + s_iM); + test("14603924481000000", "" + f_l + sf_I); + test("1460392448null", "" + f_l + f_oNtS); + test("1460392448false", "" + f_l + f_bl); + test("1460392448null", "" + f_l + sf_iAN); + test("1460392448-2000000", "" + f_l + sf_iM); + test("1460392448-820130816", "" + f_l + f_lM); + test("1460392448null", "" + f_l + sf_oAN); + test("146039244825000000", "" + f_l + s_I); + test("C(70)-96.0", "" + f_o + s_dM); + test("C(70)null", "" + f_o + s_oNtS); + test("C(70)\u045176", "" + f_o + f_strU); + test("C(70)92", "" + f_o + sf_strU2); + test("C(70)51", "" + f_o + sf_strU1); + test("C(70)null", "" + f_o + s_iAN); + test("C(70)-54", "" + f_o + f_bM); + test("C(70)-87.0", "" + f_o + f_fM); + test("C(70)null", "" + f_o + s_oAN); + test("C(70)19", "" + f_o + f_str); + test("C(70)-41", "" + f_o + sf_bM); + test("C(70)null", "" + f_o + sf_IN); + test("C(70)T", "" + f_o + s_c); + test("C(70)-42.0", "" + f_o + sf_fM); + test("C(70)25", "" + f_o + s_b); + test("C(70)null", "" + f_o + f_oN); + test("C(70)-1410065408", "" + f_o + s_lM); + test("C(70)8.0", "" + f_o + s_d); + test("C(70)55.0", "" + f_o + s_f); + test("C(70)97000000", "" + f_o + s_i); + test("C(70)-9900", "" + f_o + f_sM); + test("C(70)935228928", "" + f_o + s_l); + test("C(70)-8400", "" + f_o + sf_sM); + test("C(70)C(82)", "" + f_o + s_o); + test("C(70)null", "" + f_o + sf_oNtS); + test("C(70)true", "" + f_o + s_bl); + test("C(70)3900", "" + f_o + s_s); + test("C(70)null", "" + f_o + sf_oN); + test("C(70)94000000", "" + f_o + f_I); + test("C(70)null", "" + f_o + f_IN); + test("C(70)true", "" + f_o + sf_bl); + test("C(70)5500", "" + f_o + sf_s); + test("C(70)-2900", "" + f_o + s_sM); + test("C(70)-194313216", "" + f_o + sf_l); + test("C(70)12", "" + f_o + s_strU1); + test("C(70)C(87)", "" + f_o + sf_o); + test("C(70)91", "" + f_o + s_strU2); + test("C(70)21", "" + f_o + f_strU1); + test("C(70)18", "" + f_o + f_strU2); + test("C(70)null", "" + f_o + f_iAN); + test("C(70)null", "" + f_o + s_oN); + test("C(70)\u045180", "" + f_o + s_strU); + test("C(70)C", "" + f_o + sf_c); + test("C(70)75", "" + f_o + sf_str); + test("C(70)-43", "" + f_o + s_bM); + test("C(70)80", "" + f_o + sf_b); + test("C(70)null", "" + f_o + s_IN); + test("C(70)-52.0", "" + f_o + s_fM); + test("C(70)75000000", "" + f_o + sf_i); + test("C(70)44", "" + f_o + f_b); + test("C(70)-1705032704", "" + f_o + sf_lM); + test("C(70)null", "" + f_o + f_oAN); + test("C(70)83.0", "" + f_o + f_d); + test("C(70)I", "" + f_o + f_c); + test("C(70)94.0", "" + f_o + f_f); + test("C(70)12.0", "" + f_o + sf_d); + test("C(70)-99.0", "" + f_o + f_dM); + test("C(70)17.0", "" + f_o + sf_f); + test("C(70)-84.0", "" + f_o + sf_dM); + test("C(70)58000000", "" + f_o + f_i); + test("C(70)-55000000", "" + f_o + f_iM); + test("C(70)1460392448", "" + f_o + f_l); + test("C(70)C(70)", "" + f_o + f_o); + test("C(70)\u04511", "" + f_o + sf_strU); + test("C(70)8000", "" + f_o + f_s); + test("C(70)18", "" + f_o + s_str); + test("C(70)-1000000", "" + f_o + s_iM); + test("C(70)1000000", "" + f_o + sf_I); + test("C(70)null", "" + f_o + f_oNtS); + test("C(70)false", "" + f_o + f_bl); + test("C(70)null", "" + f_o + sf_iAN); + test("C(70)-2000000", "" + f_o + sf_iM); + test("C(70)-820130816", "" + f_o + f_lM); + test("C(70)null", "" + f_o + sf_oAN); + test("C(70)25000000", "" + f_o + s_I); + test("\u04511-96.0", "" + sf_strU + s_dM); + test("\u04511null", "" + sf_strU + s_oNtS); + test("\u04511\u045176", "" + sf_strU + f_strU); + test("\u0451192", "" + sf_strU + sf_strU2); + test("\u0451151", "" + sf_strU + sf_strU1); + test("\u04511null", "" + sf_strU + s_iAN); + test("\u04511-54", "" + sf_strU + f_bM); + test("\u04511-87.0", "" + sf_strU + f_fM); + test("\u04511null", "" + sf_strU + s_oAN); + test("\u0451119", "" + sf_strU + f_str); + test("\u04511-41", "" + sf_strU + sf_bM); + test("\u04511null", "" + sf_strU + sf_IN); + test("\u04511T", "" + sf_strU + s_c); + test("\u04511-42.0", "" + sf_strU + sf_fM); + test("\u0451125", "" + sf_strU + s_b); + test("\u04511null", "" + sf_strU + f_oN); + test("\u04511-1410065408", "" + sf_strU + s_lM); + test("\u045118.0", "" + sf_strU + s_d); + test("\u0451155.0", "" + sf_strU + s_f); + test("\u0451197000000", "" + sf_strU + s_i); + test("\u04511-9900", "" + sf_strU + f_sM); + test("\u04511935228928", "" + sf_strU + s_l); + test("\u04511-8400", "" + sf_strU + sf_sM); + test("\u04511C(82)", "" + sf_strU + s_o); + test("\u04511null", "" + sf_strU + sf_oNtS); + test("\u04511true", "" + sf_strU + s_bl); + test("\u045113900", "" + sf_strU + s_s); + test("\u04511null", "" + sf_strU + sf_oN); + test("\u0451194000000", "" + sf_strU + f_I); + test("\u04511null", "" + sf_strU + f_IN); + test("\u04511true", "" + sf_strU + sf_bl); + test("\u045115500", "" + sf_strU + sf_s); + test("\u04511-2900", "" + sf_strU + s_sM); + test("\u04511-194313216", "" + sf_strU + sf_l); + test("\u0451112", "" + sf_strU + s_strU1); + test("\u04511C(87)", "" + sf_strU + sf_o); + test("\u0451191", "" + sf_strU + s_strU2); + test("\u0451121", "" + sf_strU + f_strU1); + test("\u0451118", "" + sf_strU + f_strU2); + test("\u04511null", "" + sf_strU + f_iAN); + test("\u04511null", "" + sf_strU + s_oN); + test("\u04511\u045180", "" + sf_strU + s_strU); + test("\u04511C", "" + sf_strU + sf_c); + test("\u0451175", "" + sf_strU + sf_str); + test("\u04511-43", "" + sf_strU + s_bM); + test("\u0451180", "" + sf_strU + sf_b); + test("\u04511null", "" + sf_strU + s_IN); + test("\u04511-52.0", "" + sf_strU + s_fM); + test("\u0451175000000", "" + sf_strU + sf_i); + test("\u0451144", "" + sf_strU + f_b); + test("\u04511-1705032704", "" + sf_strU + sf_lM); + test("\u04511null", "" + sf_strU + f_oAN); + test("\u0451183.0", "" + sf_strU + f_d); + test("\u04511I", "" + sf_strU + f_c); + test("\u0451194.0", "" + sf_strU + f_f); + test("\u0451112.0", "" + sf_strU + sf_d); + test("\u04511-99.0", "" + sf_strU + f_dM); + test("\u0451117.0", "" + sf_strU + sf_f); + test("\u04511-84.0", "" + sf_strU + sf_dM); + test("\u0451158000000", "" + sf_strU + f_i); + test("\u04511-55000000", "" + sf_strU + f_iM); + test("\u045111460392448", "" + sf_strU + f_l); + test("\u04511C(70)", "" + sf_strU + f_o); + test("\u04511\u04511", "" + sf_strU + sf_strU); + test("\u045118000", "" + sf_strU + f_s); + test("\u0451118", "" + sf_strU + s_str); + test("\u04511-1000000", "" + sf_strU + s_iM); + test("\u045111000000", "" + sf_strU + sf_I); + test("\u04511null", "" + sf_strU + f_oNtS); + test("\u04511false", "" + sf_strU + f_bl); + test("\u04511null", "" + sf_strU + sf_iAN); + test("\u04511-2000000", "" + sf_strU + sf_iM); + test("\u04511-820130816", "" + sf_strU + f_lM); + test("\u04511null", "" + sf_strU + sf_oAN); + test("\u0451125000000", "" + sf_strU + s_I); + test("8000-96.0", "" + f_s + s_dM); + test("8000null", "" + f_s + s_oNtS); + test("8000\u045176", "" + f_s + f_strU); + test("800092", "" + f_s + sf_strU2); + test("800051", "" + f_s + sf_strU1); + test("8000null", "" + f_s + s_iAN); + test("8000-54", "" + f_s + f_bM); + test("8000-87.0", "" + f_s + f_fM); + test("8000null", "" + f_s + s_oAN); + test("800019", "" + f_s + f_str); + test("8000-41", "" + f_s + sf_bM); + test("8000null", "" + f_s + sf_IN); + test("8000T", "" + f_s + s_c); + test("8000-42.0", "" + f_s + sf_fM); + test("800025", "" + f_s + s_b); + test("8000null", "" + f_s + f_oN); + test("8000-1410065408", "" + f_s + s_lM); + test("80008.0", "" + f_s + s_d); + test("800055.0", "" + f_s + s_f); + test("800097000000", "" + f_s + s_i); + test("8000-9900", "" + f_s + f_sM); + test("8000935228928", "" + f_s + s_l); + test("8000-8400", "" + f_s + sf_sM); + test("8000C(82)", "" + f_s + s_o); + test("8000null", "" + f_s + sf_oNtS); + test("8000true", "" + f_s + s_bl); + test("80003900", "" + f_s + s_s); + test("8000null", "" + f_s + sf_oN); + test("800094000000", "" + f_s + f_I); + test("8000null", "" + f_s + f_IN); + test("8000true", "" + f_s + sf_bl); + test("80005500", "" + f_s + sf_s); + test("8000-2900", "" + f_s + s_sM); + test("8000-194313216", "" + f_s + sf_l); + test("800012", "" + f_s + s_strU1); + test("8000C(87)", "" + f_s + sf_o); + test("800091", "" + f_s + s_strU2); + test("800021", "" + f_s + f_strU1); + test("800018", "" + f_s + f_strU2); + test("8000null", "" + f_s + f_iAN); + test("8000null", "" + f_s + s_oN); + test("8000\u045180", "" + f_s + s_strU); + test("8000C", "" + f_s + sf_c); + test("800075", "" + f_s + sf_str); + test("8000-43", "" + f_s + s_bM); + test("800080", "" + f_s + sf_b); + test("8000null", "" + f_s + s_IN); + test("8000-52.0", "" + f_s + s_fM); + test("800075000000", "" + f_s + sf_i); + test("800044", "" + f_s + f_b); + test("8000-1705032704", "" + f_s + sf_lM); + test("8000null", "" + f_s + f_oAN); + test("800083.0", "" + f_s + f_d); + test("8000I", "" + f_s + f_c); + test("800094.0", "" + f_s + f_f); + test("800012.0", "" + f_s + sf_d); + test("8000-99.0", "" + f_s + f_dM); + test("800017.0", "" + f_s + sf_f); + test("8000-84.0", "" + f_s + sf_dM); + test("800058000000", "" + f_s + f_i); + test("8000-55000000", "" + f_s + f_iM); + test("80001460392448", "" + f_s + f_l); + test("8000C(70)", "" + f_s + f_o); + test("8000\u04511", "" + f_s + sf_strU); + test("80008000", "" + f_s + f_s); + test("800018", "" + f_s + s_str); + test("8000-1000000", "" + f_s + s_iM); + test("80001000000", "" + f_s + sf_I); + test("8000null", "" + f_s + f_oNtS); + test("8000false", "" + f_s + f_bl); + test("8000null", "" + f_s + sf_iAN); + test("8000-2000000", "" + f_s + sf_iM); + test("8000-820130816", "" + f_s + f_lM); + test("8000null", "" + f_s + sf_oAN); + test("800025000000", "" + f_s + s_I); + test("18-96.0", "" + s_str + s_dM); + test("18null", "" + s_str + s_oNtS); + test("18\u045176", "" + s_str + f_strU); + test("1892", "" + s_str + sf_strU2); + test("1851", "" + s_str + sf_strU1); + test("18null", "" + s_str + s_iAN); + test("18-54", "" + s_str + f_bM); + test("18-87.0", "" + s_str + f_fM); + test("18null", "" + s_str + s_oAN); + test("1819", "" + s_str + f_str); + test("18-41", "" + s_str + sf_bM); + test("18null", "" + s_str + sf_IN); + test("18T", "" + s_str + s_c); + test("18-42.0", "" + s_str + sf_fM); + test("1825", "" + s_str + s_b); + test("18null", "" + s_str + f_oN); + test("18-1410065408", "" + s_str + s_lM); + test("188.0", "" + s_str + s_d); + test("1855.0", "" + s_str + s_f); + test("1897000000", "" + s_str + s_i); + test("18-9900", "" + s_str + f_sM); + test("18935228928", "" + s_str + s_l); + test("18-8400", "" + s_str + sf_sM); + test("18C(82)", "" + s_str + s_o); + test("18null", "" + s_str + sf_oNtS); + test("18true", "" + s_str + s_bl); + test("183900", "" + s_str + s_s); + test("18null", "" + s_str + sf_oN); + test("1894000000", "" + s_str + f_I); + test("18null", "" + s_str + f_IN); + test("18true", "" + s_str + sf_bl); + test("185500", "" + s_str + sf_s); + test("18-2900", "" + s_str + s_sM); + test("18-194313216", "" + s_str + sf_l); + test("1812", "" + s_str + s_strU1); + test("18C(87)", "" + s_str + sf_o); + test("1891", "" + s_str + s_strU2); + test("1821", "" + s_str + f_strU1); + test("1818", "" + s_str + f_strU2); + test("18null", "" + s_str + f_iAN); + test("18null", "" + s_str + s_oN); + test("18\u045180", "" + s_str + s_strU); + test("18C", "" + s_str + sf_c); + test("1875", "" + s_str + sf_str); + test("18-43", "" + s_str + s_bM); + test("1880", "" + s_str + sf_b); + test("18null", "" + s_str + s_IN); + test("18-52.0", "" + s_str + s_fM); + test("1875000000", "" + s_str + sf_i); + test("1844", "" + s_str + f_b); + } + + public void run5() { + test("18-1705032704", "" + s_str + sf_lM); + test("18null", "" + s_str + f_oAN); + test("1883.0", "" + s_str + f_d); + test("18I", "" + s_str + f_c); + test("1894.0", "" + s_str + f_f); + test("1812.0", "" + s_str + sf_d); + test("18-99.0", "" + s_str + f_dM); + test("1817.0", "" + s_str + sf_f); + test("18-84.0", "" + s_str + sf_dM); + test("1858000000", "" + s_str + f_i); + test("18-55000000", "" + s_str + f_iM); + test("181460392448", "" + s_str + f_l); + test("18C(70)", "" + s_str + f_o); + test("18\u04511", "" + s_str + sf_strU); + test("188000", "" + s_str + f_s); + test("1818", "" + s_str + s_str); + test("18-1000000", "" + s_str + s_iM); + test("181000000", "" + s_str + sf_I); + test("18null", "" + s_str + f_oNtS); + test("18false", "" + s_str + f_bl); + test("18null", "" + s_str + sf_iAN); + test("18-2000000", "" + s_str + sf_iM); + test("18-820130816", "" + s_str + f_lM); + test("18null", "" + s_str + sf_oAN); + test("1825000000", "" + s_str + s_I); + test("-1000000-96.0", "" + s_iM + s_dM); + test("-1000000null", "" + s_iM + s_oNtS); + test("-1000000\u045176", "" + s_iM + f_strU); + test("-100000092", "" + s_iM + sf_strU2); + test("-100000051", "" + s_iM + sf_strU1); + test("-1000000null", "" + s_iM + s_iAN); + test("-1000000-54", "" + s_iM + f_bM); + test("-1000000-87.0", "" + s_iM + f_fM); + test("-1000000null", "" + s_iM + s_oAN); + test("-100000019", "" + s_iM + f_str); + test("-1000000-41", "" + s_iM + sf_bM); + test("-1000000null", "" + s_iM + sf_IN); + test("-1000000T", "" + s_iM + s_c); + test("-1000000-42.0", "" + s_iM + sf_fM); + test("-100000025", "" + s_iM + s_b); + test("-1000000null", "" + s_iM + f_oN); + test("-1000000-1410065408", "" + s_iM + s_lM); + test("-10000008.0", "" + s_iM + s_d); + test("-100000055.0", "" + s_iM + s_f); + test("-100000097000000", "" + s_iM + s_i); + test("-1000000-9900", "" + s_iM + f_sM); + test("-1000000935228928", "" + s_iM + s_l); + test("-1000000-8400", "" + s_iM + sf_sM); + test("-1000000C(82)", "" + s_iM + s_o); + test("-1000000null", "" + s_iM + sf_oNtS); + test("-1000000true", "" + s_iM + s_bl); + test("-10000003900", "" + s_iM + s_s); + test("-1000000null", "" + s_iM + sf_oN); + test("-100000094000000", "" + s_iM + f_I); + test("-1000000null", "" + s_iM + f_IN); + test("-1000000true", "" + s_iM + sf_bl); + test("-10000005500", "" + s_iM + sf_s); + test("-1000000-2900", "" + s_iM + s_sM); + test("-1000000-194313216", "" + s_iM + sf_l); + test("-100000012", "" + s_iM + s_strU1); + test("-1000000C(87)", "" + s_iM + sf_o); + test("-100000091", "" + s_iM + s_strU2); + test("-100000021", "" + s_iM + f_strU1); + test("-100000018", "" + s_iM + f_strU2); + test("-1000000null", "" + s_iM + f_iAN); + test("-1000000null", "" + s_iM + s_oN); + test("-1000000\u045180", "" + s_iM + s_strU); + test("-1000000C", "" + s_iM + sf_c); + test("-100000075", "" + s_iM + sf_str); + test("-1000000-43", "" + s_iM + s_bM); + test("-100000080", "" + s_iM + sf_b); + test("-1000000null", "" + s_iM + s_IN); + test("-1000000-52.0", "" + s_iM + s_fM); + test("-100000075000000", "" + s_iM + sf_i); + test("-100000044", "" + s_iM + f_b); + test("-1000000-1705032704", "" + s_iM + sf_lM); + test("-1000000null", "" + s_iM + f_oAN); + test("-100000083.0", "" + s_iM + f_d); + test("-1000000I", "" + s_iM + f_c); + test("-100000094.0", "" + s_iM + f_f); + test("-100000012.0", "" + s_iM + sf_d); + test("-1000000-99.0", "" + s_iM + f_dM); + test("-100000017.0", "" + s_iM + sf_f); + test("-1000000-84.0", "" + s_iM + sf_dM); + test("-100000058000000", "" + s_iM + f_i); + test("-1000000-55000000", "" + s_iM + f_iM); + test("-10000001460392448", "" + s_iM + f_l); + test("-1000000C(70)", "" + s_iM + f_o); + test("-1000000\u04511", "" + s_iM + sf_strU); + test("-10000008000", "" + s_iM + f_s); + test("-100000018", "" + s_iM + s_str); + test("-1000000-1000000", "" + s_iM + s_iM); + test("-10000001000000", "" + s_iM + sf_I); + test("-1000000null", "" + s_iM + f_oNtS); + test("-1000000false", "" + s_iM + f_bl); + test("-1000000null", "" + s_iM + sf_iAN); + test("-1000000-2000000", "" + s_iM + sf_iM); + test("-1000000-820130816", "" + s_iM + f_lM); + test("-1000000null", "" + s_iM + sf_oAN); + test("-100000025000000", "" + s_iM + s_I); + test("1000000-96.0", "" + sf_I + s_dM); + test("1000000null", "" + sf_I + s_oNtS); + test("1000000\u045176", "" + sf_I + f_strU); + test("100000092", "" + sf_I + sf_strU2); + test("100000051", "" + sf_I + sf_strU1); + test("1000000null", "" + sf_I + s_iAN); + test("1000000-54", "" + sf_I + f_bM); + test("1000000-87.0", "" + sf_I + f_fM); + test("1000000null", "" + sf_I + s_oAN); + test("100000019", "" + sf_I + f_str); + test("1000000-41", "" + sf_I + sf_bM); + test("1000000null", "" + sf_I + sf_IN); + test("1000000T", "" + sf_I + s_c); + test("1000000-42.0", "" + sf_I + sf_fM); + test("100000025", "" + sf_I + s_b); + test("1000000null", "" + sf_I + f_oN); + test("1000000-1410065408", "" + sf_I + s_lM); + test("10000008.0", "" + sf_I + s_d); + test("100000055.0", "" + sf_I + s_f); + test("100000097000000", "" + sf_I + s_i); + test("1000000-9900", "" + sf_I + f_sM); + test("1000000935228928", "" + sf_I + s_l); + test("1000000-8400", "" + sf_I + sf_sM); + test("1000000C(82)", "" + sf_I + s_o); + test("1000000null", "" + sf_I + sf_oNtS); + test("1000000true", "" + sf_I + s_bl); + test("10000003900", "" + sf_I + s_s); + test("1000000null", "" + sf_I + sf_oN); + test("100000094000000", "" + sf_I + f_I); + test("1000000null", "" + sf_I + f_IN); + test("1000000true", "" + sf_I + sf_bl); + test("10000005500", "" + sf_I + sf_s); + test("1000000-2900", "" + sf_I + s_sM); + test("1000000-194313216", "" + sf_I + sf_l); + test("100000012", "" + sf_I + s_strU1); + test("1000000C(87)", "" + sf_I + sf_o); + test("100000091", "" + sf_I + s_strU2); + test("100000021", "" + sf_I + f_strU1); + test("100000018", "" + sf_I + f_strU2); + test("1000000null", "" + sf_I + f_iAN); + test("1000000null", "" + sf_I + s_oN); + test("1000000\u045180", "" + sf_I + s_strU); + test("1000000C", "" + sf_I + sf_c); + test("100000075", "" + sf_I + sf_str); + test("1000000-43", "" + sf_I + s_bM); + test("100000080", "" + sf_I + sf_b); + test("1000000null", "" + sf_I + s_IN); + test("1000000-52.0", "" + sf_I + s_fM); + test("100000075000000", "" + sf_I + sf_i); + test("100000044", "" + sf_I + f_b); + test("1000000-1705032704", "" + sf_I + sf_lM); + test("1000000null", "" + sf_I + f_oAN); + test("100000083.0", "" + sf_I + f_d); + test("1000000I", "" + sf_I + f_c); + test("100000094.0", "" + sf_I + f_f); + test("100000012.0", "" + sf_I + sf_d); + test("1000000-99.0", "" + sf_I + f_dM); + test("100000017.0", "" + sf_I + sf_f); + test("1000000-84.0", "" + sf_I + sf_dM); + test("100000058000000", "" + sf_I + f_i); + test("1000000-55000000", "" + sf_I + f_iM); + test("10000001460392448", "" + sf_I + f_l); + test("1000000C(70)", "" + sf_I + f_o); + test("1000000\u04511", "" + sf_I + sf_strU); + test("10000008000", "" + sf_I + f_s); + test("100000018", "" + sf_I + s_str); + test("1000000-1000000", "" + sf_I + s_iM); + test("10000001000000", "" + sf_I + sf_I); + test("1000000null", "" + sf_I + f_oNtS); + test("1000000false", "" + sf_I + f_bl); + test("1000000null", "" + sf_I + sf_iAN); + test("1000000-2000000", "" + sf_I + sf_iM); + test("1000000-820130816", "" + sf_I + f_lM); + test("1000000null", "" + sf_I + sf_oAN); + test("100000025000000", "" + sf_I + s_I); + test("null-96.0", "" + f_oNtS + s_dM); + test("nullnull", "" + f_oNtS + s_oNtS); + test("null\u045176", "" + f_oNtS + f_strU); + test("null92", "" + f_oNtS + sf_strU2); + test("null51", "" + f_oNtS + sf_strU1); + test("nullnull", "" + f_oNtS + s_iAN); + test("null-54", "" + f_oNtS + f_bM); + test("null-87.0", "" + f_oNtS + f_fM); + test("nullnull", "" + f_oNtS + s_oAN); + test("null19", "" + f_oNtS + f_str); + test("null-41", "" + f_oNtS + sf_bM); + test("nullnull", "" + f_oNtS + sf_IN); + test("nullT", "" + f_oNtS + s_c); + test("null-42.0", "" + f_oNtS + sf_fM); + test("null25", "" + f_oNtS + s_b); + test("nullnull", "" + f_oNtS + f_oN); + test("null-1410065408", "" + f_oNtS + s_lM); + test("null8.0", "" + f_oNtS + s_d); + test("null55.0", "" + f_oNtS + s_f); + test("null97000000", "" + f_oNtS + s_i); + test("null-9900", "" + f_oNtS + f_sM); + test("null935228928", "" + f_oNtS + s_l); + test("null-8400", "" + f_oNtS + sf_sM); + test("nullC(82)", "" + f_oNtS + s_o); + test("nullnull", "" + f_oNtS + sf_oNtS); + test("nulltrue", "" + f_oNtS + s_bl); + test("null3900", "" + f_oNtS + s_s); + test("nullnull", "" + f_oNtS + sf_oN); + test("null94000000", "" + f_oNtS + f_I); + test("nullnull", "" + f_oNtS + f_IN); + test("nulltrue", "" + f_oNtS + sf_bl); + test("null5500", "" + f_oNtS + sf_s); + test("null-2900", "" + f_oNtS + s_sM); + test("null-194313216", "" + f_oNtS + sf_l); + test("null12", "" + f_oNtS + s_strU1); + test("nullC(87)", "" + f_oNtS + sf_o); + test("null91", "" + f_oNtS + s_strU2); + test("null21", "" + f_oNtS + f_strU1); + test("null18", "" + f_oNtS + f_strU2); + test("nullnull", "" + f_oNtS + f_iAN); + test("nullnull", "" + f_oNtS + s_oN); + test("null\u045180", "" + f_oNtS + s_strU); + test("nullC", "" + f_oNtS + sf_c); + test("null75", "" + f_oNtS + sf_str); + test("null-43", "" + f_oNtS + s_bM); + test("null80", "" + f_oNtS + sf_b); + test("nullnull", "" + f_oNtS + s_IN); + test("null-52.0", "" + f_oNtS + s_fM); + test("null75000000", "" + f_oNtS + sf_i); + test("null44", "" + f_oNtS + f_b); + test("null-1705032704", "" + f_oNtS + sf_lM); + test("nullnull", "" + f_oNtS + f_oAN); + test("null83.0", "" + f_oNtS + f_d); + test("nullI", "" + f_oNtS + f_c); + test("null94.0", "" + f_oNtS + f_f); + test("null12.0", "" + f_oNtS + sf_d); + test("null-99.0", "" + f_oNtS + f_dM); + test("null17.0", "" + f_oNtS + sf_f); + test("null-84.0", "" + f_oNtS + sf_dM); + test("null58000000", "" + f_oNtS + f_i); + test("null-55000000", "" + f_oNtS + f_iM); + test("null1460392448", "" + f_oNtS + f_l); + test("nullC(70)", "" + f_oNtS + f_o); + test("null\u04511", "" + f_oNtS + sf_strU); + test("null8000", "" + f_oNtS + f_s); + test("null18", "" + f_oNtS + s_str); + test("null-1000000", "" + f_oNtS + s_iM); + test("null1000000", "" + f_oNtS + sf_I); + test("nullnull", "" + f_oNtS + f_oNtS); + test("nullfalse", "" + f_oNtS + f_bl); + test("nullnull", "" + f_oNtS + sf_iAN); + test("null-2000000", "" + f_oNtS + sf_iM); + test("null-820130816", "" + f_oNtS + f_lM); + test("nullnull", "" + f_oNtS + sf_oAN); + test("null25000000", "" + f_oNtS + s_I); + test("false-96.0", "" + f_bl + s_dM); + test("falsenull", "" + f_bl + s_oNtS); + test("false\u045176", "" + f_bl + f_strU); + test("false92", "" + f_bl + sf_strU2); + test("false51", "" + f_bl + sf_strU1); + test("falsenull", "" + f_bl + s_iAN); + test("false-54", "" + f_bl + f_bM); + test("false-87.0", "" + f_bl + f_fM); + test("falsenull", "" + f_bl + s_oAN); + test("false19", "" + f_bl + f_str); + test("false-41", "" + f_bl + sf_bM); + test("falsenull", "" + f_bl + sf_IN); + test("falseT", "" + f_bl + s_c); + test("false-42.0", "" + f_bl + sf_fM); + test("false25", "" + f_bl + s_b); + test("falsenull", "" + f_bl + f_oN); + test("false-1410065408", "" + f_bl + s_lM); + test("false8.0", "" + f_bl + s_d); + test("false55.0", "" + f_bl + s_f); + test("false97000000", "" + f_bl + s_i); + test("false-9900", "" + f_bl + f_sM); + test("false935228928", "" + f_bl + s_l); + test("false-8400", "" + f_bl + sf_sM); + test("falseC(82)", "" + f_bl + s_o); + test("falsenull", "" + f_bl + sf_oNtS); + test("falsetrue", "" + f_bl + s_bl); + test("false3900", "" + f_bl + s_s); + test("falsenull", "" + f_bl + sf_oN); + test("false94000000", "" + f_bl + f_I); + test("falsenull", "" + f_bl + f_IN); + test("falsetrue", "" + f_bl + sf_bl); + test("false5500", "" + f_bl + sf_s); + test("false-2900", "" + f_bl + s_sM); + test("false-194313216", "" + f_bl + sf_l); + test("false12", "" + f_bl + s_strU1); + test("falseC(87)", "" + f_bl + sf_o); + test("false91", "" + f_bl + s_strU2); + test("false21", "" + f_bl + f_strU1); + test("false18", "" + f_bl + f_strU2); + test("falsenull", "" + f_bl + f_iAN); + test("falsenull", "" + f_bl + s_oN); + test("false\u045180", "" + f_bl + s_strU); + test("falseC", "" + f_bl + sf_c); + test("false75", "" + f_bl + sf_str); + test("false-43", "" + f_bl + s_bM); + test("false80", "" + f_bl + sf_b); + test("falsenull", "" + f_bl + s_IN); + test("false-52.0", "" + f_bl + s_fM); + test("false75000000", "" + f_bl + sf_i); + test("false44", "" + f_bl + f_b); + test("false-1705032704", "" + f_bl + sf_lM); + test("falsenull", "" + f_bl + f_oAN); + test("false83.0", "" + f_bl + f_d); + test("falseI", "" + f_bl + f_c); + test("false94.0", "" + f_bl + f_f); + test("false12.0", "" + f_bl + sf_d); + test("false-99.0", "" + f_bl + f_dM); + test("false17.0", "" + f_bl + sf_f); + test("false-84.0", "" + f_bl + sf_dM); + test("false58000000", "" + f_bl + f_i); + test("false-55000000", "" + f_bl + f_iM); + test("false1460392448", "" + f_bl + f_l); + test("falseC(70)", "" + f_bl + f_o); + test("false\u04511", "" + f_bl + sf_strU); + test("false8000", "" + f_bl + f_s); + test("false18", "" + f_bl + s_str); + test("false-1000000", "" + f_bl + s_iM); + test("false1000000", "" + f_bl + sf_I); + test("falsenull", "" + f_bl + f_oNtS); + test("falsefalse", "" + f_bl + f_bl); + test("falsenull", "" + f_bl + sf_iAN); + test("false-2000000", "" + f_bl + sf_iM); + test("false-820130816", "" + f_bl + f_lM); + test("falsenull", "" + f_bl + sf_oAN); + test("false25000000", "" + f_bl + s_I); + test("null-96.0", "" + sf_iAN + s_dM); + test("nullnull", "" + sf_iAN + s_oNtS); + test("null\u045176", "" + sf_iAN + f_strU); + test("null92", "" + sf_iAN + sf_strU2); + test("null51", "" + sf_iAN + sf_strU1); + test("nullnull", "" + sf_iAN + s_iAN); + test("null-54", "" + sf_iAN + f_bM); + test("null-87.0", "" + sf_iAN + f_fM); + test("nullnull", "" + sf_iAN + s_oAN); + test("null19", "" + sf_iAN + f_str); + test("null-41", "" + sf_iAN + sf_bM); + test("nullnull", "" + sf_iAN + sf_IN); + test("nullT", "" + sf_iAN + s_c); + test("null-42.0", "" + sf_iAN + sf_fM); + test("null25", "" + sf_iAN + s_b); + test("nullnull", "" + sf_iAN + f_oN); + test("null-1410065408", "" + sf_iAN + s_lM); + test("null8.0", "" + sf_iAN + s_d); + test("null55.0", "" + sf_iAN + s_f); + test("null97000000", "" + sf_iAN + s_i); + test("null-9900", "" + sf_iAN + f_sM); + test("null935228928", "" + sf_iAN + s_l); + test("null-8400", "" + sf_iAN + sf_sM); + test("nullC(82)", "" + sf_iAN + s_o); + test("nullnull", "" + sf_iAN + sf_oNtS); + test("nulltrue", "" + sf_iAN + s_bl); + test("null3900", "" + sf_iAN + s_s); + test("nullnull", "" + sf_iAN + sf_oN); + test("null94000000", "" + sf_iAN + f_I); + test("nullnull", "" + sf_iAN + f_IN); + test("nulltrue", "" + sf_iAN + sf_bl); + test("null5500", "" + sf_iAN + sf_s); + test("null-2900", "" + sf_iAN + s_sM); + test("null-194313216", "" + sf_iAN + sf_l); + test("null12", "" + sf_iAN + s_strU1); + test("nullC(87)", "" + sf_iAN + sf_o); + test("null91", "" + sf_iAN + s_strU2); + test("null21", "" + sf_iAN + f_strU1); + test("null18", "" + sf_iAN + f_strU2); + test("nullnull", "" + sf_iAN + f_iAN); + test("nullnull", "" + sf_iAN + s_oN); + test("null\u045180", "" + sf_iAN + s_strU); + test("nullC", "" + sf_iAN + sf_c); + test("null75", "" + sf_iAN + sf_str); + test("null-43", "" + sf_iAN + s_bM); + test("null80", "" + sf_iAN + sf_b); + test("nullnull", "" + sf_iAN + s_IN); + test("null-52.0", "" + sf_iAN + s_fM); + test("null75000000", "" + sf_iAN + sf_i); + test("null44", "" + sf_iAN + f_b); + test("null-1705032704", "" + sf_iAN + sf_lM); + test("nullnull", "" + sf_iAN + f_oAN); + test("null83.0", "" + sf_iAN + f_d); + test("nullI", "" + sf_iAN + f_c); + test("null94.0", "" + sf_iAN + f_f); + test("null12.0", "" + sf_iAN + sf_d); + test("null-99.0", "" + sf_iAN + f_dM); + test("null17.0", "" + sf_iAN + sf_f); + test("null-84.0", "" + sf_iAN + sf_dM); + test("null58000000", "" + sf_iAN + f_i); + test("null-55000000", "" + sf_iAN + f_iM); + test("null1460392448", "" + sf_iAN + f_l); + test("nullC(70)", "" + sf_iAN + f_o); + test("null\u04511", "" + sf_iAN + sf_strU); + test("null8000", "" + sf_iAN + f_s); + test("null18", "" + sf_iAN + s_str); + test("null-1000000", "" + sf_iAN + s_iM); + test("null1000000", "" + sf_iAN + sf_I); + test("nullnull", "" + sf_iAN + f_oNtS); + test("nullfalse", "" + sf_iAN + f_bl); + test("nullnull", "" + sf_iAN + sf_iAN); + test("null-2000000", "" + sf_iAN + sf_iM); + test("null-820130816", "" + sf_iAN + f_lM); + test("nullnull", "" + sf_iAN + sf_oAN); + test("null25000000", "" + sf_iAN + s_I); + test("-2000000-96.0", "" + sf_iM + s_dM); + test("-2000000null", "" + sf_iM + s_oNtS); + test("-2000000\u045176", "" + sf_iM + f_strU); + test("-200000092", "" + sf_iM + sf_strU2); + test("-200000051", "" + sf_iM + sf_strU1); + test("-2000000null", "" + sf_iM + s_iAN); + test("-2000000-54", "" + sf_iM + f_bM); + test("-2000000-87.0", "" + sf_iM + f_fM); + test("-2000000null", "" + sf_iM + s_oAN); + test("-200000019", "" + sf_iM + f_str); + test("-2000000-41", "" + sf_iM + sf_bM); + test("-2000000null", "" + sf_iM + sf_IN); + test("-2000000T", "" + sf_iM + s_c); + test("-2000000-42.0", "" + sf_iM + sf_fM); + test("-200000025", "" + sf_iM + s_b); + test("-2000000null", "" + sf_iM + f_oN); + test("-2000000-1410065408", "" + sf_iM + s_lM); + test("-20000008.0", "" + sf_iM + s_d); + test("-200000055.0", "" + sf_iM + s_f); + test("-200000097000000", "" + sf_iM + s_i); + test("-2000000-9900", "" + sf_iM + f_sM); + test("-2000000935228928", "" + sf_iM + s_l); + test("-2000000-8400", "" + sf_iM + sf_sM); + test("-2000000C(82)", "" + sf_iM + s_o); + test("-2000000null", "" + sf_iM + sf_oNtS); + test("-2000000true", "" + sf_iM + s_bl); + test("-20000003900", "" + sf_iM + s_s); + test("-2000000null", "" + sf_iM + sf_oN); + test("-200000094000000", "" + sf_iM + f_I); + test("-2000000null", "" + sf_iM + f_IN); + test("-2000000true", "" + sf_iM + sf_bl); + test("-20000005500", "" + sf_iM + sf_s); + test("-2000000-2900", "" + sf_iM + s_sM); + test("-2000000-194313216", "" + sf_iM + sf_l); + test("-200000012", "" + sf_iM + s_strU1); + test("-2000000C(87)", "" + sf_iM + sf_o); + test("-200000091", "" + sf_iM + s_strU2); + test("-200000021", "" + sf_iM + f_strU1); + test("-200000018", "" + sf_iM + f_strU2); + test("-2000000null", "" + sf_iM + f_iAN); + test("-2000000null", "" + sf_iM + s_oN); + test("-2000000\u045180", "" + sf_iM + s_strU); + test("-2000000C", "" + sf_iM + sf_c); + test("-200000075", "" + sf_iM + sf_str); + test("-2000000-43", "" + sf_iM + s_bM); + test("-200000080", "" + sf_iM + sf_b); + test("-2000000null", "" + sf_iM + s_IN); + test("-2000000-52.0", "" + sf_iM + s_fM); + test("-200000075000000", "" + sf_iM + sf_i); + test("-200000044", "" + sf_iM + f_b); + test("-2000000-1705032704", "" + sf_iM + sf_lM); + test("-2000000null", "" + sf_iM + f_oAN); + test("-200000083.0", "" + sf_iM + f_d); + test("-2000000I", "" + sf_iM + f_c); + test("-200000094.0", "" + sf_iM + f_f); + test("-200000012.0", "" + sf_iM + sf_d); + test("-2000000-99.0", "" + sf_iM + f_dM); + test("-200000017.0", "" + sf_iM + sf_f); + test("-2000000-84.0", "" + sf_iM + sf_dM); + test("-200000058000000", "" + sf_iM + f_i); + test("-2000000-55000000", "" + sf_iM + f_iM); + test("-20000001460392448", "" + sf_iM + f_l); + test("-2000000C(70)", "" + sf_iM + f_o); + test("-2000000\u04511", "" + sf_iM + sf_strU); + test("-20000008000", "" + sf_iM + f_s); + test("-200000018", "" + sf_iM + s_str); + test("-2000000-1000000", "" + sf_iM + s_iM); + test("-20000001000000", "" + sf_iM + sf_I); + test("-2000000null", "" + sf_iM + f_oNtS); + test("-2000000false", "" + sf_iM + f_bl); + test("-2000000null", "" + sf_iM + sf_iAN); + test("-2000000-2000000", "" + sf_iM + sf_iM); + test("-2000000-820130816", "" + sf_iM + f_lM); + test("-2000000null", "" + sf_iM + sf_oAN); + test("-200000025000000", "" + sf_iM + s_I); + test("-820130816-96.0", "" + f_lM + s_dM); + test("-820130816null", "" + f_lM + s_oNtS); + test("-820130816\u045176", "" + f_lM + f_strU); + test("-82013081692", "" + f_lM + sf_strU2); + test("-82013081651", "" + f_lM + sf_strU1); + test("-820130816null", "" + f_lM + s_iAN); + test("-820130816-54", "" + f_lM + f_bM); + test("-820130816-87.0", "" + f_lM + f_fM); + test("-820130816null", "" + f_lM + s_oAN); + test("-82013081619", "" + f_lM + f_str); + test("-820130816-41", "" + f_lM + sf_bM); + test("-820130816null", "" + f_lM + sf_IN); + test("-820130816T", "" + f_lM + s_c); + test("-820130816-42.0", "" + f_lM + sf_fM); + test("-82013081625", "" + f_lM + s_b); + test("-820130816null", "" + f_lM + f_oN); + test("-820130816-1410065408", "" + f_lM + s_lM); + test("-8201308168.0", "" + f_lM + s_d); + test("-82013081655.0", "" + f_lM + s_f); + test("-82013081697000000", "" + f_lM + s_i); + test("-820130816-9900", "" + f_lM + f_sM); + test("-820130816935228928", "" + f_lM + s_l); + test("-820130816-8400", "" + f_lM + sf_sM); + test("-820130816C(82)", "" + f_lM + s_o); + test("-820130816null", "" + f_lM + sf_oNtS); + test("-820130816true", "" + f_lM + s_bl); + test("-8201308163900", "" + f_lM + s_s); + test("-820130816null", "" + f_lM + sf_oN); + test("-82013081694000000", "" + f_lM + f_I); + test("-820130816null", "" + f_lM + f_IN); + test("-820130816true", "" + f_lM + sf_bl); + test("-8201308165500", "" + f_lM + sf_s); + test("-820130816-2900", "" + f_lM + s_sM); + test("-820130816-194313216", "" + f_lM + sf_l); + test("-82013081612", "" + f_lM + s_strU1); + test("-820130816C(87)", "" + f_lM + sf_o); + test("-82013081691", "" + f_lM + s_strU2); + test("-82013081621", "" + f_lM + f_strU1); + test("-82013081618", "" + f_lM + f_strU2); + test("-820130816null", "" + f_lM + f_iAN); + test("-820130816null", "" + f_lM + s_oN); + test("-820130816\u045180", "" + f_lM + s_strU); + test("-820130816C", "" + f_lM + sf_c); + test("-82013081675", "" + f_lM + sf_str); + test("-820130816-43", "" + f_lM + s_bM); + test("-82013081680", "" + f_lM + sf_b); + test("-820130816null", "" + f_lM + s_IN); + test("-820130816-52.0", "" + f_lM + s_fM); + test("-82013081675000000", "" + f_lM + sf_i); + test("-82013081644", "" + f_lM + f_b); + test("-820130816-1705032704", "" + f_lM + sf_lM); + test("-820130816null", "" + f_lM + f_oAN); + test("-82013081683.0", "" + f_lM + f_d); + test("-820130816I", "" + f_lM + f_c); + test("-82013081694.0", "" + f_lM + f_f); + test("-82013081612.0", "" + f_lM + sf_d); + test("-820130816-99.0", "" + f_lM + f_dM); + test("-82013081617.0", "" + f_lM + sf_f); + test("-820130816-84.0", "" + f_lM + sf_dM); + test("-82013081658000000", "" + f_lM + f_i); + test("-820130816-55000000", "" + f_lM + f_iM); + test("-8201308161460392448", "" + f_lM + f_l); + test("-820130816C(70)", "" + f_lM + f_o); + test("-820130816\u04511", "" + f_lM + sf_strU); + test("-8201308168000", "" + f_lM + f_s); + test("-82013081618", "" + f_lM + s_str); + test("-820130816-1000000", "" + f_lM + s_iM); + test("-8201308161000000", "" + f_lM + sf_I); + test("-820130816null", "" + f_lM + f_oNtS); + test("-820130816false", "" + f_lM + f_bl); + test("-820130816null", "" + f_lM + sf_iAN); + test("-820130816-2000000", "" + f_lM + sf_iM); + test("-820130816-820130816", "" + f_lM + f_lM); + test("-820130816null", "" + f_lM + sf_oAN); + test("-82013081625000000", "" + f_lM + s_I); + test("null-96.0", "" + sf_oAN + s_dM); + test("nullnull", "" + sf_oAN + s_oNtS); + test("null\u045176", "" + sf_oAN + f_strU); + test("null92", "" + sf_oAN + sf_strU2); + test("null51", "" + sf_oAN + sf_strU1); + test("nullnull", "" + sf_oAN + s_iAN); + test("null-54", "" + sf_oAN + f_bM); + test("null-87.0", "" + sf_oAN + f_fM); + test("nullnull", "" + sf_oAN + s_oAN); + test("null19", "" + sf_oAN + f_str); + test("null-41", "" + sf_oAN + sf_bM); + test("nullnull", "" + sf_oAN + sf_IN); + test("nullT", "" + sf_oAN + s_c); + test("null-42.0", "" + sf_oAN + sf_fM); + test("null25", "" + sf_oAN + s_b); + test("nullnull", "" + sf_oAN + f_oN); + test("null-1410065408", "" + sf_oAN + s_lM); + test("null8.0", "" + sf_oAN + s_d); + test("null55.0", "" + sf_oAN + s_f); + test("null97000000", "" + sf_oAN + s_i); + test("null-9900", "" + sf_oAN + f_sM); + test("null935228928", "" + sf_oAN + s_l); + test("null-8400", "" + sf_oAN + sf_sM); + test("nullC(82)", "" + sf_oAN + s_o); + test("nullnull", "" + sf_oAN + sf_oNtS); + test("nulltrue", "" + sf_oAN + s_bl); + test("null3900", "" + sf_oAN + s_s); + test("nullnull", "" + sf_oAN + sf_oN); + test("null94000000", "" + sf_oAN + f_I); + test("nullnull", "" + sf_oAN + f_IN); + test("nulltrue", "" + sf_oAN + sf_bl); + test("null5500", "" + sf_oAN + sf_s); + test("null-2900", "" + sf_oAN + s_sM); + test("null-194313216", "" + sf_oAN + sf_l); + test("null12", "" + sf_oAN + s_strU1); + test("nullC(87)", "" + sf_oAN + sf_o); + test("null91", "" + sf_oAN + s_strU2); + test("null21", "" + sf_oAN + f_strU1); + test("null18", "" + sf_oAN + f_strU2); + test("nullnull", "" + sf_oAN + f_iAN); + test("nullnull", "" + sf_oAN + s_oN); + test("null\u045180", "" + sf_oAN + s_strU); + test("nullC", "" + sf_oAN + sf_c); + test("null75", "" + sf_oAN + sf_str); + test("null-43", "" + sf_oAN + s_bM); + test("null80", "" + sf_oAN + sf_b); + test("nullnull", "" + sf_oAN + s_IN); + test("null-52.0", "" + sf_oAN + s_fM); + test("null75000000", "" + sf_oAN + sf_i); + test("null44", "" + sf_oAN + f_b); + test("null-1705032704", "" + sf_oAN + sf_lM); + test("nullnull", "" + sf_oAN + f_oAN); + test("null83.0", "" + sf_oAN + f_d); + test("nullI", "" + sf_oAN + f_c); + test("null94.0", "" + sf_oAN + f_f); + test("null12.0", "" + sf_oAN + sf_d); + test("null-99.0", "" + sf_oAN + f_dM); + test("null17.0", "" + sf_oAN + sf_f); + test("null-84.0", "" + sf_oAN + sf_dM); + test("null58000000", "" + sf_oAN + f_i); + test("null-55000000", "" + sf_oAN + f_iM); + test("null1460392448", "" + sf_oAN + f_l); + test("nullC(70)", "" + sf_oAN + f_o); + test("null\u04511", "" + sf_oAN + sf_strU); + test("null8000", "" + sf_oAN + f_s); + test("null18", "" + sf_oAN + s_str); + test("null-1000000", "" + sf_oAN + s_iM); + test("null1000000", "" + sf_oAN + sf_I); + test("nullnull", "" + sf_oAN + f_oNtS); + test("nullfalse", "" + sf_oAN + f_bl); + test("nullnull", "" + sf_oAN + sf_iAN); + test("null-2000000", "" + sf_oAN + sf_iM); + test("null-820130816", "" + sf_oAN + f_lM); + test("nullnull", "" + sf_oAN + sf_oAN); + test("null25000000", "" + sf_oAN + s_I); + test("25000000-96.0", "" + s_I + s_dM); + test("25000000null", "" + s_I + s_oNtS); + test("25000000\u045176", "" + s_I + f_strU); + test("2500000092", "" + s_I + sf_strU2); + test("2500000051", "" + s_I + sf_strU1); + test("25000000null", "" + s_I + s_iAN); + test("25000000-54", "" + s_I + f_bM); + test("25000000-87.0", "" + s_I + f_fM); + test("25000000null", "" + s_I + s_oAN); + test("2500000019", "" + s_I + f_str); + test("25000000-41", "" + s_I + sf_bM); + test("25000000null", "" + s_I + sf_IN); + test("25000000T", "" + s_I + s_c); + test("25000000-42.0", "" + s_I + sf_fM); + test("2500000025", "" + s_I + s_b); + test("25000000null", "" + s_I + f_oN); + test("25000000-1410065408", "" + s_I + s_lM); + test("250000008.0", "" + s_I + s_d); + test("2500000055.0", "" + s_I + s_f); + test("2500000097000000", "" + s_I + s_i); + test("25000000-9900", "" + s_I + f_sM); + test("25000000935228928", "" + s_I + s_l); + test("25000000-8400", "" + s_I + sf_sM); + test("25000000C(82)", "" + s_I + s_o); + test("25000000null", "" + s_I + sf_oNtS); + test("25000000true", "" + s_I + s_bl); + test("250000003900", "" + s_I + s_s); + test("25000000null", "" + s_I + sf_oN); + test("2500000094000000", "" + s_I + f_I); + test("25000000null", "" + s_I + f_IN); + test("25000000true", "" + s_I + sf_bl); + test("250000005500", "" + s_I + sf_s); + test("25000000-2900", "" + s_I + s_sM); + test("25000000-194313216", "" + s_I + sf_l); + test("2500000012", "" + s_I + s_strU1); + test("25000000C(87)", "" + s_I + sf_o); + test("2500000091", "" + s_I + s_strU2); + test("2500000021", "" + s_I + f_strU1); + test("2500000018", "" + s_I + f_strU2); + test("25000000null", "" + s_I + f_iAN); + test("25000000null", "" + s_I + s_oN); + test("25000000\u045180", "" + s_I + s_strU); + test("25000000C", "" + s_I + sf_c); + test("2500000075", "" + s_I + sf_str); + test("25000000-43", "" + s_I + s_bM); + test("2500000080", "" + s_I + sf_b); + test("25000000null", "" + s_I + s_IN); + test("25000000-52.0", "" + s_I + s_fM); + test("2500000075000000", "" + s_I + sf_i); + test("2500000044", "" + s_I + f_b); + test("25000000-1705032704", "" + s_I + sf_lM); + test("25000000null", "" + s_I + f_oAN); + test("2500000083.0", "" + s_I + f_d); + test("25000000I", "" + s_I + f_c); + test("2500000094.0", "" + s_I + f_f); + test("2500000012.0", "" + s_I + sf_d); + test("25000000-99.0", "" + s_I + f_dM); + test("2500000017.0", "" + s_I + sf_f); + test("25000000-84.0", "" + s_I + sf_dM); + test("2500000058000000", "" + s_I + f_i); + test("25000000-55000000", "" + s_I + f_iM); + test("250000001460392448", "" + s_I + f_l); + test("25000000C(70)", "" + s_I + f_o); + test("25000000\u04511", "" + s_I + sf_strU); + test("250000008000", "" + s_I + f_s); + test("2500000018", "" + s_I + s_str); + test("25000000-1000000", "" + s_I + s_iM); + test("250000001000000", "" + s_I + sf_I); + test("25000000null", "" + s_I + f_oNtS); + test("25000000false", "" + s_I + f_bl); + test("25000000null", "" + s_I + sf_iAN); + test("25000000-2000000", "" + s_I + sf_iM); + test("25000000-820130816", "" + s_I + f_lM); + test("25000000null", "" + s_I + sf_oAN); + test("2500000025000000", "" + s_I + s_I); + } + +} diff --git a/jdk/test/java/lang/String/concat/ImplicitStringConcatShapesTestGen.java b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapesTestGen.java new file mode 100644 index 00000000000..8b42e4607e4 --- /dev/null +++ b/jdk/test/java/lang/String/concat/ImplicitStringConcatShapesTestGen.java @@ -0,0 +1,313 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import java.io.PrintWriter; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.*; + +public class ImplicitStringConcatShapesTestGen { + public static String escapeToUnicode(String str) { + StringBuilder b = new StringBuilder(); + for (char c : str.toCharArray()) { + if (c < 128) { + b.append(c); + } else { + b.append("\\u").append(String.format("%04X", (int) c)); + } + } + return b.toString(); + } + + public static void main(String... args) throws IOException { + PrintWriter pw = new PrintWriter(System.out); + + String[] types = { + "boolean", + "byte", + "byteMinus", + "char", + "short", + "shortMinus", + "int", + "intMinus", + "integer", + "integerNull", + "float", + "floatMinus", + "long", + "longMinus", + "double", + "doubleMinus", + "object", + "objectNull", + "objectNullToString", + "String", + "StringUTF16", + "StringU1", + "StringU2", + "intArrayNull", + "objectArrayNull", + }; + + for (String t : Files.readAllLines(Paths.get("ImplicitStringConcatShapes-head.template"))) { + pw.println(t); + } + + Map values = new HashMap<>(); + + Random current = new Random(12345); + for (int mode = 0; mode <= 2; mode++) { + for (String type : types) { + int i = current.nextInt(100); + boolean isStatic = (mode | 1) == 1; + boolean isFinal = (mode | 2) == 2; + String fieldName = (isStatic ? "s" : "") + (isFinal ? "f" : "") + "_" + typeSig(type); + String value = initValue(type, i); + String stringValue = stringValue(type, i); + values.put(fieldName, stringValue); + pw.printf(" %s %s %s %s = %s;%n", isStatic ? "static" : "", isFinal ? "final" : "", typeValue(type, i), fieldName, value); + } + } + + pw.println(); + + List lines = new ArrayList<>(); + List l = new ArrayList<>(values.keySet()); + + for (String l1 : l) { + lines.add(String.format("test(\"%s\", \"\" + %s);", + escapeToUnicode(values.get(l1)), + l1 + )); + } + + for (String l1 : l) { + for (String l2 : l) { + lines.add(String.format("test(\"%s\", \"\" + %s + %s);", + escapeToUnicode(values.get(l1) + values.get(l2)), + l1, l2 + )); + } + } + + final int STRIDE = 1000; + int strides = lines.size() / STRIDE + 1; + + pw.println(" public void run() {"); + for (int c = 0; c < strides; c++) { + pw.println(" run" + c + "();"); + } + pw.println(" }"); + pw.println(); + + for (int c = 0; c < strides; c++) { + pw.println(" public void run" + c + "() {"); + for (String line : lines.subList(c * STRIDE, Math.min(lines.size(), (c+1) * STRIDE))) { + pw.println(" " + line); + } + pw.println(" }"); + pw.println(); + } + + pw.println("}"); + + pw.flush(); + pw.close(); + } + + private static String typeSig(String type) { + switch (type) { + case "boolean": return "bl"; + case "byte": return "b"; + case "byteMinus": return "bM"; + case "short": return "s"; + case "shortMinus": return "sM"; + case "char": return "c"; + case "int": return "i"; + case "intMinus": return "iM"; + case "integer": return "I"; + case "integerNull": return "IN"; + case "float": return "f"; + case "floatMinus": return "fM"; + case "long": return "l"; + case "longMinus": return "lM"; + case "double": return "d"; + case "doubleMinus": return "dM"; + case "String": return "str"; + case "StringUTF16": return "strU"; + case "StringU1": return "strU1"; + case "StringU2": return "strU2"; + case "object": return "o"; + case "objectNull": return "oN"; + case "objectNullToString": return "oNtS"; + case "intArrayNull": return "iAN"; + case "objectArrayNull": return "oAN"; + default: + throw new IllegalStateException(); + } + } + + private static String typeValue(String type, int i) { + switch (type) { + case "boolean": + case "byte": + case "byteMinus": + case "char": + case "short": + case "shortMinus": + case "int": + case "intMinus": + case "float": + case "floatMinus": + case "long": + case "longMinus": + case "double": + case "doubleMinus": + return type.replace("Minus", ""); + case "String": + case "StringUTF16": + case "StringU1": + case "StringU2": + return "String"; + case "object": + case "objectNull": + case "objectNullToString": + return "Object"; + case "integer": + case "integerNull": + return "Integer"; + case "intArrayNull": + return "int[]"; + case "objectArrayNull": + return "Object[]"; + default: + throw new IllegalStateException(); + } + } + + private static String initValue(String type, int i) { + switch (type) { + case "boolean": + return String.valueOf((i & 1) == 1); + case "byte": + return String.valueOf(i); + case "byteMinus": + return String.valueOf(-i); + case "short": + return String.valueOf(i*100); + case "shortMinus": + return String.valueOf(-i*100); + case "intMinus": + return String.valueOf(-i*1_000_000); + case "int": + case "integer": + return String.valueOf(i*1_000_000); + case "long": + return String.valueOf(i*1_000_000_000) + "L"; + case "longMinus": + return String.valueOf(-i*1_000_000_000) + "L"; + case "char": + return "'" + (char)(i % 26 + 65) + "'"; + case "double": + return String.valueOf(i) + ".0d"; + case "doubleMinus": + return "-" + String.valueOf(i) + ".0d"; + case "float": + return String.valueOf(i) + ".0f"; + case "floatMinus": + return "-" + String.valueOf(i) + ".0f"; + case "object": + return "new MyClass(" + i + ")"; + case "objectNullToString": + return "new MyClassNullToString()"; + case "integerNull": + case "objectNull": + case "intArrayNull": + case "objectArrayNull": + return "null"; + case "String": + return "\"" + i + "\""; + case "StringUTF16": + return "\"\\u0451" + i + "\""; + case "StringU1": + return "\"\\u0001" + i + "\""; + case "StringU2": + return "\"\\u0002" + i + "\""; + default: + throw new IllegalStateException(); + } + } + + private static String stringValue(String type, int i) { + switch (type) { + case "boolean": + return String.valueOf((i & 1) == 1); + case "byte": + return String.valueOf(i); + case "byteMinus": + return String.valueOf(-i); + case "short": + return String.valueOf(i*100); + case "shortMinus": + return String.valueOf(-i*100); + case "intMinus": + return String.valueOf(-i*1_000_000); + case "int": + case "integer": + return String.valueOf(i*1_000_000); + case "long": + return String.valueOf(i*1_000_000_000); + case "longMinus": + return String.valueOf(-i*1_000_000_000); + case "char": + return String.valueOf((char) (i % 26 + 65)); + case "double": + case "float": + return String.valueOf(i) + ".0"; + case "doubleMinus": + case "floatMinus": + return "-" + String.valueOf(i) + ".0"; + case "object": + return "C(" + i + ")"; + case "integerNull": + case "objectNull": + case "objectNullToString": + case "intArrayNull": + case "objectArrayNull": + return "null"; + case "String": + return "" + i; + case "StringUTF16": + return "\u0451" + i; + case "StringU1": + return "\u0001" + i; + case "StringU2": + return "\u0002" + i; + default: + throw new IllegalStateException(); + } + } + +} diff --git a/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java b/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java new file mode 100644 index 00000000000..e1a3e8085c6 --- /dev/null +++ b/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.Serializable; +import java.lang.invoke.*; +import java.util.concurrent.Callable; + +/** + * @test + * @summary Test input invariants for StringConcatFactory + * + * @compile StringConcatFactoryInvariants.java + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT StringConcatFactoryInvariants + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true StringConcatFactoryInvariants + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * @run main/othervm -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true StringConcatFactoryInvariants + * +*/ +public class StringConcatFactoryInvariants { + + private static final char TAG_ARG = '\u0001'; + private static final char TAG_CONST = '\u0002'; + + public static void main(String[] args) throws Throwable { + MethodHandles.Lookup lookup = MethodHandles.publicLookup(); + String methodName = "foo"; + MethodType mt = MethodType.methodType(String.class, String.class, int.class); + String recipe = "" + TAG_ARG + TAG_ARG + TAG_CONST; + String[] constants = new String[]{"bar"}; + + final int LIMIT = 200; + + // Simple factory: check for dynamic arguments overflow + Class[] underThreshold = new Class[LIMIT - 1]; + Class[] threshold = new Class[LIMIT]; + Class[] overThreshold = new Class[LIMIT + 1]; + + StringBuilder sbUnderThreshold = new StringBuilder(); + sbUnderThreshold.append(TAG_CONST); + for (int c = 0; c < LIMIT - 1; c++) { + underThreshold[c] = int.class; + threshold[c] = int.class; + overThreshold[c] = int.class; + sbUnderThreshold.append(TAG_ARG); + } + threshold[LIMIT - 1] = int.class; + overThreshold[LIMIT - 1] = int.class; + overThreshold[LIMIT] = int.class; + + String recipeEmpty = ""; + String recipeUnderThreshold = sbUnderThreshold.toString(); + String recipeThreshold = sbUnderThreshold.append(TAG_ARG).toString(); + String recipeOverThreshold = sbUnderThreshold.append(TAG_ARG).toString(); + + MethodType mtEmpty = MethodType.methodType(String.class); + MethodType mtUnderThreshold = MethodType.methodType(String.class, underThreshold); + MethodType mtThreshold = MethodType.methodType(String.class, threshold); + MethodType mtOverThreshold = MethodType.methodType(String.class, overThreshold); + + + // Check the basic functionality is working + { + CallSite cs = StringConcatFactory.makeConcat(lookup, methodName, mt); + test("foo42", (String) cs.getTarget().invokeExact("foo", 42)); + } + + { + CallSite cs = StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, constants); + test("foo42bar", (String) cs.getTarget().invokeExact("foo", 42)); + } + + // Simple factory, check for nulls: + failNPE("Lookup is null", + () -> StringConcatFactory.makeConcat(null, methodName, mt)); + + failNPE("Method name is null", + () -> StringConcatFactory.makeConcat(lookup, null, mt)); + + failNPE("MethodType is null", + () -> StringConcatFactory.makeConcat(lookup, methodName, null)); + + // Advanced factory, check for nulls: + failNPE("Lookup is null", + () -> StringConcatFactory.makeConcatWithConstants(null, methodName, mt, recipe, constants)); + + failNPE("Method name is null", + () -> StringConcatFactory.makeConcatWithConstants(lookup, null, mt, recipe, constants)); + + failNPE("MethodType is null", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, null, recipe, constants)); + + failNPE("Recipe is null", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, null, constants)); + + failNPE("Constants vararg is null", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mt, recipe, null)); + + // Simple factory, check for return type + fail("Return type: void", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(void.class, String.class, int.class))); + + fail("Return type: int", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(int.class, String.class, int.class))); + + fail("Return type: StringBuilder", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(StringBuilder.class, String.class, int.class))); + + ok("Return type: Object", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(Object.class, String.class, int.class))); + + ok("Return type: CharSequence", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(CharSequence.class, String.class, int.class))); + + ok("Return type: Serializable", + () -> StringConcatFactory.makeConcat(lookup, methodName, MethodType.methodType(Serializable.class, String.class, int.class))); + + // Advanced factory, check for return types + fail("Return type: void", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(void.class, String.class, int.class), recipe, constants)); + + fail("Return type: int", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(int.class, String.class, int.class), recipe, constants)); + + fail("Return type: StringBuilder", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(StringBuilder.class, String.class, int.class), recipe, constants)); + + ok("Return type: Object", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Object.class, String.class, int.class), recipe, constants)); + + ok("Return type: CharSequence", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(CharSequence.class, String.class, int.class), recipe, constants)); + + ok("Return type: Serializable", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(Serializable.class, String.class, int.class), recipe, constants)); + + // Simple factory: check for dynamic arguments overflow + ok("Dynamic arguments is under limit", + () -> StringConcatFactory.makeConcat(lookup, methodName, mtUnderThreshold)); + + ok("Dynamic arguments is at the limit", + () -> StringConcatFactory.makeConcat(lookup, methodName, mtThreshold)); + + fail("Dynamic arguments is over the limit", + () -> StringConcatFactory.makeConcat(lookup, methodName, mtOverThreshold)); + + // Advanced factory: check for dynamic arguments overflow + ok("Dynamic arguments is under limit", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtUnderThreshold, recipeUnderThreshold, constants)); + + ok("Dynamic arguments is at the limit", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants)); + + fail("Dynamic arguments is over the limit", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtOverThreshold, recipeOverThreshold, constants)); + + // Advanced factory: check for mismatched recipe and Constants + ok("Static arguments and recipe match", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, "bar")); + + fail("Static arguments and recipe mismatch", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, "bar", "baz")); + + // Advanced factory: check for mismatched recipe and dynamic arguments + fail("Dynamic arguments and recipe mismatch", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeUnderThreshold, constants)); + + ok("Dynamic arguments and recipe match", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeThreshold, constants)); + + fail("Dynamic arguments and recipe mismatch", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtThreshold, recipeOverThreshold, constants)); + + // Test passing array as constant + { + String[] arg = {"boo", "bar"}; + + CallSite cs1 = StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST + TAG_CONST, arg); + test("42boobar", (String) cs1.getTarget().invokeExact(42)); + } + + // Test passing null constant + ok("Can pass regular constants", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST, "foo")); + + failNPE("Cannot pass null constants", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, MethodType.methodType(String.class, int.class), "" + TAG_ARG + TAG_CONST, new String[]{null})); + + // Simple factory: test empty arguments + ok("Ok to pass empty arguments", + () -> StringConcatFactory.makeConcat(lookup, methodName, mtEmpty)); + + // Advanced factory: test empty arguments + ok("Ok to pass empty arguments", + () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtEmpty, recipeEmpty)); + } + + public static void ok(String msg, Callable runnable) { + try { + runnable.call(); + } catch (Throwable e) { + e.printStackTrace(); + throw new IllegalStateException(msg + ", should have passed", e); + } + } + + public static void fail(String msg, Callable runnable) { + boolean expected = false; + try { + runnable.call(); + } catch (StringConcatException e) { + expected = true; + } catch (Throwable e) { + e.printStackTrace(); + } + + if (!expected) { + throw new IllegalStateException(msg + ", should have failed with StringConcatException"); + } + } + + + public static void failNPE(String msg, Callable runnable) { + boolean expected = false; + try { + runnable.call(); + } catch (NullPointerException e) { + expected = true; + } catch (Throwable e) { + e.printStackTrace(); + } + + if (!expected) { + throw new IllegalStateException(msg + ", should have failed with NullPointerException"); + } + } + + public static void test(String expected, String actual) { + // Fingers crossed: String concat should work. + if (!expected.equals(actual)) { + StringBuilder sb = new StringBuilder(); + sb.append("Expected = "); + sb.append(expected); + sb.append(", actual = "); + sb.append(actual); + throw new IllegalStateException(sb.toString()); + } + } + +} diff --git a/jdk/test/java/lang/String/concat/update-tests.sh b/jdk/test/java/lang/String/concat/update-tests.sh new file mode 100644 index 00000000000..533d6e8f0da --- /dev/null +++ b/jdk/test/java/lang/String/concat/update-tests.sh @@ -0,0 +1,26 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. + +#!/bin/bash + +javac ImplicitStringConcatShapesTestGen.java +java ImplicitStringConcatShapesTestGen > ImplicitStringConcatShapes.java +rm ImplicitStringConcatShapesTestGen.class diff --git a/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java b/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java index 7740d5f46ff..6bde4204615 100644 --- a/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java +++ b/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java @@ -28,7 +28,7 @@ * @compile InvokeDynamicPrintArgs.java * @run main/othervm * indify.Indify - * --verify-specifier-count=3 + * --verify-specifier-count=8 * --expand-properties --classpath ${test.classes} * --java test.java.lang.invoke.InvokeDynamicPrintArgs --check-output * @run main/othervm diff --git a/jdk/test/java/lang/invoke/MethodHandleConstants.java b/jdk/test/java/lang/invoke/MethodHandleConstants.java index 57e041ba7bb..5f64e696ef1 100644 --- a/jdk/test/java/lang/invoke/MethodHandleConstants.java +++ b/jdk/test/java/lang/invoke/MethodHandleConstants.java @@ -28,7 +28,7 @@ * @compile MethodHandleConstants.java * @run main/othervm * indify.Indify - * --verify-specifier-count=0 + * --verify-specifier-count=4 * --expand-properties --classpath ${test.classes} * --java test.java.lang.invoke.MethodHandleConstants --check-output * @run main/othervm From 6583a4c652bf9d99143d7bbe6ec9ba3f7eecb010 Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Thu, 12 Nov 2015 17:56:29 -0800 Subject: [PATCH 13/17] 8035473: [javadoc] Revamp the existing Doclet APIs 8146529: Update the new Doclet API 8146427: "-nohelp" option issue 8146475: "-helpfile" option issue Reviewed-by: alanb, bpatel, ihse, jjg, jlahoda, mchung, ogb, vromero --- jdk/make/launcher/Launcher-jdk.javadoc.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/make/launcher/Launcher-jdk.javadoc.gmk b/jdk/make/launcher/Launcher-jdk.javadoc.gmk index 5922c40d8da..afdb687b0ab 100644 --- a/jdk/make/launcher/Launcher-jdk.javadoc.gmk +++ b/jdk/make/launcher/Launcher-jdk.javadoc.gmk @@ -26,7 +26,7 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, javadoc, \ - MAIN_CLASS := com.sun.tools.javadoc.Main, \ + MAIN_CLASS := jdk.javadoc.internal.tool.Main, \ CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS \ -DNEVER_ACT_AS_SERVER_CLASS_MACHINE, \ )) From 6d31a8bc6581848a6cc2c5663f69107281686b9f Mon Sep 17 00:00:00 2001 From: Kishor Kharbas Date: Thu, 7 Jan 2016 16:03:25 -0800 Subject: [PATCH 14/17] 8135250: Replace custom check/range functionality with check index/range methods in java.util.Objects Reviewed-by: jrose, kvn --- .../com/sun/crypto/provider/AESCrypt.java | 28 +++---------------- .../com/sun/crypto/provider/CounterMode.java | 24 ++-------------- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java index 21acfccded0..4556e0242ef 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java @@ -351,8 +351,8 @@ final class AESCrypt extends SymmetricCipher implements AESConstants */ void encryptBlock(byte[] in, int inOffset, byte[] out, int outOffset) { - cryptBlockCheck(in, inOffset); - cryptBlockCheck(out, outOffset); + Objects.checkFromIndexSize(inOffset, AES_BLOCK_SIZE, in.length); + Objects.checkFromIndexSize(outOffset, AES_BLOCK_SIZE, out.length); implEncryptBlock(in, inOffset, out, outOffset); } @@ -430,8 +430,8 @@ final class AESCrypt extends SymmetricCipher implements AESConstants */ void decryptBlock(byte[] in, int inOffset, byte[] out, int outOffset) { - cryptBlockCheck(in, inOffset); - cryptBlockCheck(out, outOffset); + Objects.checkFromIndexSize(inOffset, AES_BLOCK_SIZE, in.length); + Objects.checkFromIndexSize(outOffset, AES_BLOCK_SIZE, out.length); implDecryptBlock(in, inOffset, out, outOffset); } @@ -593,26 +593,6 @@ final class AESCrypt extends SymmetricCipher implements AESConstants out[outOffset ] = (byte)(Si[(a0 ) & 0xFF] ^ (t1 )); } - // Used to perform all checks required by the Java semantics - // (i.e., null checks and bounds checks) on the input parameters - // to encryptBlock and to decryptBlock. - // Normally, the Java Runtime performs these checks, however, as - // encryptBlock and decryptBlock are possibly replaced with - // compiler intrinsics, the JDK performs the required checks instead. - // Does not check accesses to class-internal (private) arrays. - private static void cryptBlockCheck(byte[] array, int offset) { - Objects.requireNonNull(array); - - if (offset < 0 || offset >= array.length) { - throw new ArrayIndexOutOfBoundsException(offset); - } - - int largestIndex = offset + AES_BLOCK_SIZE - 1; - if (largestIndex < 0 || largestIndex >= array.length) { - throw new ArrayIndexOutOfBoundsException(largestIndex); - } - } - /** * Expand a user-supplied key material into a session key. * diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java index 684be4f0d76..da6c10a7956 100644 --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java @@ -173,9 +173,9 @@ final class CounterMode extends FeedbackCipher { */ private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) { - cryptBlockCheck(in, inOff, len); - cryptBlockCheck(out, outOff, len); - return implCrypt(in, inOff, len, out, outOff); + Objects.checkFromIndexSize(inOff, len, in.length); + Objects.checkFromIndexSize(outOff, len, out.length); + return implCrypt(in, inOff, len, out, outOff); } // Implementation of crpyt() method. Possibly replaced with a compiler intrinsic. @@ -193,22 +193,4 @@ final class CounterMode extends FeedbackCipher { return result; } - // Used to perform all checks required by the Java semantics - // (i.e., null checks and bounds checks) on the input parameters to crypt(). - // Normally, the Java Runtime performs these checks, however, as crypt() is - // possibly replaced with compiler intrinsic, the JDK performs the - // required checks instead. - // Does not check accesses to class-internal (private) arrays. - private static void cryptBlockCheck(byte[] array, int offset, int len) { - Objects.requireNonNull(array); - - if (offset < 0 || len < 0 || offset >= array.length) { - throw new ArrayIndexOutOfBoundsException(offset); - } - - int largestIndex = offset + len - 1; - if (largestIndex < 0 || largestIndex >= array.length) { - throw new ArrayIndexOutOfBoundsException(largestIndex); - } - } } From 158a88368164a5fa98907132bcb6fe807d433244 Mon Sep 17 00:00:00 2001 From: Vivek Deshpande Date: Fri, 8 Jan 2016 20:33:02 -0800 Subject: [PATCH 15/17] 8143353: update for x86 sin and cos in the math lib Optimize Math.sin() and cos() for 64 and 32 bit X86 architecture using Intel LIBM implementation. Reviewed-by: kvn --- .../lang/Math/SinCosCornerCasesTests.java | 2927 +++++++++++++++++ 1 file changed, 2927 insertions(+) create mode 100644 jdk/test/java/lang/Math/SinCosCornerCasesTests.java diff --git a/jdk/test/java/lang/Math/SinCosCornerCasesTests.java b/jdk/test/java/lang/Math/SinCosCornerCasesTests.java new file mode 100644 index 00000000000..e144857443f --- /dev/null +++ b/jdk/test/java/lang/Math/SinCosCornerCasesTests.java @@ -0,0 +1,2927 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8143353 + * @summary Test corner cases of sin and cos + * @build Tests + * @build SinCosCornerCasesTests + * @run main SinCosCornerCasesTests + * @author Vivek Deshpande + */ + +public class SinCosCornerCasesTests { + private SinCosCornerCasesTests() {throw new AssertionError("No instances for you.");} + + public static void main(String... args) { + int failures = 0; + + + failures += testCornerCasesSin(); + failures += testCornerCasesCos(); + + if (failures > 0) { + System.err.printf("Testing worst cases incurred %d failures.%n", failures); + throw new RuntimeException(); + } + } + + + private static int testCornerCasesSin() { + int failures = 0; + double[][] testCases = { + {0x1.9283586503fep-5, 0x1.9259e3708bd3ap-5, 0x1.9259e3708bd39p-5}, + {-0x1.9283586503fep-5, -0x1.9259e3708bd3ap-5, -0x1.9259e3708bd39p-5}, + {0x1.d7bdcd778049fp-5, 0x1.d77b117f230d6p-5, 0x1.d77b117f230d5p-5}, + {-0x1.d7bdcd778049fp-5, -0x1.d77b117f230d6p-5, -0x1.d77b117f230d5p-5}, + {0x1.a202b3fb84788p-4, 0x1.a1490c8c06ba7p-4, 0x1.a1490c8c06ba6p-4}, + {-0x1.a202b3fb84788p-4, -0x1.a1490c8c06ba7p-4, -0x1.a1490c8c06ba6p-4}, + {0x1.d037cb27ee6dfp-3, 0x1.cc40c3805229ap-3, 0x1.cc40c3805229bp-3}, + {-0x1.d037cb27ee6dfp-3, -0x1.cc40c3805229ap-3, -0x1.cc40c3805229bp-3}, + {0x1.d5064e6fe82c5p-3, 0x1.d0ef799001ba9p-3, 0x1.d0ef799001baap-3}, + {-0x1.d5064e6fe82c5p-3, -0x1.d0ef799001ba9p-3, -0x1.d0ef799001baap-3}, + {0x1.fe767739d0f6dp-2, 0x1.e9950730c4696p-2, 0x1.e9950730c4696p-2}, + {-0x1.fe767739d0f6dp-2, -0x1.e9950730c4696p-2, -0x1.e9950730c4696p-2}, + {0x1.d98c4c612718dp-1, 0x1.98dcd09337793p-1, 0x1.98dcd09337792p-1}, + {-0x1.d98c4c612718dp-1, -0x1.98dcd09337793p-1, -0x1.98dcd09337792p-1}, + {0x1.921fb54442d18p0, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p0, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.0000001f8p500, 0x1.70a9d825b5064p-1, 0x1.70a9d825b5065p-1}, + {0x1.0000001f8p500, -0x1.70a9d825b5064p-1, -0x1.70a9d825b5065p-1}, + {-0x1.00c0bf8p700, 0x1.bf3980c6c1e9fp-1, 0x1.bf3980c6c1eap-1}, + {0x1.00c0bf8p700, -0x1.bf3980c6c1e9fp-1, -0x1.bf3980c6c1eap-1}, + {-0x1.13fffffffff8p6, 0x1.d62899d48b43ap-4, 0x1.d62899d48b439p-4}, + {0x1.13fffffffff8p6, -0x1.d62899d48b43ap-4, -0x1.d62899d48b439p-4}, + {-0x1.17c5920767dfcp-5, -0x1.17b7a60ce1f15p-5, -0x1.17b7a60ce1f14p-5}, + {0x1.17c5920767dfcp-5, 0x1.17b7a60ce1f15p-5, 0x1.17b7a60ce1f14p-5}, + {-0x1.1d99be08713ccp2, 0x1.f0192b794fbbep-1, 0x1.f0192b794fbbfp-1}, + {0x1.1d99be08713ccp2, -0x1.f0192b794fbbep-1, -0x1.f0192b794fbbfp-1}, + {-0x1.1ddbfd64fc0d3p81, -0x1.5e61328c0034fp-3, -0x1.5e61328c0034ep-3}, + {0x1.1ddbfd64fc0d3p81, 0x1.5e61328c0034fp-3, 0x1.5e61328c0034ep-3}, + {-0x1.1e2a1563e068ep7, 0x1.fb028c5df1db4p-1, 0x1.fb028c5df1db3p-1}, + {0x1.1e2a1563e068ep7, -0x1.fb028c5df1db4p-1, -0x1.fb028c5df1db3p-1}, + {-0x1.2e07a91314dp-3, -0x1.2cefb196ba208p-3, -0x1.2cefb196ba207p-3}, + {0x1.2e07a91314dp-3, 0x1.2cefb196ba208p-3, 0x1.2cefb196ba207p-3}, + {-0x1.3bcec270444e2p3, 0x1.b80f489d3edf5p-2, 0x1.b80f489d3edf4p-2}, + {0x1.3bcec270444e2p3, -0x1.b80f489d3edf5p-2, -0x1.b80f489d3edf4p-2}, + {-0x1.500000000004p-20, -0x1.4fffffffffa39p-20, -0x1.4fffffffffa38p-20}, + {0x1.500000000004p-20, 0x1.4fffffffffa39p-20, 0x1.4fffffffffa38p-20}, + {-0x1.559001a42d90cp1, -0x1.d29da5b44f51cp-2, -0x1.d29da5b44f51bp-2}, + {0x1.559001a42d90cp1, 0x1.d29da5b44f51cp-2, 0x1.d29da5b44f51bp-2}, + {-0x1.597bf3e9776b7p99, -0x1.f85f526147f78p-1, -0x1.f85f526147f79p-1}, + {0x1.597bf3e9776b7p99, 0x1.f85f526147f78p-1, 0x1.f85f526147f79p-1}, + {-0x1.6c6cbc45dc8dep7, -0x1.6d61b58c99c43p-59, -0x1.6d61b58c99c42p-59}, + {0x1.6c6cbc45dc8dep7, 0x1.6d61b58c99c43p-59, 0x1.6d61b58c99c42p-59}, + {-0x1.73d8d173f90dp4, 0x1.e5c3c08a258a8p-1, 0x1.e5c3c08a258a7p-1}, + {0x1.73d8d173f90dp4, -0x1.e5c3c08a258a8p-1, -0x1.e5c3c08a258a7p-1}, + {-0x1.8c202d3a31802p6, 0x1.feb36806ca5fbp-1, 0x1.feb36806ca5fcp-1}, + {0x1.8c202d3a31802p6, -0x1.feb36806ca5fbp-1, -0x1.feb36806ca5fcp-1}, + {-0x1.acd538b1a6d5dp-1, -0x1.7c6c7b01b98dap-1, -0x1.7c6c7b01b98d9p-1}, + {0x1.acd538b1a6d5dp-1, 0x1.7c6c7b01b98dap-1, 0x1.7c6c7b01b98d9p-1}, + {-0x1.b7525ac97e0d2p2, -0x1.191be2059dcb6p-1, -0x1.191be2059dcb5p-1}, + {0x1.b7525ac97e0d2p2, 0x1.191be2059dcb6p-1, 0x1.191be2059dcb5p-1}, + {-0x1.bee5fa8a84b02p0, -0x1.f8305993a212cp-1, -0x1.f8305993a212dp-1}, + {0x1.bee5fa8a84b02p0, 0x1.f8305993a212cp-1, 0x1.f8305993a212dp-1}, + {-0x1.c393979fe5921p9, 0x1.ff3b13530fd71p-1, 0x1.ff3b13530fd7p-1}, + {0x1.c393979fe5921p9, -0x1.ff3b13530fd71p-1, -0x1.ff3b13530fd7p-1}, + {-0x1.c48ffc72563c8p18, -0x1.f119da81a4da6p-1, -0x1.f119da81a4da5p-1}, + {0x1.c48ffc72563c8p18, 0x1.f119da81a4da6p-1, 0x1.f119da81a4da5p-1}, + {-0x1.c79548bc31856p3, -0x1.fd73b81e04cccp-1, -0x1.fd73b81e04ccdp-1}, + {0x1.c79548bc31856p3, 0x1.fd73b81e04cccp-1, 0x1.fd73b81e04ccdp-1}, + {-0x1.cb6p-3, -0x1.c7885aef33a95p-3, -0x1.c7885aef33a94p-3}, + {0x1.cb6p-3, 0x1.c7885aef33a95p-3, 0x1.c7885aef33a94p-3}, + {-0x1.e64ddaf7bd72fp-7, -0x1.e6494911eedd1p-7, -0x1.e6494911eeddp-7}, + {0x1.e64ddaf7bd72fp-7, 0x1.e6494911eedd1p-7, 0x1.e6494911eeddp-7}, + {-0x1.ecdd0fbf07942p5, 0x1.e180eef5b1c88p-1, 0x1.e180eef5b1c89p-1}, + {0x1.ecdd0fbf07942p5, -0x1.e180eef5b1c88p-1, -0x1.e180eef5b1c89p-1}, + {-0x1.f073a23292337p2, -0x1.fd98d20c1be44p-1, -0x1.fd98d20c1be43p-1}, + {0x1.f073a23292337p2, 0x1.fd98d20c1be44p-1, 0x1.fd98d20c1be43p-1}, + {-0x1.f5e4c410f4ef8p15, -0x1.7268c112297c8p-5, -0x1.7268c112297c9p-5}, + {0x1.f5e4c410f4ef8p15, 0x1.7268c112297c8p-5, 0x1.7268c112297c9p-5}, + {-0x1.f8000000002p95, 0x1.420796146070ep-18, 0x1.420796146070fp-18}, + {0x1.f8000000002p95, -0x1.420796146070ep-18, -0x1.420796146070fp-18}, + {-0x1.f9365d79546e1p-2, -0x1.e4f6dc499d9ccp-2, -0x1.e4f6dc499d9cdp-2}, + {0x1.f9365d79546e1p-2, 0x1.e4f6dc499d9ccp-2, 0x1.e4f6dc499d9cdp-2}, + {-0x1.ffffffffffe7ep1023, 0x1.b2ef99b140d65p-14, 0x1.b2ef99b140d66p-14}, + {0x1.ffffffffffe7ep1023, -0x1.b2ef99b140d65p-14, -0x1.b2ef99b140d66p-14}, + {0x1.0p15, 0x1.db0ffc3ecc6e4p-1, 0x1.db0ffc3ecc6e3p-1}, + {-0x1.0p15, -0x1.db0ffc3ecc6e4p-1, -0x1.db0ffc3ecc6e3p-1}, + {0x1.0000000000001p13, -0x1.e98f87098b627p-1, -0x1.e98f87098b626p-1}, + {-0x1.0000000000001p13, 0x1.e98f87098b627p-1, 0x1.e98f87098b626p-1}, + {0x1.0000000000001p52, 0x1.053c35068e10dp-4, 0x1.053c35068e10ep-4}, + {-0x1.0000000000001p52, -0x1.053c35068e10dp-4, -0x1.053c35068e10ep-4}, + {0x1.0000000000001p228, 0x1.72d421b6884e5p-1, 0x1.72d421b6884e6p-1}, + {-0x1.0000000000001p228, -0x1.72d421b6884e5p-1, -0x1.72d421b6884e6p-1}, + {0x1.0000000000001p491, 0x1.77fba987c5654p-1, 0x1.77fba987c5653p-1}, + {-0x1.0000000000001p491, -0x1.77fba987c5654p-1, -0x1.77fba987c5653p-1}, + {0x1.0000000000003p215, -0x1.723b2625331afp-1, -0x1.723b2625331bp-1}, + {-0x1.0000000000003p215, 0x1.723b2625331afp-1, 0x1.723b2625331bp-1}, + {0x1.0000000000006p0, 0x1.aed548f090cf5p-1, 0x1.aed548f090cf4p-1}, + {-0x1.0000000000006p0, -0x1.aed548f090cf5p-1, -0x1.aed548f090cf4p-1}, + {0x1.0000000000007p8, -0x1.ff983208c7dc9p-1, -0x1.ff983208c7dcap-1}, + {-0x1.0000000000007p8, 0x1.ff983208c7dc9p-1, 0x1.ff983208c7dcap-1}, + {0x1.0000000000007p275, 0x1.ffef29dc38453p-1, 0x1.ffef29dc38452p-1}, + {-0x1.0000000000007p275, -0x1.ffef29dc38453p-1, -0x1.ffef29dc38452p-1}, + {0x1.0000000000007p449, -0x1.fa88c375723c1p-8, -0x1.fa88c375723cp-8}, + {-0x1.0000000000007p449, 0x1.fa88c375723c1p-8, 0x1.fa88c375723cp-8}, + {0x1.0000000000011p644, 0x1.fff5322c94eaep-1, 0x1.fff5322c94eafp-1}, + {-0x1.0000000000011p644, -0x1.fff5322c94eaep-1, -0x1.fff5322c94eafp-1}, + {0x1.000000000001fp164, -0x1.a73630af8f15cp-1, -0x1.a73630af8f15bp-1}, + {-0x1.000000000001fp164, 0x1.a73630af8f15cp-1, 0x1.a73630af8f15bp-1}, + {0x1.0000000000038p380, 0x1.1c548f9249e44p-2, 0x1.1c548f9249e45p-2}, + {-0x1.0000000000038p380, -0x1.1c548f9249e44p-2, -0x1.1c548f9249e45p-2}, + {0x1.0000000000118p380, 0x1.ca965bd2c4dffp-3, 0x1.ca965bd2c4dfep-3}, + {-0x1.0000000000118p380, -0x1.ca965bd2c4dffp-3, -0x1.ca965bd2c4dfep-3}, + {0x1.000000000012cp2, -0x1.837b9dddc24dp-1, -0x1.837b9dddc24cfp-1}, + {-0x1.000000000012cp2, 0x1.837b9dddc24dp-1, 0x1.837b9dddc24cfp-1}, + {0x1.00000000001f8p700, 0x1.d82c1784c3eccp-2, 0x1.d82c1784c3ecbp-2}, + {-0x1.00000000001f8p700, -0x1.d82c1784c3eccp-2, -0x1.d82c1784c3ecbp-2}, + {0x1.00000000002p-7, 0x1.fffeaaaaef2eep-8, 0x1.fffeaaaaef2efp-8}, + {-0x1.00000000002p-7, -0x1.fffeaaaaef2eep-8, -0x1.fffeaaaaef2efp-8}, + {0x1.00000000002p40, -0x1.0871bddd90fc6p-1, -0x1.0871bddd90fc5p-1}, + {-0x1.00000000002p40, 0x1.0871bddd90fc6p-1, 0x1.0871bddd90fc5p-1}, + {0x1.0000000000201p-7, 0x1.fffeaaaaef2fp-8, 0x1.fffeaaaaef2f1p-8}, + {-0x1.0000000000201p-7, -0x1.fffeaaaaef2fp-8, -0x1.fffeaaaaef2f1p-8}, + {0x1.0000000000221p-7, 0x1.fffeaaaaef33p-8, 0x1.fffeaaaaef331p-8}, + {-0x1.0000000000221p-7, -0x1.fffeaaaaef33p-8, -0x1.fffeaaaaef331p-8}, + {0x1.000000000023ap-7, 0x1.fffeaaaaef362p-8, 0x1.fffeaaaaef363p-8}, + {-0x1.000000000023ap-7, -0x1.fffeaaaaef362p-8, -0x1.fffeaaaaef363p-8}, + {0x1.0000000004p45, 0x1.e0c6edfa93601p-9, 0x1.e0c6edfa93602p-9}, + {-0x1.0000000004p45, -0x1.e0c6edfa93601p-9, -0x1.e0c6edfa93602p-9}, + {0x1.0000000cp40, 0x1.ea1f618356db1p-5, 0x1.ea1f618356dbp-5}, + {-0x1.0000000cp40, -0x1.ea1f618356db1p-5, -0x1.ea1f618356dbp-5}, + {0x1.00000013c86f4p-2, 0x1.faaeed7587542p-3, 0x1.faaeed7587541p-3}, + {-0x1.00000013c86f4p-2, -0x1.faaeed7587542p-3, -0x1.faaeed7587541p-3}, + {0x1.001p13, 0x1.540bc7785680bp-1, 0x1.540bc7785680ap-1}, + {-0x1.001p13, -0x1.540bc7785680bp-1, -0x1.540bc7785680ap-1}, + {0x1.003p699, -0x1.37a7cb907a2e5p-1, -0x1.37a7cb907a2e6p-1}, + {-0x1.003p699, 0x1.37a7cb907a2e5p-1, 0x1.37a7cb907a2e6p-1}, + {0x1.0038p40, -0x1.29e5845fc54b5p-1, -0x1.29e5845fc54b6p-1}, + {-0x1.0038p40, 0x1.29e5845fc54b5p-1, 0x1.29e5845fc54b6p-1}, + {0x1.007p10, 0x1.ffe5ca4656491p-1, 0x1.ffe5ca4656492p-1}, + {-0x1.007p10, -0x1.ffe5ca4656491p-1, -0x1.ffe5ca4656492p-1}, + {0x1.007p25, 0x1.ea4df82db014bp-1, 0x1.ea4df82db014ap-1}, + {-0x1.007p25, -0x1.ea4df82db014bp-1, -0x1.ea4df82db014ap-1}, + {0x1.007p41, 0x1.fe757aef1c80cp-1, 0x1.fe757aef1c80dp-1}, + {-0x1.007p41, -0x1.fe757aef1c80cp-1, -0x1.fe757aef1c80dp-1}, + {0x1.00cp41, 0x1.e9b71805ec068p-7, 0x1.e9b71805ec069p-7}, + {-0x1.00cp41, -0x1.e9b71805ec068p-7, -0x1.e9b71805ec069p-7}, + {0x1.01c00000001p0, 0x1.b0b6d0a540583p-1, 0x1.b0b6d0a540582p-1}, + {-0x1.01c00000001p0, -0x1.b0b6d0a540583p-1, -0x1.b0b6d0a540582p-1}, + {0x1.02322e46da919p-2, 0x1.fef0092627012p-3, 0x1.fef0092627013p-3}, + {-0x1.02322e46da919p-2, -0x1.fef0092627012p-3, -0x1.fef0092627013p-3}, + {0x1.02a236478p-2, 0x1.ffc90059804a1p-3, 0x1.ffc90059804ap-3}, + {-0x1.02a236478p-2, -0x1.ffc90059804a1p-3, -0x1.ffc90059804ap-3}, + {0x1.02a65d08ca5e5p-2, 0x1.ffd10a6b5429fp-3, 0x1.ffd10a6b5429ep-3}, + {-0x1.02a65d08ca5e5p-2, -0x1.ffd10a6b5429fp-3, -0x1.ffd10a6b5429ep-3}, + {0x1.02a65d2dce49ap-2, 0x1.ffd10ab302a3fp-3, 0x1.ffd10ab302a4p-3}, + {-0x1.02a65d2dce49ap-2, -0x1.ffd10ab302a3fp-3, -0x1.ffd10ab302a4p-3}, + {0x1.02ae7238ap-2, 0x1.ffe0b1764ca4cp-3, 0x1.ffe0b1764ca4dp-3}, + {-0x1.02ae7238ap-2, -0x1.ffe0b1764ca4cp-3, -0x1.ffe0b1764ca4dp-3}, + {0x1.0501d22221dacp621, -0x1.f68f0e26c0f6bp-3, -0x1.f68f0e26c0f6ap-3}, + {-0x1.0501d22221dacp621, 0x1.f68f0e26c0f6bp-3, 0x1.f68f0e26c0f6ap-3}, + {0x1.06ffffffffff8p0, 0x1.b63c41f09eb75p-1, 0x1.b63c41f09eb74p-1}, + {-0x1.06ffffffffff8p0, -0x1.b63c41f09eb75p-1, -0x1.b63c41f09eb74p-1}, + {0x1.07023d3d44215p12, -0x1.ffdc173adabb2p-1, -0x1.ffdc173adabb1p-1}, + {-0x1.07023d3d44215p12, 0x1.ffdc173adabb2p-1, 0x1.ffdc173adabb1p-1}, + {0x1.0895a7a3e8ae6p-5, 0x1.0889e11bef135p-5, 0x1.0889e11bef136p-5}, + {-0x1.0895a7a3e8ae6p-5, -0x1.0889e11bef135p-5, -0x1.0889e11bef136p-5}, + {0x1.08d5d69840601p-5, 0x1.08ca077c76445p-5, 0x1.08ca077c76446p-5}, + {-0x1.08d5d69840601p-5, -0x1.08ca077c76445p-5, -0x1.08ca077c76446p-5}, + {0x1.0ep6, -0x1.ff7fbe518023fp-1, -0x1.ff7fbe518023ep-1}, + {-0x1.0ep6, 0x1.ff7fbe518023fp-1, 0x1.ff7fbe518023ep-1}, + {0x1.107ba49c346e4p9, -0x1.fd6c68b877afep-1, -0x1.fd6c68b877affp-1}, + {-0x1.107ba49c346e4p9, 0x1.fd6c68b877afep-1, 0x1.fd6c68b877affp-1}, + {0x1.149154477444p745, -0x1.a2ba6bc70bce4p-1, -0x1.a2ba6bc70bce5p-1}, + {-0x1.149154477444p745, 0x1.a2ba6bc70bce4p-1, 0x1.a2ba6bc70bce5p-1}, + {0x1.1663c0e51818p-5, 0x1.165609790f235p-5, 0x1.165609790f234p-5}, + {-0x1.1663c0e51818p-5, -0x1.165609790f235p-5, -0x1.165609790f234p-5}, + {0x1.1745d1745d176p238, -0x1.fc0523ff94e45p-1, -0x1.fc0523ff94e44p-1}, + {-0x1.1745d1745d176p238, 0x1.fc0523ff94e45p-1, 0x1.fc0523ff94e44p-1}, + {0x1.17472a408a3ep97, 0x1.f34a729c584bdp-1, 0x1.f34a729c584bcp-1}, + {-0x1.17472a408a3ep97, -0x1.f34a729c584bdp-1, -0x1.f34a729c584bcp-1}, + {0x1.178d91b6b992dp-5, 0x1.177fae169fdf1p-5, 0x1.177fae169fdfp-5}, + {-0x1.178d91b6b992dp-5, -0x1.177fae169fdf1p-5, -0x1.177fae169fdfp-5}, + {0x1.178d91b6bad4ep-5, 0x1.177fae16a120fp-5, 0x1.177fae16a120ep-5}, + {-0x1.178d91b6bad4ep-5, -0x1.177fae16a120fp-5, -0x1.177fae16a120ep-5}, + {0x1.178d91b6bbabap-5, 0x1.177fae16a1f79p-5, 0x1.177fae16a1f78p-5}, + {-0x1.178d91b6bbabap-5, -0x1.177fae16a1f79p-5, -0x1.177fae16a1f78p-5}, + {0x1.178d91b6bdc45p-5, 0x1.177fae16a40ffp-5, 0x1.177fae16a40fep-5}, + {-0x1.178d91b6bdc45p-5, -0x1.177fae16a40ffp-5, -0x1.177fae16a40fep-5}, + {0x1.19752dbee5f6ap933, 0x1.297c768f2413p-1, 0x1.297c768f24131p-1}, + {-0x1.19752dbee5f6ap933, -0x1.297c768f2413p-1, -0x1.297c768f24131p-1}, + {0x1.1b3009cfe4dbcp8, 0x1.b826df5cafafap-2, 0x1.b826df5cafafbp-2}, + {-0x1.1b3009cfe4dbcp8, -0x1.b826df5cafafap-2, -0x1.b826df5cafafbp-2}, + {0x1.1f6475d95bf18p3, 0x1.b7a5956250b6bp-2, 0x1.b7a5956250b6ap-2}, + {-0x1.1f6475d95bf18p3, -0x1.b7a5956250b6bp-2, -0x1.b7a5956250b6ap-2}, + {0x1.229148a452291p118, 0x1.4db6566b64548p-1, 0x1.4db6566b64547p-1}, + {-0x1.229148a452291p118, -0x1.4db6566b64548p-1, -0x1.4db6566b64547p-1}, + {0x1.268p-1, 0x1.1686fee2c49a8p-1, 0x1.1686fee2c49a7p-1}, + {-0x1.268p-1, -0x1.1686fee2c49a8p-1, -0x1.1686fee2c49a7p-1}, + {0x1.26fb3844dd19p-2, 0x1.22eb21a44d627p-2, 0x1.22eb21a44d628p-2}, + {-0x1.26fb3844dd19p-2, -0x1.22eb21a44d627p-2, -0x1.22eb21a44d628p-2}, + {0x1.27fffffffe6bp0, 0x1.d4a216d89b2b3p-1, 0x1.d4a216d89b2b4p-1}, + {-0x1.27fffffffe6bp0, -0x1.d4a216d89b2b3p-1, -0x1.d4a216d89b2b4p-1}, + {0x1.284b84048d481p204, -0x1.76c9b0f3a22f8p-1, -0x1.76c9b0f3a22f7p-1}, + {-0x1.284b84048d481p204, 0x1.76c9b0f3a22f8p-1, 0x1.76c9b0f3a22f7p-1}, + {0x1.2999e3109cad4p2, -0x1.ff01226f97d33p-1, -0x1.ff01226f97d32p-1}, + {-0x1.2999e3109cad4p2, 0x1.ff01226f97d33p-1, 0x1.ff01226f97d32p-1}, + {0x1.2aap-5, 0x1.2a8f11e7ae82cp-5, 0x1.2a8f11e7ae82dp-5}, + {-0x1.2aap-5, -0x1.2a8f11e7ae82cp-5, -0x1.2a8f11e7ae82dp-5}, + {0x1.2b14d3be0c23p-5, 0x1.2b03d1bf773dfp-5, 0x1.2b03d1bf773ep-5}, + {-0x1.2b14d3be0c23p-5, -0x1.2b03d1bf773dfp-5, -0x1.2b03d1bf773ep-5}, + {0x1.2b7cb44849981p2, -0x1.ffb90ee641792p-1, -0x1.ffb90ee641791p-1}, + {-0x1.2b7cb44849981p2, 0x1.ffb90ee641792p-1, 0x1.ffb90ee641791p-1}, + {0x1.2becc8685258p200, -0x1.ffffff79e71a4p-1, -0x1.ffffff79e71a3p-1}, + {-0x1.2becc8685258p200, 0x1.ffffff79e71a4p-1, 0x1.ffffff79e71a3p-1}, + {0x1.2cfa14ce27cd5p2, -0x1.fff9edaf85b77p-1, -0x1.fff9edaf85b76p-1}, + {-0x1.2cfa14ce27cd5p2, 0x1.fff9edaf85b77p-1, 0x1.fff9edaf85b76p-1}, + {0x1.2dp-4, 0x1.2cbaaa4cebb52p-4, 0x1.2cbaaa4cebb51p-4}, + {-0x1.2dp-4, -0x1.2cbaaa4cebb52p-4, -0x1.2cbaaa4cebb51p-4}, + {0x1.2d76d18721be8p2, -0x1.ffffbc177e01p-1, -0x1.ffffbc177e00fp-1}, + {-0x1.2d76d18721be8p2, 0x1.ffffbc177e01p-1, 0x1.ffffbc177e00fp-1}, + {0x1.302a494e0909p97, 0x1.745843dfafefdp-18, 0x1.745843dfafefep-18}, + {-0x1.302a494e0909p97, -0x1.745843dfafefdp-18, -0x1.745843dfafefep-18}, + {0x1.31cc731cc731cp1000, 0x1.ffcc568d42376p-1, 0x1.ffcc568d42377p-1}, + {-0x1.31cc731cc731cp1000, -0x1.ffcc568d42376p-1, -0x1.ffcc568d42377p-1}, + {0x1.328463d4f8ca6p441, 0x1.b676077d4faf8p-1, 0x1.b676077d4faf7p-1}, + {-0x1.328463d4f8ca6p441, -0x1.b676077d4faf8p-1, -0x1.b676077d4faf7p-1}, + {0x1.32ce90b32171ep18, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.32ce90b32171ep18, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.35debd7f020ecp-5, 0x1.35cbd3240d149p-5, 0x1.35cbd3240d148p-5}, + {-0x1.35debd7f020ecp-5, -0x1.35cbd3240d149p-5, -0x1.35cbd3240d148p-5}, + {0x1.3bb3487893405p-7, 0x1.3bb2086559faap-7, 0x1.3bb2086559fa9p-7}, + {-0x1.3bb3487893405p-7, -0x1.3bb2086559faap-7, -0x1.3bb2086559fa9p-7}, + {0x1.3bb3487893407p-7, 0x1.3bb2086559facp-7, 0x1.3bb2086559fabp-7}, + {-0x1.3bb3487893407p-7, -0x1.3bb2086559facp-7, -0x1.3bb2086559fabp-7}, + {0x1.3bb681d65aa6p100, 0x1.dff197edc51d2p-16, 0x1.dff197edc51d3p-16}, + {-0x1.3bb681d65aa6p100, -0x1.dff197edc51d2p-16, -0x1.dff197edc51d3p-16}, + {0x1.3f9aa8626042fp83, -0x1.5d08d3dbb41bp-3, -0x1.5d08d3dbb41afp-3}, + {-0x1.3f9aa8626042fp83, 0x1.5d08d3dbb41bp-3, 0x1.5d08d3dbb41afp-3}, + {0x1.3fep19, 0x1.fb503983f94bbp-3, 0x1.fb503983f94bcp-3}, + {-0x1.3fep19, -0x1.fb503983f94bbp-3, -0x1.fb503983f94bcp-3}, + {0x1.4285478f1e3c8p58, -0x1.d3876eacc9ee7p-1, -0x1.d3876eacc9ee6p-1}, + {-0x1.4285478f1e3c8p58, 0x1.d3876eacc9ee7p-1, 0x1.d3876eacc9ee6p-1}, + {0x1.42cbcf45a169ep-5, 0x1.42b66d54f69c1p-5, 0x1.42b66d54f69cp-5}, + {-0x1.42cbcf45a169ep-5, -0x1.42b66d54f69c1p-5, -0x1.42b66d54f69cp-5}, + {0x1.43fffffffff6ap557, 0x1.b45e9e9427554p-1, 0x1.b45e9e9427553p-1}, + {-0x1.43fffffffff6ap557, -0x1.b45e9e9427554p-1, -0x1.b45e9e9427553p-1}, + {0x1.44p-17, 0x1.43ffffffea603p-17, 0x1.43ffffffea602p-17}, + {-0x1.44p-17, -0x1.43ffffffea603p-17, -0x1.43ffffffea602p-17}, + {0x1.4748c08dc0976p200, -0x1.6a4e98d2d8b1cp-1, -0x1.6a4e98d2d8b1bp-1}, + {-0x1.4748c08dc0976p200, 0x1.6a4e98d2d8b1cp-1, 0x1.6a4e98d2d8b1bp-1}, + {0x1.478fc08p43, -0x1.b57ca8aacf2a9p-1, -0x1.b57ca8aacf2aap-1}, + {-0x1.478fc08p43, 0x1.b57ca8aacf2a9p-1, 0x1.b57ca8aacf2aap-1}, + {0x1.4cf36d17c596ep200, 0x1.ffe38008ef6b5p-1, 0x1.ffe38008ef6b4p-1}, + {-0x1.4cf36d17c596ep200, -0x1.ffe38008ef6b5p-1, -0x1.ffe38008ef6b4p-1}, + {0x1.4f0f308p488, 0x1.d6457a3f12e6cp-1, 0x1.d6457a3f12e6dp-1}, + {-0x1.4f0f308p488, -0x1.d6457a3f12e6cp-1, -0x1.d6457a3f12e6dp-1}, + {0x1.5p-20, 0x1.4fffffffff9f9p-20, 0x1.4fffffffff9f8p-20}, + {-0x1.5p-20, -0x1.4fffffffff9f9p-20, -0x1.4fffffffff9f8p-20}, + {0x1.5143e25a488f1p3, -0x1.cbad095f503a2p-1, -0x1.cbad095f503a1p-1}, + {-0x1.5143e25a488f1p3, 0x1.cbad095f503a2p-1, 0x1.cbad095f503a1p-1}, + {0x1.51f0f44da4df4p200, -0x1.f942d6262e82ep-5, -0x1.f942d6262e82dp-5}, + {-0x1.51f0f44da4df4p200, 0x1.f942d6262e82ep-5, 0x1.f942d6262e82dp-5}, + {0x1.52ad6c5a3602fp16, -0x1.fc466ccaece8p-3, -0x1.fc466ccaece81p-3}, + {-0x1.52ad6c5a3602fp16, 0x1.fc466ccaece8p-3, 0x1.fc466ccaece81p-3}, + {0x1.52f00ep793, 0x1.d69c3cf4eecdep-1, 0x1.d69c3cf4eecddp-1}, + {-0x1.52f00ep793, -0x1.d69c3cf4eecdep-1, -0x1.d69c3cf4eecddp-1}, + {0x1.5555555555556p239, 0x1.e120292f3d495p-1, 0x1.e120292f3d496p-1}, + {-0x1.5555555555556p239, -0x1.e120292f3d495p-1, -0x1.e120292f3d496p-1}, + {0x1.5a0000008p6, -0x1.fd1d85b7ef004p-1, -0x1.fd1d85b7ef003p-1}, + {-0x1.5a0000008p6, 0x1.fd1d85b7ef004p-1, 0x1.fd1d85b7ef003p-1}, + {0x1.5b063ad2dd08fp-6, 0x1.5aff9664b07e2p-6, 0x1.5aff9664b07e1p-6}, + {-0x1.5b063ad2dd08fp-6, -0x1.5aff9664b07e2p-6, -0x1.5aff9664b07e1p-6}, + {0x1.5b179d75fa285p2, -0x1.83f8bbb59f2f8p-1, -0x1.83f8bbb59f2f9p-1}, + {-0x1.5b179d75fa285p2, 0x1.83f8bbb59f2f8p-1, 0x1.83f8bbb59f2f9p-1}, + {0x1.5bb5967402f9cp79, 0x1.fa865b0d99497p-1, 0x1.fa865b0d99496p-1}, + {-0x1.5bb5967402f9cp79, -0x1.fa865b0d99497p-1, -0x1.fa865b0d99496p-1}, + {0x1.5bea01p468, 0x1.e8a523fce884dp-2, 0x1.e8a523fce884ep-2}, + {-0x1.5bea01p468, -0x1.e8a523fce884dp-2, -0x1.e8a523fce884ep-2}, + {0x1.5f19fbc507af6p9, -0x1.ff2ad941f0a41p-1, -0x1.ff2ad941f0a4p-1}, + {-0x1.5f19fbc507af6p9, 0x1.ff2ad941f0a41p-1, 0x1.ff2ad941f0a4p-1}, + {0x1.60a610a658da9p889, -0x1.75ce4a0d0bd03p-1, -0x1.75ce4a0d0bd04p-1}, + {-0x1.60a610a658da9p889, 0x1.75ce4a0d0bd03p-1, 0x1.75ce4a0d0bd04p-1}, + {0x1.62ad7ce17143dp62, -0x1.721586594ab48p-1, -0x1.721586594ab49p-1}, + {-0x1.62ad7ce17143dp62, 0x1.721586594ab48p-1, 0x1.721586594ab49p-1}, + {0x1.645926cc1132cp9, 0x1.b8d27019d1b9fp-2, 0x1.b8d27019d1b9ep-2}, + {-0x1.645926cc1132cp9, -0x1.b8d27019d1b9fp-2, -0x1.b8d27019d1b9ep-2}, + {0x1.647e25d391f17p-9, 0x1.647e09059c1eap-9, 0x1.647e09059c1e9p-9}, + {-0x1.647e25d391f17p-9, -0x1.647e09059c1eap-9, -0x1.647e09059c1e9p-9}, + {0x1.64ef438p142, -0x1.8d3b53ff85a82p-1, -0x1.8d3b53ff85a83p-1}, + {-0x1.64ef438p142, 0x1.8d3b53ff85a82p-1, 0x1.8d3b53ff85a83p-1}, + {0x1.6599665996658p3, -0x1.f7c8630e62a02p-1, -0x1.f7c8630e62a01p-1}, + {-0x1.6599665996658p3, 0x1.f7c8630e62a02p-1, 0x1.f7c8630e62a01p-1}, + {0x1.672p-5, 0x1.67028e3602035p-5, 0x1.67028e3602034p-5}, + {-0x1.672p-5, -0x1.67028e3602035p-5, -0x1.67028e3602034p-5}, + {0x1.688ae6c138ea8p299, 0x1.bc60c8c33cb5fp-2, 0x1.bc60c8c33cb5ep-2}, + {-0x1.688ae6c138ea8p299, -0x1.bc60c8c33cb5fp-2, -0x1.bc60c8c33cb5ep-2}, + {0x1.6aa78p17, -0x1.fc3b4bb8b012ep-1, -0x1.fc3b4bb8b012fp-1}, + {-0x1.6aa78p17, 0x1.fc3b4bb8b012ep-1, 0x1.fc3b4bb8b012fp-1}, + {0x1.6ac5b262ca1ffp849, 0x1.0p0, 0x1.0p0}, + {-0x1.6ac5b262ca1ffp849, -0x1.0p0, -0x1.0p0}, + {0x1.6d88083749412p4, -0x1.82317836a97c8p-1, -0x1.82317836a97c9p-1}, + {-0x1.6d88083749412p4, 0x1.82317836a97c8p-1, 0x1.82317836a97c9p-1}, + {0x1.6f8p-6, 0x1.6f781c78cc82bp-6, 0x1.6f781c78cc82ap-6}, + {-0x1.6f8p-6, -0x1.6f781c78cc82bp-6, -0x1.6f781c78cc82ap-6}, + {0x1.729aa6859d1f4p396, -0x1.fdbe5085494aep-1, -0x1.fdbe5085494afp-1}, + {-0x1.729aa6859d1f4p396, 0x1.fdbe5085494aep-1, 0x1.fdbe5085494afp-1}, + {0x1.73e2dbe9a2f8p10, -0x1.fffffae862b5p-1, -0x1.fffffae862b4fp-1}, + {-0x1.73e2dbe9a2f8p10, 0x1.fffffae862b5p-1, 0x1.fffffae862b4fp-1}, + {0x1.769cde0b90b8p-7, 0x1.769ac74459b06p-7, 0x1.769ac74459b05p-7}, + {-0x1.769cde0b90b8p-7, -0x1.769ac74459b06p-7, -0x1.769ac74459b05p-7}, + {0x1.76cp-5, 0x1.769e8afb6a4ecp-5, 0x1.769e8afb6a4ebp-5}, + {-0x1.76cp-5, -0x1.769e8afb6a4ecp-5, -0x1.769e8afb6a4ebp-5}, + {0x1.78001p0, 0x1.fd562611f5bd4p-1, 0x1.fd562611f5bd5p-1}, + {-0x1.78001p0, -0x1.fd562611f5bd4p-1, -0x1.fd562611f5bd5p-1}, + {0x1.7ap0, 0x1.fdba784ca00f2p-1, 0x1.fdba784ca00f1p-1}, + {-0x1.7ap0, -0x1.fdba784ca00f2p-1, -0x1.fdba784ca00f1p-1}, + {0x1.7abd870381c2dp38, 0x1.f930c222a8683p-5, 0x1.f930c222a8682p-5}, + {-0x1.7abd870381c2dp38, -0x1.f930c222a8683p-5, -0x1.f930c222a8682p-5}, + {0x1.7dc945c21248p95, 0x1.ffeb2ff2b6923p-1, 0x1.ffeb2ff2b6924p-1}, + {-0x1.7dc945c21248p95, -0x1.ffeb2ff2b6923p-1, -0x1.ffeb2ff2b6924p-1}, + {0x1.7f73e1594b70cp98, 0x1.b279153c23fb2p-2, 0x1.b279153c23fb1p-2}, + {-0x1.7f73e1594b70cp98, -0x1.b279153c23fb2p-2, -0x1.b279153c23fb1p-2}, + {0x1.7f7ef77e83f1ap21, -0x1.599fad35cf60bp-41, -0x1.599fad35cf60ap-41}, + {-0x1.7f7ef77e83f1ap21, 0x1.599fad35cf60bp-41, 0x1.599fad35cf60ap-41}, + {0x1.8p0, 0x1.feb7a9b2c6d8bp-1, 0x1.feb7a9b2c6d8ap-1}, + {-0x1.8p0, -0x1.feb7a9b2c6d8bp-1, -0x1.feb7a9b2c6d8ap-1}, + {0x1.8p6, 0x1.f798d01ec615cp-1, 0x1.f798d01ec615bp-1}, + {-0x1.8p6, -0x1.f798d01ec615cp-1, -0x1.f798d01ec615bp-1}, + {0x1.8132ceb1c4f39p0, 0x1.fee1a2a977bcfp-1, 0x1.fee1a2a977bcep-1}, + {-0x1.8132ceb1c4f39p0, -0x1.fee1a2a977bcfp-1, -0x1.fee1a2a977bcep-1}, + {0x1.81ae0dffa3b33p959, -0x1.24245af4cd995p-52, -0x1.24245af4cd994p-52}, + {-0x1.81ae0dffa3b33p959, 0x1.24245af4cd995p-52, 0x1.24245af4cd994p-52}, + {0x1.85ec5a399a2e6p1, 0x1.85d41b0bf3091p-4, 0x1.85d41b0bf309p-4}, + {-0x1.85ec5a399a2e6p1, -0x1.85d41b0bf3091p-4, -0x1.85d41b0bf309p-4}, + {0x1.86a0092754022p16, 0x1.1e42ae3cfbdc6p-24, 0x1.1e42ae3cfbdc7p-24}, + {-0x1.86a0092754022p16, -0x1.1e42ae3cfbdc6p-24, -0x1.1e42ae3cfbdc7p-24}, + {0x1.8720588p392, -0x1.dbf4e594cefe1p-1, -0x1.dbf4e594cefe2p-1}, + {-0x1.8720588p392, 0x1.dbf4e594cefe1p-1, 0x1.dbf4e594cefe2p-1}, + {0x1.8929354ebc6aap43, 0x1.44302d6a82d4p-9, 0x1.44302d6a82d41p-9}, + {-0x1.8929354ebc6aap43, -0x1.44302d6a82d4p-9, -0x1.44302d6a82d41p-9}, + {0x1.8a791e4791e75p-5, 0x1.8a52189ec3487p-5, 0x1.8a52189ec3488p-5}, + {-0x1.8a791e4791e75p-5, -0x1.8a52189ec3487p-5, -0x1.8a52189ec3488p-5}, + {0x1.8ba761438f5edp11, -0x1.fe8566e538123p-1, -0x1.fe8566e538122p-1}, + {-0x1.8ba761438f5edp11, 0x1.fe8566e538123p-1, 0x1.fe8566e538122p-1}, + {0x1.8eaf16de6392p0, 0x1.fff42aca4cb5ap-1, 0x1.fff42aca4cb5bp-1}, + {-0x1.8eaf16de6392p0, -0x1.fff42aca4cb5ap-1, -0x1.fff42aca4cb5bp-1}, + {0x1.9p0, 0x1.fffb7d3f3a253p-1, 0x1.fffb7d3f3a252p-1}, + {-0x1.9p0, -0x1.fffb7d3f3a253p-1, -0x1.fffb7d3f3a252p-1}, + {0x1.91a5657fb6a9ap6, -0x1.e815770667fd9p-4, -0x1.e815770667fd8p-4}, + {-0x1.91a5657fb6a9ap6, 0x1.e815770667fd9p-4, 0x1.e815770667fd8p-4}, + {0x1.921fb54468847p37, -0x1.fffffffd311dcp-1, -0x1.fffffffd311ddp-1}, + {-0x1.921fb54468847p37, 0x1.fffffffd311dcp-1, 0x1.fffffffd311ddp-1}, + {0x1.921ff54442d18p2, 0x1.ffffffff875e6p-17, 0x1.ffffffff875e5p-17}, + {-0x1.921ff54442d18p2, -0x1.ffffffff875e6p-17, -0x1.ffffffff875e5p-17}, + {0x1.928p2, 0x1.812a5da3777cdp-8, 0x1.812a5da3777cep-8}, + {-0x1.928p2, -0x1.812a5da3777cdp-8, -0x1.812a5da3777cep-8}, + {0x1.94ap0, 0x1.fff9be8d82573p-1, 0x1.fff9be8d82572p-1}, + {-0x1.94ap0, -0x1.fff9be8d82573p-1, -0x1.fff9be8d82572p-1}, + {0x1.94a5294a51bdep-5, 0x1.947b0ace235f3p-5, 0x1.947b0ace235f2p-5}, + {-0x1.94a5294a51bdep-5, -0x1.947b0ace235f3p-5, -0x1.947b0ace235f2p-5}, + {0x1.94a5294a52948p100, 0x1.c34f70e55a708p-2, 0x1.c34f70e55a707p-2}, + {-0x1.94a5294a52948p100, -0x1.c34f70e55a708p-2, -0x1.c34f70e55a707p-2}, + {0x1.95361b8f7697dp-5, 0x1.950bcfc0f3d51p-5, 0x1.950bcfc0f3d5p-5}, + {-0x1.95361b8f7697dp-5, -0x1.950bcfc0f3d51p-5, -0x1.950bcfc0f3d5p-5}, + {0x1.956p-1, 0x1.6c548bfcce696p-1, 0x1.6c548bfcce695p-1}, + {-0x1.956p-1, -0x1.6c548bfcce696p-1, -0x1.6c548bfcce695p-1}, + {0x1.962p0, 0x1.ffeffdbf67ca6p-1, 0x1.ffeffdbf67ca7p-1}, + {-0x1.962p0, -0x1.ffeffdbf67ca6p-1, -0x1.ffeffdbf67ca7p-1}, + {0x1.97330d2ea16d9p-5, 0x1.9708213bf67f5p-5, 0x1.9708213bf67f4p-5}, + {-0x1.97330d2ea16d9p-5, -0x1.9708213bf67f5p-5, -0x1.9708213bf67f4p-5}, + {0x1.9756f073b6b61p-5, 0x1.972bf92713d51p-5, 0x1.972bf92713d5p-5}, + {-0x1.9756f073b6b61p-5, -0x1.972bf92713d51p-5, -0x1.972bf92713d5p-5}, + {0x1.97935055cec1bp-5, 0x1.976845ebe7119p-5, 0x1.976845ebe7118p-5}, + {-0x1.97935055cec1bp-5, -0x1.976845ebe7119p-5, -0x1.976845ebe7118p-5}, + {0x1.98p-4, 0x1.97535cee51a43p-4, 0x1.97535cee51a42p-4}, + {-0x1.98p-4, -0x1.97535cee51a43p-4, -0x1.97535cee51a42p-4}, + {0x1.999999a42160cp-1, 0x1.6f494c3356177p-1, 0x1.6f494c3356178p-1}, + {-0x1.999999a42160cp-1, -0x1.6f494c3356177p-1, -0x1.6f494c3356178p-1}, + {0x1.999999aab8f5p-1, 0x1.6f494c37edd6ep-1, 0x1.6f494c37edd6dp-1}, + {-0x1.999999aab8f5p-1, -0x1.6f494c37edd6ep-1, -0x1.6f494c37edd6dp-1}, + {0x1.9a2324b9c6326p-1, 0x1.6fa912bdeaab2p-1, 0x1.6fa912bdeaab3p-1}, + {-0x1.9a2324b9c6326p-1, -0x1.6fa912bdeaab2p-1, -0x1.6fa912bdeaab3p-1}, + {0x1.9bcp-1, 0x1.70c7ef4ef9b34p-1, 0x1.70c7ef4ef9b35p-1}, + {-0x1.9bcp-1, -0x1.70c7ef4ef9b34p-1, -0x1.70c7ef4ef9b35p-1}, + {0x1.a0d1d817d6c4ap0, 0x1.ff28176ad3164p-1, 0x1.ff28176ad3163p-1}, + {-0x1.a0d1d817d6c4ap0, -0x1.ff28176ad3164p-1, -0x1.ff28176ad3163p-1}, + {0x1.a141c9de12fdfp-1, 0x1.749468a7248dep-1, 0x1.749468a7248ddp-1}, + {-0x1.a141c9de12fdfp-1, -0x1.749468a7248dep-1, -0x1.749468a7248ddp-1}, + {0x1.a251bc6766f2p-1, 0x1.754ebb7e73f46p-1, 0x1.754ebb7e73f45p-1}, + {-0x1.a251bc6766f2p-1, -0x1.754ebb7e73f46p-1, -0x1.754ebb7e73f45p-1}, + {0x1.a2689ae1b86ddp62, -0x1.7c3bfefa74bd1p-1, -0x1.7c3bfefa74bdp-1}, + {-0x1.a2689ae1b86ddp62, 0x1.7c3bfefa74bd1p-1, 0x1.7c3bfefa74bdp-1}, + {0x1.a3f66180c455p100, -0x1.ffff4f3648e03p-1, -0x1.ffff4f3648e02p-1}, + {-0x1.a3f66180c455p100, 0x1.ffff4f3648e03p-1, 0x1.ffff4f3648e02p-1}, + {0x1.a3fdd2a5286c3p1, -0x1.1cf463983c0e3p-3, -0x1.1cf463983c0e2p-3}, + {-0x1.a3fdd2a5286c3p1, 0x1.1cf463983c0e3p-3, 0x1.1cf463983c0e2p-3}, + {0x1.a44p0, 0x1.feb7948d224d8p-1, 0x1.feb7948d224d7p-1}, + {-0x1.a44p0, -0x1.feb7948d224d8p-1, -0x1.feb7948d224d7p-1}, + {0x1.a701ef3c7d54bp-1, 0x1.78801e3e11665p-1, 0x1.78801e3e11664p-1}, + {-0x1.a701ef3c7d54bp-1, -0x1.78801e3e11665p-1, -0x1.78801e3e11664p-1}, + {0x1.a8c01fd43cp537, -0x1.fff11e871d59cp-1, -0x1.fff11e871d59dp-1}, + {-0x1.a8c01fd43cp537, 0x1.fff11e871d59cp-1, 0x1.fff11e871d59dp-1}, + {0x1.a8e29b7602f3bp0, 0x1.fdfa4366eb733p-1, 0x1.fdfa4366eb734p-1}, + {-0x1.a8e29b7602f3bp0, -0x1.fdfa4366eb733p-1, -0x1.fdfa4366eb734p-1}, + {0x1.a94p0, 0x1.fde98b94e7948p-1, 0x1.fde98b94e7947p-1}, + {-0x1.a94p0, -0x1.fde98b94e7948p-1, -0x1.fde98b94e7947p-1}, + {0x1.aa445fce93b82p2, 0x1.7931cba100008p-2, 0x1.7931cba100009p-2}, + {-0x1.aa445fce93b82p2, -0x1.7931cba100008p-2, -0x1.7931cba100009p-2}, + {0x1.aaa3fbc359fbep-1, 0x1.7af3f76c7a708p-1, 0x1.7af3f76c7a709p-1}, + {-0x1.aaa3fbc359fbep-1, -0x1.7af3f76c7a708p-1, -0x1.7af3f76c7a709p-1}, + {0x1.abdd3dbd4d86p119, 0x1.fd74e53ae32fdp-6, 0x1.fd74e53ae32fcp-6}, + {-0x1.abdd3dbd4d86p119, -0x1.fd74e53ae32fdp-6, -0x1.fd74e53ae32fcp-6}, + {0x1.ae2165a0c9f8ep-1, 0x1.7d4a7bf183a34p-1, 0x1.7d4a7bf183a33p-1}, + {-0x1.ae2165a0c9f8ep-1, -0x1.7d4a7bf183a34p-1, -0x1.7d4a7bf183a33p-1}, + {0x1.ae8dfefcfe13bp2, 0x1.b81410edc79e1p-2, 0x1.b81410edc79ep-2}, + {-0x1.ae8dfefcfe13bp2, -0x1.b81410edc79e1p-2, -0x1.b81410edc79ep-2}, + {0x1.b5597f950ee8cp29, -0x1.ff751561dc50ap-2, -0x1.ff751561dc509p-2}, + {-0x1.b5597f950ee8cp29, 0x1.ff751561dc50ap-2, 0x1.ff751561dc509p-2}, + {0x1.bab62ed655019p970, 0x1.027d184afb198p-52, 0x1.027d184afb199p-52}, + {-0x1.bab62ed655019p970, -0x1.027d184afb198p-52, -0x1.027d184afb199p-52}, + {0x1.bc573c4ffffffp-10, 0x1.bc572e5e413e1p-10, 0x1.bc572e5e413e2p-10}, + {-0x1.bc573c4ffffffp-10, -0x1.bc572e5e413e1p-10, -0x1.bc572e5e413e2p-10}, + {0x1.bef5cd25ab1adp9, 0x1.fb300f1e39afep-1, 0x1.fb300f1e39affp-1}, + {-0x1.bef5cd25ab1adp9, -0x1.fb300f1e39afep-1, -0x1.fb300f1e39affp-1}, + {0x1.bfdf6df2a24c1p-2, 0x1.b1baaf622d3a3p-2, 0x1.b1baaf622d3a2p-2}, + {-0x1.bfdf6df2a24c1p-2, -0x1.b1baaf622d3a3p-2, -0x1.b1baaf622d3a2p-2}, + {0x1.bfffffdffffffp-1, 0x1.88fb762c35ce4p-1, 0x1.88fb762c35ce3p-1}, + {-0x1.bfffffdffffffp-1, -0x1.88fb762c35ce4p-1, -0x1.88fb762c35ce3p-1}, + {0x1.c2b489520e376p920, 0x1.fe0ebff99ab8dp-1, 0x1.fe0ebff99ab8cp-1}, + {-0x1.c2b489520e376p920, -0x1.fe0ebff99ab8dp-1, -0x1.fe0ebff99ab8cp-1}, + {0x1.c54beb008547p5, 0x1.cf7f749f2a836p-4, 0x1.cf7f749f2a835p-4}, + {-0x1.c54beb008547p5, -0x1.cf7f749f2a836p-4, -0x1.cf7f749f2a835p-4}, + {0x1.c5ad34f5f472ap-2, 0x1.b6facf6658915p-2, 0x1.b6facf6658914p-2}, + {-0x1.c5ad34f5f472ap-2, -0x1.b6facf6658915p-2, -0x1.b6facf6658914p-2}, + {0x1.c728fc2f34bd6p-2, 0x1.b851cd9b84ee7p-2, 0x1.b851cd9b84ee6p-2}, + {-0x1.c728fc2f34bd6p-2, -0x1.b851cd9b84ee7p-2, -0x1.b851cd9b84ee6p-2}, + {0x1.c92b0f6105089p-2, 0x1.ba21b53cf2ff3p-2, 0x1.ba21b53cf2ff2p-2}, + {-0x1.c92b0f6105089p-2, -0x1.ba21b53cf2ff3p-2, -0x1.ba21b53cf2ff2p-2}, + {0x1.c9dfbbe9ec704p-5, 0x1.c9a2b68e30ec7p-5, 0x1.c9a2b68e30ec8p-5}, + {-0x1.c9dfbbe9ec704p-5, -0x1.c9a2b68e30ec7p-5, -0x1.c9a2b68e30ec8p-5}, + {0x1.caf31bd7ee217p0, 0x1.f370115c9ab35p-1, 0x1.f370115c9ab36p-1}, + {-0x1.caf31bd7ee217p0, -0x1.f370115c9ab35p-1, -0x1.f370115c9ab36p-1}, + {0x1.cb44e86bc192bp648, -0x1.dd38a1f1d289bp-54, -0x1.dd38a1f1d289cp-54}, + {-0x1.cb44e86bc192bp648, 0x1.dd38a1f1d289bp-54, 0x1.dd38a1f1d289cp-54}, + {0x1.cb44e86bc192bp649, 0x1.dd38a1f1d289bp-53, 0x1.dd38a1f1d289cp-53}, + {-0x1.cb44e86bc192bp649, -0x1.dd38a1f1d289bp-53, -0x1.dd38a1f1d289cp-53}, + {0x1.cb6p-3, 0x1.c7885aef33a95p-3, 0x1.c7885aef33a94p-3}, + {-0x1.cb6p-3, -0x1.c7885aef33a95p-3, -0x1.c7885aef33a94p-3}, + {0x1.ce2271d2f662fp-4, 0x1.cd279aa6196b6p-4, 0x1.cd279aa6196b5p-4}, + {-0x1.ce2271d2f662fp-4, -0x1.cd279aa6196b6p-4, -0x1.cd279aa6196b5p-4}, + {0x1.d0000000004p-1, 0x1.930b705f9fad2p-1, 0x1.930b705f9fad1p-1}, + {-0x1.d0000000004p-1, -0x1.930b705f9fad2p-1, -0x1.930b705f9fad1p-1}, + {0x1.d01p199, 0x1.7ef24c8e67d9ap-1, 0x1.7ef24c8e67d9bp-1}, + {-0x1.d01p199, -0x1.7ef24c8e67d9ap-1, -0x1.7ef24c8e67d9bp-1}, + {0x1.d024ba6f953cfp1000, 0x1.ffff124c001abp-1, 0x1.ffff124c001aap-1}, + {-0x1.d024ba6f953cfp1000, -0x1.ffff124c001abp-1, -0x1.ffff124c001aap-1}, + {0x1.d4067c60f471ep1, -0x1.f83a0983dd15dp-2, -0x1.f83a0983dd15ep-2}, + {-0x1.d4067c60f471ep1, 0x1.f83a0983dd15dp-2, 0x1.f83a0983dd15ep-2}, + {0x1.d7de6263bcaabp-5, 0x1.d79b9896ff555p-5, 0x1.d79b9896ff554p-5}, + {-0x1.d7de6263bcaabp-5, -0x1.d79b9896ff555p-5, -0x1.d79b9896ff554p-5}, + {0x1.d800000002274p0, 0x1.ed0b908a2983p-1, 0x1.ed0b908a2982fp-1}, + {-0x1.d800000002274p0, -0x1.ed0b908a2983p-1, -0x1.ed0b908a2982fp-1}, + {0x1.d96e058p488, -0x1.f2c217cbc7dcdp-1, -0x1.f2c217cbc7dccp-1}, + {-0x1.d96e058p488, 0x1.f2c217cbc7dcdp-1, 0x1.f2c217cbc7dccp-1}, + {0x1.d98c4c612718dp-1, 0x1.98dcd09337793p-1, 0x1.98dcd09337792p-1}, + {-0x1.d98c4c612718dp-1, -0x1.98dcd09337793p-1, -0x1.98dcd09337792p-1}, + {0x1.db8p-5, 0x1.db3ba8775ca26p-5, 0x1.db3ba8775ca25p-5}, + {-0x1.db8p-5, -0x1.db3ba8775ca26p-5, -0x1.db3ba8775ca25p-5}, + {0x1.de386d6090303p200, -0x1.9fee37697d582p-2, -0x1.9fee37697d583p-2}, + {-0x1.de386d6090303p200, 0x1.9fee37697d582p-2, 0x1.9fee37697d583p-2}, + {0x1.de5e5054e921bp35, -0x1.5361ee6553188p-53, -0x1.5361ee6553189p-53}, + {-0x1.de5e5054e921bp35, 0x1.5361ee6553188p-53, 0x1.5361ee6553189p-53}, + {0x1.df77ddf77ddf4p10, 0x1.fec48d5e769ecp-1, 0x1.fec48d5e769ebp-1}, + {-0x1.df77ddf77ddf4p10, -0x1.fec48d5e769ecp-1, -0x1.fec48d5e769ebp-1}, + {0x1.e1562b0448a86p1, -0x1.2902a83d72632p-1, -0x1.2902a83d72633p-1}, + {-0x1.e1562b0448a86p1, 0x1.2902a83d72632p-1, 0x1.2902a83d72633p-1}, + {0x1.e2700cdc86635p-1, 0x1.9e26c7bc96b69p-1, 0x1.9e26c7bc96b68p-1}, + {-0x1.e2700cdc86635p-1, -0x1.9e26c7bc96b69p-1, -0x1.9e26c7bc96b68p-1}, + {0x1.e64ddaf7bd73p-7, 0x1.e6494911eedd2p-7, 0x1.e6494911eedd1p-7}, + {-0x1.e64ddaf7bd73p-7, -0x1.e6494911eedd2p-7, -0x1.e6494911eedd1p-7}, + {0x1.eb7239bca8afap-5, 0x1.eb26c690bda25p-5, 0x1.eb26c690bda24p-5}, + {-0x1.eb7239bca8afap-5, -0x1.eb26c690bda25p-5, -0x1.eb26c690bda24p-5}, + {0x1.ef7b83f7bdef4p3, 0x1.c73238790a4cfp-3, 0x1.c73238790a4cep-3}, + {-0x1.ef7b83f7bdef4p3, -0x1.c73238790a4cfp-3, -0x1.c73238790a4cep-3}, + {0x1.f20000000109bp-3, 0x1.ed1b575acb8c8p-3, 0x1.ed1b575acb8c9p-3}, + {-0x1.f20000000109bp-3, -0x1.ed1b575acb8c8p-3, -0x1.ed1b575acb8c9p-3}, + {0x1.f40ca67a9e8d7p9, 0x1.c1b50a56c8809p-1, 0x1.c1b50a56c880ap-1}, + {-0x1.f40ca67a9e8d7p9, -0x1.c1b50a56c8809p-1, -0x1.c1b50a56c880ap-1}, + {0x1.f7224d2c7754p-2, 0x1.e321fea643a96p-2, 0x1.e321fea643a97p-2}, + {-0x1.f7224d2c7754p-2, -0x1.e321fea643a96p-2, -0x1.e321fea643a97p-2}, + {0x1.f78a0d05e60e2p6, 0x1.c1269b020a108p-3, 0x1.c1269b020a107p-3}, + {-0x1.f78a0d05e60e2p6, -0x1.c1269b020a108p-3, -0x1.c1269b020a107p-3}, + {0x1.f7bdef7bdf073p-5, 0x1.f76cae28a0775p-5, 0x1.f76cae28a0774p-5}, + {-0x1.f7bdef7bdf073p-5, -0x1.f76cae28a0775p-5, -0x1.f76cae28a0774p-5}, + {0x1.f8502d5955443p-2, 0x1.e42c139dc2054p-2, 0x1.e42c139dc2053p-2}, + {-0x1.f8502d5955443p-2, -0x1.e42c139dc2054p-2, -0x1.e42c139dc2053p-2}, + {0x1.f8fc824d2693bp61, 0x1.0fa749e07f64p-9, 0x1.0fa749e07f63fp-9}, + {-0x1.f8fc824d2693bp61, -0x1.0fa749e07f64p-9, -0x1.0fa749e07f63fp-9}, + {0x1.f8fffffffffffp2, 0x1.ffa80324e2d8fp-1, 0x1.ffa80324e2d8ep-1}, + {-0x1.f8fffffffffffp2, -0x1.ffa80324e2d8fp-1, -0x1.ffa80324e2d8ep-1}, + {0x1.fd8p1, -0x1.7cdf79d5e37b8p-1, -0x1.7cdf79d5e37b9p-1}, + {-0x1.fd8p1, 0x1.7cdf79d5e37b8p-1, 0x1.7cdf79d5e37b9p-1}, + {0x1.fd9364d936596p-5, 0x1.fd3f48847a1d1p-5, 0x1.fd3f48847a1d2p-5}, + {-0x1.fd9364d936596p-5, -0x1.fd3f48847a1d1p-5, -0x1.fd3f48847a1d2p-5}, + {0x1.fe8p-3, 0x1.f93ad471d262fp-3, 0x1.f93ad471d263p-3}, + {-0x1.fe8p-3, -0x1.f93ad471d262fp-3, -0x1.f93ad471d263p-3}, + {0x1.febb646e2ee57p13, 0x1.83b3062414974p-1, 0x1.83b3062414973p-1}, + {-0x1.febb646e2ee57p13, -0x1.83b3062414974p-1, -0x1.83b3062414973p-1}, + {0x1.feeffffffffc6p995, 0x1.3b45bd7449775p-1, 0x1.3b45bd7449776p-1}, + {-0x1.feeffffffffc6p995, -0x1.3b45bd7449775p-1, -0x1.3b45bd7449776p-1}, + {0x1.ff8ffffffffffp7, -0x1.eefb59d143646p-1, -0x1.eefb59d143645p-1}, + {-0x1.ff8ffffffffffp7, 0x1.eefb59d143646p-1, 0x1.eefb59d143645p-1}, + {0x1.ff8ffffffffffp870, -0x1.56433f0c6bceep-1, -0x1.56433f0c6bcefp-1}, + {-0x1.ff8ffffffffffp870, 0x1.56433f0c6bceep-1, 0x1.56433f0c6bcefp-1}, + {0x1.ffcfff8p19, -0x1.930006246a6cp-2, -0x1.930006246a6c1p-2}, + {-0x1.ffcfff8p19, 0x1.930006246a6cp-2, 0x1.930006246a6c1p-2}, + {0x1.ffcfff8p365, 0x1.ded37a1f0aa6dp-1, 0x1.ded37a1f0aa6ep-1}, + {-0x1.ffcfff8p365, -0x1.ded37a1f0aa6dp-1, -0x1.ded37a1f0aa6ep-1}, + {0x1.ffcffffffff6cp720, -0x1.93e4d96b621ep-1, -0x1.93e4d96b621e1p-1}, + {-0x1.ffcffffffff6cp720, 0x1.93e4d96b621ep-1, 0x1.93e4d96b621e1p-1}, + {0x1.ffcfffffffff9p320, 0x1.9068b90e42606p-1, 0x1.9068b90e42605p-1}, + {-0x1.ffcfffffffff9p320, -0x1.9068b90e42606p-1, -0x1.9068b90e42605p-1}, + {0x1.ffcffffffffffp12, 0x1.cf81642e7421cp-1, 0x1.cf81642e7421dp-1}, + {-0x1.ffcffffffffffp12, -0x1.cf81642e7421cp-1, -0x1.cf81642e7421dp-1}, + {0x1.ffcffffffffffp404, 0x1.ffffffe61fe61p-1, 0x1.ffffffe61fe62p-1}, + {-0x1.ffcffffffffffp404, -0x1.ffffffe61fe61p-1, -0x1.ffffffe61fe62p-1}, + {0x1.ffeffffffffccp995, -0x1.406ee9ae91e17p-1, -0x1.406ee9ae91e16p-1}, + {-0x1.ffeffffffffccp995, 0x1.406ee9ae91e17p-1, 0x1.406ee9ae91e16p-1}, + {0x1.ffeffffffffffp-3, 0x1.fa9f6ca0ec44ep-3, 0x1.fa9f6ca0ec44fp-3}, + {-0x1.ffeffffffffffp-3, -0x1.fa9f6ca0ec44ep-3, -0x1.fa9f6ca0ec44fp-3}, + {0x1.ffeffffffffffp55, 0x1.6b491db8b66d9p-4, 0x1.6b491db8b66d8p-4}, + {-0x1.ffeffffffffffp55, -0x1.6b491db8b66d9p-4, -0x1.6b491db8b66d8p-4}, + {0x1.ffeffffffffffp180, 0x1.fb0ab102cb13p-1, 0x1.fb0ab102cb12fp-1}, + {-0x1.ffeffffffffffp180, -0x1.fb0ab102cb13p-1, -0x1.fb0ab102cb12fp-1}, + {0x1.ffeffffffffffp706, 0x1.e4315ec04635dp-3, 0x1.e4315ec04635cp-3}, + {-0x1.ffeffffffffffp706, -0x1.e4315ec04635dp-3, -0x1.e4315ec04635cp-3}, + {0x1.fff1fffffffffp41, 0x1.ffffc39997ef6p-1, 0x1.ffffc39997ef7p-1}, + {-0x1.fff1fffffffffp41, -0x1.ffffc39997ef6p-1, -0x1.ffffc39997ef7p-1}, + {0x1.fff6b89ffffffp-7, 0x1.fff163992831fp-7, 0x1.fff163992831ep-7}, + {-0x1.fff6b89ffffffp-7, -0x1.fff163992831fp-7, -0x1.fff163992831ep-7}, + {0x1.fffdffff0001fp105, -0x1.d9757a05fcc43p-1, -0x1.d9757a05fcc42p-1}, + {-0x1.fffdffff0001fp105, 0x1.d9757a05fcc43p-1, 0x1.d9757a05fcc42p-1}, + {0x1.ffff0c0000002p1, -0x1.83791fe63a17ap-1, -0x1.83791fe63a17bp-1}, + {-0x1.ffff0c0000002p1, 0x1.83791fe63a17ap-1, 0x1.83791fe63a17bp-1}, + {0x1.ffffc00000055p150, -0x1.d9d3a85acc50dp-1, -0x1.d9d3a85acc50cp-1}, + {-0x1.ffffc00000055p150, 0x1.d9d3a85acc50dp-1, 0x1.d9d3a85acc50cp-1}, + {0x1.ffffe3fffffffp40, -0x1.f25d858dcdee7p-3, -0x1.f25d858dcdee8p-3}, + {-0x1.ffffe3fffffffp40, 0x1.f25d858dcdee7p-3, 0x1.f25d858dcdee8p-3}, + {0x1.ffffefffcffaep0, 0x1.d18f7bfe557ecp-1, 0x1.d18f7bfe557ebp-1}, + {-0x1.ffffefffcffaep0, -0x1.d18f7bfe557ecp-1, -0x1.d18f7bfe557ebp-1}, + {0x1.fffffbfffffffp228, -0x1.bc14ebf6bfb52p-4, -0x1.bc14ebf6bfb51p-4}, + {-0x1.fffffbfffffffp228, 0x1.bc14ebf6bfb52p-4, 0x1.bc14ebf6bfb51p-4}, + {0x1.fffffbfffffffp735, 0x1.bb887a06f6c51p-3, 0x1.bb887a06f6c5p-3}, + {-0x1.fffffbfffffffp735, -0x1.bb887a06f6c51p-3, -0x1.bb887a06f6c5p-3}, + {0x1.fffffefffffffp-5, 0x1.ffaaadef54e2fp-5, 0x1.ffaaadef54e3p-5}, + {-0x1.fffffefffffffp-5, -0x1.ffaaadef54e2fp-5, -0x1.ffaaadef54e3p-5}, + {0x1.ffffff8p119, 0x1.d4a3c62c5be09p-1, 0x1.d4a3c62c5be08p-1}, + {-0x1.ffffff8p119, -0x1.d4a3c62c5be09p-1, -0x1.d4a3c62c5be08p-1}, + {0x1.ffffff8p192, 0x1.cec20f197703fp-3, 0x1.cec20f197704p-3}, + {-0x1.ffffff8p192, -0x1.cec20f197703fp-3, -0x1.cec20f197704p-3}, + {0x1.ffffff8p543, 0x1.d37aadc7c8662p-2, 0x1.d37aadc7c8663p-2}, + {-0x1.ffffff8p543, -0x1.d37aadc7c8662p-2, -0x1.d37aadc7c8663p-2}, + {0x1.ffffffc0018ffp2, 0x1.fa8d2a4d0a202p-1, 0x1.fa8d2a4d0a203p-1}, + {-0x1.ffffffc0018ffp2, -0x1.fa8d2a4d0a202p-1, -0x1.fa8d2a4d0a203p-1}, + {0x1.ffffffffeffffp2, 0x1.fa8d2a029f978p-1, 0x1.fa8d2a029f977p-1}, + {-0x1.ffffffffeffffp2, -0x1.fa8d2a029f978p-1, -0x1.fa8d2a029f977p-1}, + {0x1.fffffffff825p943, -0x1.2763f02a2d1eap-4, -0x1.2763f02a2d1e9p-4}, + {-0x1.fffffffff825p943, 0x1.2763f02a2d1eap-4, 0x1.2763f02a2d1e9p-4}, + {0x1.fffffffffe09dp320, 0x1.fcff128f77ddbp-1, 0x1.fcff128f77ddap-1}, + {-0x1.fffffffffe09dp320, -0x1.fcff128f77ddbp-1, -0x1.fcff128f77ddap-1}, + {0x1.fffffffffe6e3p720, -0x1.fcc0bfedd84a6p-1, -0x1.fcc0bfedd84a5p-1}, + {-0x1.fffffffffe6e3p720, 0x1.fcc0bfedd84a6p-1, 0x1.fcc0bfedd84a5p-1}, + {0x1.ffffffffffe7fp-1, 0x1.aed548f090c1ep-1, 0x1.aed548f090c1dp-1}, + {-0x1.ffffffffffe7fp-1, -0x1.aed548f090c1ep-1, -0x1.aed548f090c1dp-1}, + {0x1.ffffffffffeffp250, -0x1.f5e11def99d2bp-1, -0x1.f5e11def99d2cp-1}, + {-0x1.ffffffffffeffp250, 0x1.f5e11def99d2bp-1, 0x1.f5e11def99d2cp-1}, + {0x1.fffffffffff78p920, 0x1.8a9cbf48fec9fp-1, 0x1.8a9cbf48fecap-1}, + {-0x1.fffffffffff78p920, -0x1.8a9cbf48fec9fp-1, -0x1.8a9cbf48fecap-1}, + {0x1.fffffffffff83p150, -0x1.7eba5894844ccp-3, -0x1.7eba5894844cdp-3}, + {-0x1.fffffffffff83p150, 0x1.7eba5894844ccp-3, 0x1.7eba5894844cdp-3}, + {0x1.fffffffffffd5p995, 0x1.92c4f06d2cdd1p-1, 0x1.92c4f06d2cdd2p-1}, + {-0x1.fffffffffffd5p995, -0x1.92c4f06d2cdd1p-1, -0x1.92c4f06d2cdd2p-1}, + {0x1.fffffffffffe8p720, -0x1.3d5f7deb1d3bbp-1, -0x1.3d5f7deb1d3bap-1}, + {-0x1.fffffffffffe8p720, 0x1.3d5f7deb1d3bbp-1, 0x1.3d5f7deb1d3bap-1}, + {0x1.fffffffffffebp920, -0x1.91349b0ae90e5p-1, -0x1.91349b0ae90e6p-1}, + {-0x1.fffffffffffebp920, 0x1.91349b0ae90e5p-1, 0x1.91349b0ae90e6p-1}, + {0x1.ffffffffffff1p1, -0x1.837b9dddc1e88p-1, -0x1.837b9dddc1e87p-1}, + {-0x1.ffffffffffff1p1, 0x1.837b9dddc1e88p-1, 0x1.837b9dddc1e87p-1}, + {0x1.ffffffffffff1p245, 0x1.510e062e7fa2p-1, 0x1.510e062e7fa21p-1}, + {-0x1.ffffffffffff1p245, -0x1.510e062e7fa2p-1, -0x1.510e062e7fa21p-1}, + {0x1.ffffffffffff3p-2, 0x1.eaee8744b05e5p-2, 0x1.eaee8744b05e4p-2}, + {-0x1.ffffffffffff3p-2, -0x1.eaee8744b05e5p-2, -0x1.eaee8744b05e4p-2}, + {0x1.ffffffffffff4p845, 0x1.8a4dee8f40628p-1, 0x1.8a4dee8f40627p-1}, + {-0x1.ffffffffffff4p845, -0x1.8a4dee8f40628p-1, -0x1.8a4dee8f40627p-1}, + {0x1.ffffffffffff4p1020, 0x1.5118d6bbde07ep-1, 0x1.5118d6bbde07fp-1}, + {-0x1.ffffffffffff4p1020, -0x1.5118d6bbde07ep-1, -0x1.5118d6bbde07fp-1}, + {0x1.ffffffffffff8p616, -0x1.5cd5c53cf30a9p-1, -0x1.5cd5c53cf30aap-1}, + {-0x1.ffffffffffff8p616, 0x1.5cd5c53cf30a9p-1, 0x1.5cd5c53cf30aap-1}, + {0x1.ffffffffffffcp475, 0x1.ffffa1f0d7dafp-1, 0x1.ffffa1f0d7dbp-1}, + {-0x1.ffffffffffffcp475, -0x1.ffffa1f0d7dafp-1, -0x1.ffffa1f0d7dbp-1}, + {0x1.ffffffffffffep970, 0x1.51e9d840106d7p-1, 0x1.51e9d840106d8p-1}, + {-0x1.ffffffffffffep970, -0x1.51e9d840106d7p-1, -0x1.51e9d840106d8p-1}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0p0, -0x0.0p0, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {-0x1.0000000000001p-1022, -0x1.0000000000001p-1022, -0x1.0000000000001p-1022}, + {0x1.0000000000001p-1022, 0x1.0000000000001p-1022, 0x1.0000000000001p-1022}, + {-0x1.0p-1022, -0x1.0p-1022, -0x1.0p-1022}, + {0x1.0p-1022, 0x1.0p-1022, 0x1.0p-1022}, + {-0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022}, + {0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022}, + {0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022}, + {-0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022}, + {0x1.0p-1022, 0x1.0p-1022, 0x1.0p-1022}, + {-0x1.0p-1022, -0x1.0p-1022, -0x1.0p-1022}, + {0x1.0000000000001p-1022, 0x1.0000000000001p-1022, 0x1.0000000000001p-1022}, + {-0x1.0000000000001p-1022, -0x1.0000000000001p-1022, -0x1.0000000000001p-1022}, + {0x1.999999999999ap-13, 0x1.9999996de8ca2p-13, 0x1.9999996de8ca1p-13}, + {-0x1.999999999999ap-13, -0x1.9999996de8ca2p-13, -0x1.9999996de8ca1p-13}, + {0x1.999999999999ap-12, 0x1.999998ead65b9p-12, 0x1.999998ead65bap-12}, + {-0x1.999999999999ap-12, -0x1.999998ead65b9p-12, -0x1.999998ead65bap-12}, + {0x1.3333333333334p-11, 0x1.3333320c49bacp-11, 0x1.3333320c49babp-11}, + {-0x1.3333333333334p-11, -0x1.3333320c49bacp-11, -0x1.3333320c49babp-11}, + {0x1.999999999999ap-11, 0x1.999996de8ca29p-11, 0x1.999996de8ca28p-11}, + {-0x1.999999999999ap-11, -0x1.999996de8ca29p-11, -0x1.999996de8ca28p-11}, + {0x1.0p-10, 0x1.fffffaaaaaaefp-11, 0x1.fffffaaaaaaeep-11}, + {-0x1.0p-10, -0x1.fffffaaaaaaefp-11, -0x1.fffffaaaaaaeep-11}, + {0x1.3333333333333p-10, 0x1.33332e978d553p-10, 0x1.33332e978d552p-10}, + {-0x1.3333333333333p-10, -0x1.33332e978d553p-10, -0x1.33332e978d552p-10}, + {0x1.6666666666666p-10, 0x1.66665f1529bp-10, 0x1.66665f1529affp-10}, + {-0x1.6666666666666p-10, -0x1.66665f1529bp-10, -0x1.66665f1529affp-10}, + {0x1.9999999999999p-10, 0x1.99998ead65cep-10, 0x1.99998ead65cdfp-10}, + {-0x1.9999999999999p-10, -0x1.99998ead65cep-10, -0x1.99998ead65cdfp-10}, + {0x1.cccccccccccccp-10, 0x1.ccccbd3f7d15dp-10, 0x1.ccccbd3f7d15ep-10}, + {-0x1.cccccccccccccp-10, -0x1.ccccbd3f7d15dp-10, -0x1.ccccbd3f7d15ep-10}, + {0x1.0666666666666p-7, 0x1.0665ae9c7b44fp-7, 0x1.0665ae9c7b44ep-7}, + {-0x1.0666666666666p-7, -0x1.0665ae9c7b44fp-7, -0x1.0665ae9c7b44ep-7}, + {0x1.cccccccccccccp-7, 0x1.ccc8e97b59f62p-7, 0x1.ccc8e97b59f61p-7}, + {-0x1.cccccccccccccp-7, -0x1.ccc8e97b59f62p-7, -0x1.ccc8e97b59f61p-7}, + {0x1.4999999999999p-6, 0x1.4993e8a8ff79bp-6, 0x1.4993e8a8ff79cp-6}, + {-0x1.4999999999999p-6, -0x1.4993e8a8ff79bp-6, -0x1.4993e8a8ff79cp-6}, + {0x1.accccccccccccp-6, 0x1.acc044c56db0ep-6, 0x1.acc044c56db0fp-6}, + {-0x1.accccccccccccp-6, -0x1.acc044c56db0ep-6, -0x1.acc044c56db0fp-6}, + {0x1.08p-5, 0x1.07f44d67cf41bp-5, 0x1.07f44d67cf41ap-5}, + {-0x1.08p-5, -0x1.07f44d67cf41bp-5, -0x1.07f44d67cf41ap-5}, + {0x1.399999999999ap-5, 0x1.3985fe46f1c87p-5, 0x1.3985fe46f1c88p-5}, + {-0x1.399999999999ap-5, -0x1.3985fe46f1c87p-5, -0x1.3985fe46f1c88p-5}, + {0x1.6b33333333334p-5, 0x1.6b14bde93ac5fp-5, 0x1.6b14bde93ac6p-5}, + {-0x1.6b33333333334p-5, -0x1.6b14bde93ac5fp-5, -0x1.6b14bde93ac6p-5}, + {0x1.9cccccccccccep-5, 0x1.9ca0153ed8397p-5, 0x1.9ca0153ed8396p-5}, + {-0x1.9cccccccccccep-5, -0x1.9ca0153ed8397p-5, -0x1.9ca0153ed8396p-5}, + {0x1.ce66666666666p-5, 0x1.ce278d4027d34p-5, 0x1.ce278d4027d35p-5}, + {-0x1.ce66666666666p-5, -0x1.ce278d4027d34p-5, -0x1.ce278d4027d35p-5}, + {0x1.5e7fc4369bdadp-1, 0x1.43c1e9c171a66p-1, 0x1.43c1e9c171a67p-1}, + {-0x1.5e7fc4369bdadp-1, -0x1.43c1e9c171a66p-1, -0x1.43c1e9c171a67p-1}, + {0x1.4e7fc4369bdadp0, 0x1.ee3d6bcea09cap-1, 0x1.ee3d6bcea09cbp-1}, + {-0x1.4e7fc4369bdadp0, -0x1.ee3d6bcea09cap-1, -0x1.ee3d6bcea09cbp-1}, + {0x1.edbfa651e9c84p0, 0x1.df8e22ea809d6p-1, 0x1.df8e22ea809d7p-1}, + {-0x1.edbfa651e9c84p0, -0x1.df8e22ea809d6p-1, -0x1.df8e22ea809d7p-1}, + {0x1.467fc4369bdadp1, 0x1.1d3479eac7ae3p-1, 0x1.1d3479eac7ae4p-1}, + {-0x1.467fc4369bdadp1, -0x1.1d3479eac7ae3p-1, -0x1.1d3479eac7ae4p-1}, + {0x1.961fb54442d18p1, -0x1.ffeaaaeeee84bp-6, -0x1.ffeaaaeeee84cp-6}, + {-0x1.961fb54442d18p1, 0x1.ffeaaaeeee84bp-6, 0x1.ffeaaaeeee84cp-6}, + {0x1.e5bfa651e9c83p1, -0x1.3734d32d49bd1p-1, -0x1.3734d32d49bdp-1}, + {-0x1.e5bfa651e9c83p1, 0x1.3734d32d49bd1p-1, 0x1.3734d32d49bdp-1}, + {0x1.1aafcbafc85f7p2, -0x1.e9d25d19911e2p-1, -0x1.e9d25d19911e3p-1}, + {-0x1.1aafcbafc85f7p2, 0x1.e9d25d19911e2p-1, 0x1.e9d25d19911e3p-1}, + {0x1.427fc4369bdadp2, -0x1.e4ecdc5a4e466p-1, -0x1.e4ecdc5a4e465p-1}, + {-0x1.427fc4369bdadp2, 0x1.e4ecdc5a4e466p-1, 0x1.e4ecdc5a4e465p-1}, + {0x1.6a4fbcbd6f562p2, -0x1.2a59f10344262p-1, -0x1.2a59f10344261p-1}, + {-0x1.6a4fbcbd6f562p2, 0x1.2a59f10344262p-1, 0x1.2a59f10344261p-1}, + {0x1.6af2eff0a2896p2, -0x1.26312443bd35fp-1, -0x1.26312443bd36p-1}, + {-0x1.6af2eff0a2896p2, 0x1.26312443bd35fp-1, 0x1.26312443bd36p-1}, + {0x1.43c62a9d02414p2, -0x1.e18e660a5e2fbp-1, -0x1.e18e660a5e2fcp-1}, + {-0x1.43c62a9d02414p2, 0x1.e18e660a5e2fbp-1, 0x1.e18e660a5e2fcp-1}, + {0x1.1c99654961f92p2, -0x1.ee0e83a0198b7p-1, -0x1.ee0e83a0198b6p-1}, + {-0x1.1c99654961f92p2, 0x1.ee0e83a0198b7p-1, 0x1.ee0e83a0198b6p-1}, + {0x1.ead93feb8361fp1, -0x1.4727747338e46p-1, -0x1.4727747338e47p-1}, + {-0x1.ead93feb8361fp1, 0x1.4727747338e46p-1, 0x1.4727747338e47p-1}, + {0x1.9c7fb54442d1ap1, -0x1.4ba2f75dda5fep-4, -0x1.4ba2f75dda5ffp-4}, + {-0x1.9c7fb54442d1ap1, 0x1.4ba2f75dda5fep-4, 0x1.4ba2f75dda5ffp-4}, + {0x1.4e262a9d02415p1, 0x1.034c4d633b4efp-1, 0x1.034c4d633b4fp-1}, + {-0x1.4e262a9d02415p1, -0x1.034c4d633b4efp-1, -0x1.034c4d633b4fp-1}, + {0x1.ff993feb8362p0, 0x1.d1e4cde2f3945p-1, 0x1.d1e4cde2f3944p-1}, + {-0x1.ff993feb8362p0, -0x1.d1e4cde2f3945p-1, -0x1.d1e4cde2f3944p-1}, + {0x1.62e62a9d02416p0, 0x1.f750235c94992p-1, 0x1.f750235c94993p-1}, + {-0x1.62e62a9d02416p0, -0x1.f750235c94992p-1, -0x1.f750235c94993p-1}, + {0x1.8c662a9d02419p-1, 0x1.65f7d571279b1p-1, 0x1.65f7d571279bp-1}, + {-0x1.8c662a9d02419p-1, -0x1.65f7d571279b1p-1, -0x1.65f7d571279bp-1}, + {-0x1.a8aa1d11c44ffp0, -0x1.fe043f57369d7p-1, -0x1.fe043f57369d6p-1}, + {0x1.a8aa1d11c44ffp0, 0x1.fe043f57369d7p-1, 0x1.fe043f57369d6p-1}, + {-0x1.95ec8b9e03d54p0, -0x1.fff18f24f3e4cp-1, -0x1.fff18f24f3e4bp-1}, + {0x1.95ec8b9e03d54p0, 0x1.fff18f24f3e4cp-1, 0x1.fff18f24f3e4bp-1}, + {-0x1.832efa2a435a9p0, -0x1.ff20d961624e7p-1, -0x1.ff20d961624e8p-1}, + {0x1.832efa2a435a9p0, 0x1.ff20d961624e7p-1, 0x1.ff20d961624e8p-1}, + {-0x1.707168b682dfep0, -0x1.fb933c40107fdp-1, -0x1.fb933c40107fep-1}, + {0x1.707168b682dfep0, 0x1.fb933c40107fdp-1, 0x1.fb933c40107fep-1}, + {-0x1.5db3d742c2653p0, -0x1.f54d971881ad7p-1, -0x1.f54d971881ad6p-1}, + {0x1.5db3d742c2653p0, 0x1.f54d971881ad7p-1, 0x1.f54d971881ad6p-1}, + {-0x1.4af645cf01ea8p0, -0x1.ec5883b7b6cf5p-1, -0x1.ec5883b7b6cf4p-1}, + {0x1.4af645cf01ea8p0, 0x1.ec5883b7b6cf5p-1, 0x1.ec5883b7b6cf4p-1}, + {-0x1.3838b45b416fdp0, -0x1.e0c04a94e1731p-1, -0x1.e0c04a94e173p-1}, + {0x1.3838b45b416fdp0, 0x1.e0c04a94e1731p-1, 0x1.e0c04a94e173p-1}, + {-0x1.257b22e780f52p0, -0x1.d294d1f96c7ecp-1, -0x1.d294d1f96c7ebp-1}, + {0x1.257b22e780f52p0, 0x1.d294d1f96c7ecp-1, 0x1.d294d1f96c7ebp-1}, + {-0x1.12bd9173c07abp0, -0x1.c1e9883373d7fp-1, -0x1.c1e9883373d7ep-1}, + {0x1.12bd9173c07abp0, 0x1.c1e9883373d7fp-1, 0x1.c1e9883373d7ep-1}, + {-0x1.ea5c3ed5b385p-1, -0x1.a2c289d9d055bp-1, -0x1.a2c289d9d055ap-1}, + {0x1.ea5c3ed5b385p-1, 0x1.a2c289d9d055bp-1, 0x1.a2c289d9d055ap-1}, + {-0x1.d4b87dab670ap-1, -0x1.95f05257dbcb6p-1, -0x1.95f05257dbcb5p-1}, + {0x1.d4b87dab670ap-1, 0x1.95f05257dbcb6p-1, 0x1.95f05257dbcb5p-1}, + {-0x1.bf14bc811a8fp-1, -0x1.88647f26a6e0fp-1, -0x1.88647f26a6e1p-1}, + {0x1.bf14bc811a8fp-1, 0x1.88647f26a6e0fp-1, 0x1.88647f26a6e1p-1}, + {-0x1.a970fb56ce14p-1, -0x1.7a2541dfd4e75p-1, -0x1.7a2541dfd4e76p-1}, + {0x1.a970fb56ce14p-1, 0x1.7a2541dfd4e75p-1, 0x1.7a2541dfd4e76p-1}, + {-0x1.93cd3a2c8199p-1, -0x1.6b391e25bc26dp-1, -0x1.6b391e25bc26cp-1}, + {0x1.93cd3a2c8199p-1, 0x1.6b391e25bc26dp-1, 0x1.6b391e25bc26cp-1}, + {-0x1.7e297902351ep-1, -0x1.5ba6e6a8e7065p-1, -0x1.5ba6e6a8e7066p-1}, + {0x1.7e297902351ep-1, 0x1.5ba6e6a8e7065p-1, 0x1.5ba6e6a8e7066p-1}, + {-0x1.6885b7d7e8a3p-1, -0x1.4b75ba096fa55p-1, -0x1.4b75ba096fa54p-1}, + {0x1.6885b7d7e8a3p-1, 0x1.4b75ba096fa55p-1, 0x1.4b75ba096fa54p-1}, + {-0x1.52e1f6ad9c28p-1, -0x1.3aacff95a3123p-1, -0x1.3aacff95a3122p-1}, + {0x1.52e1f6ad9c28p-1, 0x1.3aacff95a3123p-1, 0x1.3aacff95a3122p-1}, + {-0x1.3d3e35834fadp-1, -0x1.295463e769285p-1, -0x1.295463e769284p-1}, + {0x1.3d3e35834fadp-1, 0x1.295463e769285p-1, 0x1.295463e769284p-1}, + {-0x1.0a0b02501c799p-1, -0x1.fc769b77e5885p-2, -0x1.fc769b77e5884p-2}, + {0x1.0a0b02501c799p-1, 0x1.fc769b77e5885p-2, 0x1.fc769b77e5884p-2}, + {-0x1.d8f7208e6b82cp-2, -0x1.c853c78462de4p-2, -0x1.c853c78462de5p-2}, + {0x1.d8f7208e6b82cp-2, 0x1.c853c78462de4p-2, 0x1.c853c78462de5p-2}, + {-0x1.9dd83c7c9e126p-2, -0x1.92aba90aaf272p-2, -0x1.92aba90aaf273p-2}, + {0x1.9dd83c7c9e126p-2, 0x1.92aba90aaf272p-2, 0x1.92aba90aaf273p-2}, + {-0x1.62b9586ad0a2p-2, -0x1.5bac064658f39p-2, -0x1.5bac064658f3ap-2}, + {0x1.62b9586ad0a2p-2, 0x1.5bac064658f39p-2, 0x1.5bac064658f3ap-2}, + {-0x1.279a74590331ap-2, -0x1.2383ca8078e58p-2, -0x1.2383ca8078e59p-2}, + {0x1.279a74590331ap-2, 0x1.2383ca8078e58p-2, 0x1.2383ca8078e59p-2}, + {-0x1.d8f7208e6b829p-3, -0x1.d4c5bc11d2372p-3, -0x1.d4c5bc11d2371p-3}, + {0x1.d8f7208e6b829p-3, 0x1.d4c5bc11d2372p-3, 0x1.d4c5bc11d2371p-3}, + {-0x1.62b9586ad0a1ep-3, -0x1.60f3faaf43024p-3, -0x1.60f3faaf43023p-3}, + {0x1.62b9586ad0a1ep-3, 0x1.60f3faaf43024p-3, 0x1.60f3faaf43023p-3}, + {-0x1.d8f7208e6b826p-4, -0x1.d7ea3de45a9d6p-4, -0x1.d7ea3de45a9d7p-4}, + {0x1.d8f7208e6b826p-4, 0x1.d7ea3de45a9d6p-4, 0x1.d7ea3de45a9d7p-4}, + {-0x1.d8f7208e6b82dp-5, -0x1.d8b3df489987ap-5, -0x1.d8b3df489987bp-5}, + {0x1.d8f7208e6b82dp-5, 0x1.d8b3df489987ap-5, 0x1.d8b3df489987bp-5}, + {0x1.d8f7208e6b82dp-5, 0x1.d8b3df489987ap-5, 0x1.d8b3df489987bp-5}, + {-0x1.d8f7208e6b82dp-5, -0x1.d8b3df489987ap-5, -0x1.d8b3df489987bp-5}, + {0x1.d8f7208e6b82dp-4, 0x1.d7ea3de45a9ddp-4, 0x1.d7ea3de45a9dep-4}, + {-0x1.d8f7208e6b82dp-4, -0x1.d7ea3de45a9ddp-4, -0x1.d7ea3de45a9dep-4}, + {0x1.62b9586ad0a22p-3, 0x1.60f3faaf43028p-3, 0x1.60f3faaf43027p-3}, + {-0x1.62b9586ad0a22p-3, -0x1.60f3faaf43028p-3, -0x1.60f3faaf43027p-3}, + {0x1.d8f7208e6b82dp-3, 0x1.d4c5bc11d2376p-3, 0x1.d4c5bc11d2375p-3}, + {-0x1.d8f7208e6b82dp-3, -0x1.d4c5bc11d2376p-3, -0x1.d4c5bc11d2375p-3}, + {0x1.279a74590331cp-2, 0x1.2383ca8078e5ap-2, 0x1.2383ca8078e5bp-2}, + {-0x1.279a74590331cp-2, -0x1.2383ca8078e5ap-2, -0x1.2383ca8078e5bp-2}, + {0x1.62b9586ad0a22p-2, 0x1.5bac064658f3bp-2, 0x1.5bac064658f3cp-2}, + {-0x1.62b9586ad0a22p-2, -0x1.5bac064658f3bp-2, -0x1.5bac064658f3cp-2}, + {0x1.9dd83c7c9e128p-2, 0x1.92aba90aaf274p-2, 0x1.92aba90aaf275p-2}, + {-0x1.9dd83c7c9e128p-2, -0x1.92aba90aaf274p-2, -0x1.92aba90aaf275p-2}, + {0x1.d8f7208e6b82ep-2, 0x1.c853c78462de6p-2, 0x1.c853c78462de7p-2}, + {-0x1.d8f7208e6b82ep-2, -0x1.c853c78462de6p-2, -0x1.c853c78462de7p-2}, + {0x1.0a0b02501c799p-1, 0x1.fc769b77e5885p-2, 0x1.fc769b77e5884p-2}, + {-0x1.0a0b02501c799p-1, -0x1.fc769b77e5885p-2, -0x1.fc769b77e5884p-2}, + {0x1.3d3e35834faccp-1, 0x1.295463e769281p-1, 0x1.295463e769282p-1}, + {-0x1.3d3e35834faccp-1, -0x1.295463e769281p-1, -0x1.295463e769282p-1}, + {0x1.52e1f6ad9c27cp-1, 0x1.3aacff95a312p-1, 0x1.3aacff95a311fp-1}, + {-0x1.52e1f6ad9c27cp-1, -0x1.3aacff95a312p-1, -0x1.3aacff95a311fp-1}, + {0x1.6885b7d7e8a2cp-1, 0x1.4b75ba096fa52p-1, 0x1.4b75ba096fa51p-1}, + {-0x1.6885b7d7e8a2cp-1, -0x1.4b75ba096fa52p-1, -0x1.4b75ba096fa51p-1}, + {0x1.7e297902351dcp-1, 0x1.5ba6e6a8e7062p-1, 0x1.5ba6e6a8e7063p-1}, + {-0x1.7e297902351dcp-1, -0x1.5ba6e6a8e7062p-1, -0x1.5ba6e6a8e7063p-1}, + {0x1.93cd3a2c8198cp-1, 0x1.6b391e25bc26ap-1, 0x1.6b391e25bc269p-1}, + {-0x1.93cd3a2c8198cp-1, -0x1.6b391e25bc26ap-1, -0x1.6b391e25bc269p-1}, + {0x1.a970fb56ce13cp-1, 0x1.7a2541dfd4e73p-1, 0x1.7a2541dfd4e72p-1}, + {-0x1.a970fb56ce13cp-1, -0x1.7a2541dfd4e73p-1, -0x1.7a2541dfd4e72p-1}, + {0x1.bf14bc811a8ecp-1, 0x1.88647f26a6e0dp-1, 0x1.88647f26a6e0cp-1}, + {-0x1.bf14bc811a8ecp-1, -0x1.88647f26a6e0dp-1, -0x1.88647f26a6e0cp-1}, + {0x1.d4b87dab6709cp-1, 0x1.95f05257dbcb4p-1, 0x1.95f05257dbcb3p-1}, + {-0x1.d4b87dab6709cp-1, -0x1.95f05257dbcb4p-1, -0x1.95f05257dbcb3p-1}, + {0x1.ea5c3ed5b384cp-1, 0x1.a2c289d9d0558p-1, 0x1.a2c289d9d0559p-1}, + {-0x1.ea5c3ed5b384cp-1, -0x1.a2c289d9d0558p-1, -0x1.a2c289d9d0559p-1}, + {0x1.12bd9173c07abp0, 0x1.c1e9883373d7fp-1, 0x1.c1e9883373d7ep-1}, + {-0x1.12bd9173c07abp0, -0x1.c1e9883373d7fp-1, -0x1.c1e9883373d7ep-1}, + {0x1.257b22e780f56p0, 0x1.d294d1f96c7efp-1, 0x1.d294d1f96c7fp-1}, + {-0x1.257b22e780f56p0, -0x1.d294d1f96c7efp-1, -0x1.d294d1f96c7fp-1}, + {0x1.3838b45b41701p0, 0x1.e0c04a94e1733p-1, 0x1.e0c04a94e1734p-1}, + {-0x1.3838b45b41701p0, -0x1.e0c04a94e1733p-1, -0x1.e0c04a94e1734p-1}, + {0x1.4af645cf01eacp0, 0x1.ec5883b7b6cf7p-1, 0x1.ec5883b7b6cf8p-1}, + {-0x1.4af645cf01eacp0, -0x1.ec5883b7b6cf7p-1, -0x1.ec5883b7b6cf8p-1}, + {0x1.5db3d742c2657p0, 0x1.f54d971881ad8p-1, 0x1.f54d971881ad9p-1}, + {-0x1.5db3d742c2657p0, -0x1.f54d971881ad8p-1, -0x1.f54d971881ad9p-1}, + {0x1.707168b682e02p0, 0x1.fb933c40107fep-1, 0x1.fb933c40107ffp-1}, + {-0x1.707168b682e02p0, -0x1.fb933c40107fep-1, -0x1.fb933c40107ffp-1}, + {0x1.832efa2a435adp0, 0x1.ff20d961624e7p-1, 0x1.ff20d961624e8p-1}, + {-0x1.832efa2a435adp0, -0x1.ff20d961624e7p-1, -0x1.ff20d961624e8p-1}, + {0x1.95ec8b9e03d58p0, 0x1.fff18f24f3e4bp-1, 0x1.fff18f24f3e4cp-1}, + {-0x1.95ec8b9e03d58p0, -0x1.fff18f24f3e4bp-1, -0x1.fff18f24f3e4cp-1}, + {0x1.a8aa1d11c44ffp0, 0x1.fe043f57369d7p-1, 0x1.fe043f57369d6p-1}, + {-0x1.a8aa1d11c44ffp0, -0x1.fe043f57369d7p-1, -0x1.fe043f57369d6p-1}, + {0x1.04aff6d330942p0, 0x1.b3d3695acc413p-1, 0x1.b3d3695acc414p-1}, + {-0x1.04aff6d330942p0, -0x1.b3d3695acc413p-1, -0x1.b3d3695acc414p-1}, + {0x1.04b09e98dcdb4p0, 0x1.b3d41972dc806p-1, 0x1.b3d41972dc807p-1}, + {-0x1.04b09e98dcdb4p0, -0x1.b3d41972dc806p-1, -0x1.b3d41972dc807p-1}, + {0x1.04b1465e89226p0, 0x1.b3d4c98a318fbp-1, 0x1.b3d4c98a318fcp-1}, + {-0x1.04b1465e89226p0, -0x1.b3d4c98a318fbp-1, -0x1.b3d4c98a318fcp-1}, + {0x1.04b1ee2435698p0, 0x1.b3d579a0cb6eep-1, 0x1.b3d579a0cb6efp-1}, + {-0x1.04b1ee2435698p0, -0x1.b3d579a0cb6eep-1, -0x1.b3d579a0cb6efp-1}, + {0x1.04b295e9e1b0ap0, 0x1.b3d629b6aa1dap-1, 0x1.b3d629b6aa1d9p-1}, + {-0x1.04b295e9e1b0ap0, -0x1.b3d629b6aa1dap-1, -0x1.b3d629b6aa1d9p-1}, + {0x1.04b33daf8df7cp0, 0x1.b3d6d9cbcd9bap-1, 0x1.b3d6d9cbcd9b9p-1}, + {-0x1.04b33daf8df7cp0, -0x1.b3d6d9cbcd9bap-1, -0x1.b3d6d9cbcd9b9p-1}, + {0x1.04b3e5753a3eep0, 0x1.b3d789e035e89p-1, 0x1.b3d789e035e8ap-1}, + {-0x1.04b3e5753a3eep0, -0x1.b3d789e035e89p-1, -0x1.b3d789e035e8ap-1}, + {0x1.04b48d3ae686p0, 0x1.b3d839f3e3043p-1, 0x1.b3d839f3e3044p-1}, + {-0x1.04b48d3ae686p0, -0x1.b3d839f3e3043p-1, -0x1.b3d839f3e3044p-1}, + {0x1.04b5350092ccfp0, 0x1.b3d8ea06d4eep-1, 0x1.b3d8ea06d4ee1p-1}, + {-0x1.04b5350092ccfp0, -0x1.b3d8ea06d4eep-1, -0x1.b3d8ea06d4ee1p-1}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0p0, -0x0.0p0, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x1.279a74590331bp-1, 0x1.1773d561fd506p-1, 0x1.1773d561fd507p-1}, + {-0x1.279a74590331bp-1, -0x1.1773d561fd506p-1, -0x1.1773d561fd507p-1}, + {0x1.279a74590331cp-1, 0x1.1773d561fd507p-1, 0x1.1773d561fd508p-1}, + {-0x1.279a74590331cp-1, -0x1.1773d561fd507p-1, -0x1.1773d561fd508p-1}, + {0x1.279a74590331dp-1, 0x1.1773d561fd508p-1, 0x1.1773d561fd509p-1}, + {-0x1.279a74590331dp-1, -0x1.1773d561fd508p-1, -0x1.1773d561fd509p-1}, + {0x1.bb67ae8584ca9p0, 0x1.f95b8e7107419p-1, 0x1.f95b8e7107418p-1}, + {-0x1.bb67ae8584ca9p0, -0x1.f95b8e7107419p-1, -0x1.f95b8e7107418p-1}, + {0x1.bb67ae8584caap0, 0x1.f95b8e7107418p-1, 0x1.f95b8e7107419p-1}, + {-0x1.bb67ae8584caap0, -0x1.f95b8e7107418p-1, -0x1.f95b8e7107419p-1}, + {0x1.bb67ae8584cabp0, 0x1.f95b8e7107418p-1, 0x1.f95b8e7107419p-1}, + {-0x1.bb67ae8584cabp0, -0x1.f95b8e7107418p-1, -0x1.f95b8e7107419p-1}, + {0x1.bffffffffffffp-2, 0x1.b1d8305321616p-2, 0x1.b1d8305321615p-2}, + {-0x1.bffffffffffffp-2, -0x1.b1d8305321616p-2, -0x1.b1d8305321615p-2}, + {0x1.cp-2, 0x1.b1d8305321617p-2, 0x1.b1d8305321616p-2}, + {-0x1.cp-2, -0x1.b1d8305321617p-2, -0x1.b1d8305321616p-2}, + {0x1.c000000000001p-2, 0x1.b1d8305321617p-2, 0x1.b1d8305321618p-2}, + {-0x1.c000000000001p-2, -0x1.b1d8305321617p-2, -0x1.b1d8305321618p-2}, + {0x1.5ffffffffffffp-1, 0x1.44eb381cf386ap-1, 0x1.44eb381cf3869p-1}, + {-0x1.5ffffffffffffp-1, -0x1.44eb381cf386ap-1, -0x1.44eb381cf3869p-1}, + {0x1.6p-1, 0x1.44eb381cf386bp-1, 0x1.44eb381cf386ap-1}, + {-0x1.6p-1, -0x1.44eb381cf386bp-1, -0x1.44eb381cf386ap-1}, + {0x1.6000000000001p-1, 0x1.44eb381cf386cp-1, 0x1.44eb381cf386bp-1}, + {-0x1.6000000000001p-1, -0x1.44eb381cf386cp-1, -0x1.44eb381cf386bp-1}, + {0x1.2ffffffffffffp0, 0x1.dad902fa8ac86p-1, 0x1.dad902fa8ac87p-1}, + {-0x1.2ffffffffffffp0, -0x1.dad902fa8ac86p-1, -0x1.dad902fa8ac87p-1}, + {0x1.3p0, 0x1.dad902fa8ac87p-1, 0x1.dad902fa8ac88p-1}, + {-0x1.3p0, -0x1.dad902fa8ac87p-1, -0x1.dad902fa8ac88p-1}, + {0x1.3000000000001p0, 0x1.dad902fa8ac88p-1, 0x1.dad902fa8ac87p-1}, + {-0x1.3000000000001p0, -0x1.dad902fa8ac88p-1, -0x1.dad902fa8ac87p-1}, + {0x1.37fffffffffffp1, 0x1.4b707a7acdedp-1, 0x1.4b707a7acdecfp-1}, + {-0x1.37fffffffffffp1, -0x1.4b707a7acdedp-1, -0x1.4b707a7acdecfp-1}, + {0x1.38p1, 0x1.4b707a7acdecdp-1, 0x1.4b707a7acdeccp-1}, + {-0x1.38p1, -0x1.4b707a7acdecdp-1, -0x1.4b707a7acdeccp-1}, + {0x1.3800000000001p1, 0x1.4b707a7acdecap-1, 0x1.4b707a7acdec9p-1}, + {-0x1.3800000000001p1, -0x1.4b707a7acdecap-1, -0x1.4b707a7acdec9p-1}, + {0x1.069c8b46b3792p-4, 0x1.066e7eb76f5c6p-4, 0x1.066e7eb76f5c7p-4}, + {-0x1.069c8b46b3792p-4, -0x1.066e7eb76f5c6p-4, -0x1.066e7eb76f5c7p-4}, + {0x1.069c8b46b3792p-3, 0x1.05e4761ab8d8fp-3, 0x1.05e4761ab8d9p-3}, + {-0x1.069c8b46b3792p-3, -0x1.05e4761ab8d8fp-3, -0x1.05e4761ab8d9p-3}, + {0x1.89ead0ea0d35bp-3, 0x1.877e2cd4f6fdap-3, 0x1.877e2cd4f6fd9p-3}, + {-0x1.89ead0ea0d35bp-3, -0x1.877e2cd4f6fdap-3, -0x1.877e2cd4f6fd9p-3}, + {0x1.069c8b46b3792p-2, 0x1.03be06f97cbeep-2, 0x1.03be06f97cbefp-2}, + {-0x1.069c8b46b3792p-2, -0x1.03be06f97cbeep-2, -0x1.03be06f97cbefp-2}, + {0x1.4843ae1860576p-2, 0x1.42abba8c72fbcp-2, 0x1.42abba8c72fbbp-2}, + {-0x1.4843ae1860576p-2, -0x1.42abba8c72fbcp-2, -0x1.42abba8c72fbbp-2}, + {0x1.89ead0ea0d35ap-2, 0x1.8045fe64e62dcp-2, 0x1.8045fe64e62ddp-2}, + {-0x1.89ead0ea0d35ap-2, -0x1.8045fe64e62dcp-2, -0x1.8045fe64e62ddp-2}, + {0x1.cb91f3bbba13ep-2, 0x1.bc4c04d71abbfp-2, 0x1.bc4c04d71abbep-2}, + {-0x1.cb91f3bbba13ep-2, -0x1.bc4c04d71abbfp-2, -0x1.bc4c04d71abbep-2}, + {0x1.069c8b46b3791p-1, 0x1.f67ea975b86ap-2, 0x1.f67ea975b86a1p-2}, + {-0x1.069c8b46b3791p-1, -0x1.f67ea975b86ap-2, -0x1.f67ea975b86a1p-2}, + {0x1.27701caf89e83p-1, 0x1.175059bf0d425p-1, 0x1.175059bf0d426p-1}, + {-0x1.27701caf89e83p-1, -0x1.175059bf0d425p-1, -0x1.175059bf0d426p-1}, + {0x1.4843ae1860575p-1, 0x1.323b8b1fb4ba2p-1, 0x1.323b8b1fb4ba3p-1}, + {-0x1.4843ae1860575p-1, -0x1.323b8b1fb4ba2p-1, -0x1.323b8b1fb4ba3p-1}, + {0x1.69173f8136c67p-1, 0x1.4be4979c5efb3p-1, 0x1.4be4979c5efb4p-1}, + {-0x1.69173f8136c67p-1, -0x1.4be4979c5efb3p-1, -0x1.4be4979c5efb4p-1}, + {0x1.89ead0ea0d359p-1, 0x1.643080d67acc1p-1, 0x1.643080d67acc2p-1}, + {-0x1.89ead0ea0d359p-1, -0x1.643080d67acc1p-1, -0x1.643080d67acc2p-1}, + {0x1.aabe6252e3a4bp-1, 0x1.7b05b7b6c612ep-1, 0x1.7b05b7b6c612fp-1}, + {-0x1.aabe6252e3a4bp-1, -0x1.7b05b7b6c612ep-1, -0x1.7b05b7b6c612fp-1}, + {0x1.cb91f3bbba13dp-1, 0x1.904c37505de49p-1, 0x1.904c37505de48p-1}, + {-0x1.cb91f3bbba13dp-1, -0x1.904c37505de49p-1, -0x1.904c37505de48p-1}, + {0x1.ec6585249082fp-1, 0x1.a3ed9e252938ap-1, 0x1.a3ed9e252938bp-1}, + {-0x1.ec6585249082fp-1, -0x1.a3ed9e252938ap-1, -0x1.a3ed9e252938bp-1}, + {0x1.069c8b46b3791p0, 0x1.b5d545b109bf9p-1, 0x1.b5d545b109bfap-1}, + {-0x1.069c8b46b3791p0, -0x1.b5d545b109bf9p-1, -0x1.b5d545b109bfap-1}, + {0x1.170653fb1eb0ap0, 0x1.c5f058230e7fdp-1, 0x1.c5f058230e7fep-1}, + {-0x1.170653fb1eb0ap0, -0x1.c5f058230e7fdp-1, -0x1.c5f058230e7fep-1}, + {0x1.27701caf89e83p0, 0x1.d42de42dce134p-1, 0x1.d42de42dce135p-1}, + {-0x1.27701caf89e83p0, -0x1.d42de42dce134p-1, -0x1.d42de42dce135p-1}, + {0x1.37d9e563f51fcp0, 0x1.e07eeeda109cbp-1, 0x1.e07eeeda109ccp-1}, + {-0x1.37d9e563f51fcp0, -0x1.e07eeeda109cbp-1, -0x1.e07eeeda109ccp-1}, + {0x1.4843ae1860575p0, 0x1.ead6834909b93p-1, 0x1.ead6834909b94p-1}, + {-0x1.4843ae1860575p0, -0x1.ead6834909b93p-1, -0x1.ead6834909b94p-1}, + {0x1.58ad76cccb8eep0, 0x1.f329c0558e968p-1, 0x1.f329c0558e967p-1}, + {-0x1.58ad76cccb8eep0, -0x1.f329c0558e968p-1, -0x1.f329c0558e967p-1}, + {0x1.69173f8136c67p0, 0x1.f96fe405f1ac6p-1, 0x1.f96fe405f1ac5p-1}, + {-0x1.69173f8136c67p0, -0x1.f96fe405f1ac6p-1, -0x1.f96fe405f1ac5p-1}, + {0x1.79810835a1fep0, 0x1.fda254c27a01fp-1, 0x1.fda254c27a02p-1}, + {-0x1.79810835a1fep0, -0x1.fda254c27a01fp-1, -0x1.fda254c27a02p-1}, + {0x1.89ead0ea0d359p0, 0x1.ffbca846c4fcap-1, 0x1.ffbca846c4fc9p-1}, + {-0x1.89ead0ea0d359p0, -0x1.ffbca846c4fcap-1, -0x1.ffbca846c4fc9p-1}, + {0x1.9a54999e786d2p0, 0x1.ffbca846c4fcap-1, 0x1.ffbca846c4fc9p-1}, + {-0x1.9a54999e786d2p0, -0x1.ffbca846c4fcap-1, -0x1.ffbca846c4fc9p-1}, + {0x1.aabe6252e3a4bp0, 0x1.fda254c27a02p-1, 0x1.fda254c27a021p-1}, + {-0x1.aabe6252e3a4bp0, -0x1.fda254c27a02p-1, -0x1.fda254c27a021p-1}, + {0x1.bb282b074edc4p0, 0x1.f96fe405f1ac8p-1, 0x1.f96fe405f1ac7p-1}, + {-0x1.bb282b074edc4p0, -0x1.f96fe405f1ac8p-1, -0x1.f96fe405f1ac7p-1}, + {0x1.cb91f3bbba13dp0, 0x1.f329c0558e96ap-1, 0x1.f329c0558e96bp-1}, + {-0x1.cb91f3bbba13dp0, -0x1.f329c0558e96ap-1, -0x1.f329c0558e96bp-1}, + {0x1.dbfbbc70254b6p0, 0x1.ead6834909b96p-1, 0x1.ead6834909b97p-1}, + {-0x1.dbfbbc70254b6p0, -0x1.ead6834909b96p-1, -0x1.ead6834909b97p-1}, + {0x1.ec6585249082fp0, 0x1.e07eeeda109cfp-1, 0x1.e07eeeda109dp-1}, + {-0x1.ec6585249082fp0, -0x1.e07eeeda109cfp-1, -0x1.e07eeeda109dp-1}, + {0x1.fccf4dd8fbba8p0, 0x1.d42de42dce139p-1, 0x1.d42de42dce138p-1}, + {-0x1.fccf4dd8fbba8p0, -0x1.d42de42dce139p-1, -0x1.d42de42dce138p-1}, + {0x1.069c8b46b3791p1, 0x1.c5f058230e801p-1, 0x1.c5f058230e802p-1}, + {-0x1.069c8b46b3791p1, -0x1.c5f058230e801p-1, -0x1.c5f058230e802p-1}, + {0x1.0ed16fa0e914ep1, 0x1.b5d545b109bfdp-1, 0x1.b5d545b109bfcp-1}, + {-0x1.0ed16fa0e914ep1, -0x1.b5d545b109bfdp-1, -0x1.b5d545b109bfcp-1}, + {0x1.170653fb1eb0bp1, 0x1.a3ed9e252938dp-1, 0x1.a3ed9e252938ep-1}, + {-0x1.170653fb1eb0bp1, -0x1.a3ed9e252938dp-1, -0x1.a3ed9e252938ep-1}, + {0x1.1f3b3855544c8p1, 0x1.904c37505de4cp-1, 0x1.904c37505de4bp-1}, + {-0x1.1f3b3855544c8p1, -0x1.904c37505de4cp-1, -0x1.904c37505de4bp-1}, + {0x1.27701caf89e85p1, 0x1.7b05b7b6c613p-1, 0x1.7b05b7b6c612fp-1}, + {-0x1.27701caf89e85p1, -0x1.7b05b7b6c613p-1, -0x1.7b05b7b6c612fp-1}, + {0x1.2fa50109bf842p1, 0x1.643080d67acc1p-1, 0x1.643080d67acc2p-1}, + {-0x1.2fa50109bf842p1, -0x1.643080d67acc1p-1, -0x1.643080d67acc2p-1}, + {0x1.37d9e563f51ffp1, 0x1.4be4979c5efb2p-1, 0x1.4be4979c5efb1p-1}, + {-0x1.37d9e563f51ffp1, -0x1.4be4979c5efb2p-1, -0x1.4be4979c5efb1p-1}, + {0x1.400ec9be2abbcp1, 0x1.323b8b1fb4b9fp-1, 0x1.323b8b1fb4b9ep-1}, + {-0x1.400ec9be2abbcp1, -0x1.323b8b1fb4b9fp-1, -0x1.323b8b1fb4b9ep-1}, + {0x1.4843ae1860579p1, 0x1.175059bf0d42p-1, 0x1.175059bf0d421p-1}, + {-0x1.4843ae1860579p1, -0x1.175059bf0d42p-1, -0x1.175059bf0d421p-1}, + {0x1.5078927295f36p1, 0x1.f67ea975b8692p-2, 0x1.f67ea975b8693p-2}, + {-0x1.5078927295f36p1, -0x1.f67ea975b8692p-2, -0x1.f67ea975b8693p-2}, + {0x1.58ad76cccb8f3p1, 0x1.bc4c04d71abadp-2, 0x1.bc4c04d71abaep-2}, + {-0x1.58ad76cccb8f3p1, -0x1.bc4c04d71abadp-2, -0x1.bc4c04d71abaep-2}, + {0x1.60e25b27012bp1, 0x1.8045fe64e62c6p-2, 0x1.8045fe64e62c7p-2}, + {-0x1.60e25b27012bp1, -0x1.8045fe64e62c6p-2, -0x1.8045fe64e62c7p-2}, + {0x1.69173f8136c6dp1, 0x1.42abba8c72fa1p-2, 0x1.42abba8c72fa2p-2}, + {-0x1.69173f8136c6dp1, -0x1.42abba8c72fa1p-2, -0x1.42abba8c72fa2p-2}, + {0x1.714c23db6c62ap1, 0x1.03be06f97cbdp-2, 0x1.03be06f97cbcfp-2}, + {-0x1.714c23db6c62ap1, -0x1.03be06f97cbdp-2, -0x1.03be06f97cbcfp-2}, + {0x1.79810835a1fe7p1, 0x1.877e2cd4f6f94p-3, 0x1.877e2cd4f6f95p-3}, + {-0x1.79810835a1fe7p1, -0x1.877e2cd4f6f94p-3, -0x1.877e2cd4f6f95p-3}, + {0x1.81b5ec8fd79a4p1, 0x1.05e4761ab8d42p-3, 0x1.05e4761ab8d43p-3}, + {-0x1.81b5ec8fd79a4p1, -0x1.05e4761ab8d42p-3, -0x1.05e4761ab8d43p-3}, + {0x1.89ead0ea0d35bp1, 0x1.066e7eb76f5ddp-4, 0x1.066e7eb76f5dep-4}, + {-0x1.89ead0ea0d35bp1, -0x1.066e7eb76f5ddp-4, -0x1.066e7eb76f5dep-4}, + {-0x1.81b5ec8fd799fp2, 0x1.03be06f97cbf1p-2, 0x1.03be06f97cbfp-2}, + {0x1.81b5ec8fd799fp2, -0x1.03be06f97cbf1p-2, -0x1.03be06f97cbfp-2}, + {-0x1.714c23db6c626p2, 0x1.f67ea975b86a2p-2, 0x1.f67ea975b86a3p-2}, + {0x1.714c23db6c626p2, -0x1.f67ea975b86a2p-2, -0x1.f67ea975b86a3p-2}, + {-0x1.60e25b27012adp2, 0x1.643080d67acc2p-1, 0x1.643080d67acc3p-1}, + {0x1.60e25b27012adp2, -0x1.643080d67acc2p-1, -0x1.643080d67acc3p-1}, + {-0x1.5078927295f34p2, 0x1.b5d545b109bf9p-1, 0x1.b5d545b109bfap-1}, + {0x1.5078927295f34p2, -0x1.b5d545b109bf9p-1, -0x1.b5d545b109bfap-1}, + {-0x1.400ec9be2abbbp2, 0x1.ead6834909b93p-1, 0x1.ead6834909b94p-1}, + {0x1.400ec9be2abbbp2, -0x1.ead6834909b93p-1, -0x1.ead6834909b94p-1}, + {-0x1.2fa50109bf842p2, 0x1.ffbca846c4fcap-1, 0x1.ffbca846c4fc9p-1}, + {0x1.2fa50109bf842p2, -0x1.ffbca846c4fcap-1, -0x1.ffbca846c4fc9p-1}, + {-0x1.1f3b3855544c9p2, 0x1.f329c0558e96ap-1, 0x1.f329c0558e96bp-1}, + {0x1.1f3b3855544c9p2, -0x1.f329c0558e96ap-1, -0x1.f329c0558e96bp-1}, + {-0x1.0ed16fa0e915p2, 0x1.c5f058230e802p-1, 0x1.c5f058230e803p-1}, + {0x1.0ed16fa0e915p2, -0x1.c5f058230e802p-1, -0x1.c5f058230e803p-1}, + {-0x1.fccf4dd8fbbaep1, 0x1.7b05b7b6c6136p-1, 0x1.7b05b7b6c6137p-1}, + {0x1.fccf4dd8fbbaep1, -0x1.7b05b7b6c6136p-1, -0x1.7b05b7b6c6137p-1}, + {-0x1.dbfbbc70254bcp1, 0x1.175059bf0d42fp-1, 0x1.175059bf0d43p-1}, + {0x1.dbfbbc70254bcp1, -0x1.175059bf0d42fp-1, -0x1.175059bf0d43p-1}, + {-0x1.bb282b074edcap1, 0x1.42abba8c72fd2p-2, 0x1.42abba8c72fd3p-2}, + {0x1.bb282b074edcap1, -0x1.42abba8c72fd2p-2, -0x1.42abba8c72fd3p-2}, + {-0x1.9a54999e786d8p1, 0x1.066e7eb76f62bp-4, 0x1.066e7eb76f62cp-4}, + {0x1.9a54999e786d8p1, -0x1.066e7eb76f62bp-4, -0x1.066e7eb76f62cp-4}, + {-0x1.79810835a1fe6p1, -0x1.877e2cd4f6fa4p-3, -0x1.877e2cd4f6fa5p-3}, + {0x1.79810835a1fe6p1, 0x1.877e2cd4f6fa4p-3, 0x1.877e2cd4f6fa5p-3}, + {-0x1.58ad76cccb8f4p1, -0x1.bc4c04d71aba6p-2, -0x1.bc4c04d71aba5p-2}, + {0x1.58ad76cccb8f4p1, 0x1.bc4c04d71aba6p-2, 0x1.bc4c04d71aba5p-2}, + {-0x1.37d9e563f5202p1, -0x1.4be4979c5efa8p-1, -0x1.4be4979c5efa9p-1}, + {0x1.37d9e563f5202p1, 0x1.4be4979c5efa8p-1, 0x1.4be4979c5efa9p-1}, + {-0x1.170653fb1eb1p1, -0x1.a3ed9e2529382p-1, -0x1.a3ed9e2529383p-1}, + {0x1.170653fb1eb1p1, 0x1.a3ed9e2529382p-1, 0x1.a3ed9e2529383p-1}, + {-0x1.ec6585249083cp0, -0x1.e07eeeda109c6p-1, -0x1.e07eeeda109c7p-1}, + {0x1.ec6585249083cp0, 0x1.e07eeeda109c6p-1, 0x1.e07eeeda109c7p-1}, + {-0x1.aabe6252e3a58p0, -0x1.fda254c27a01ep-1, -0x1.fda254c27a01dp-1}, + {0x1.aabe6252e3a58p0, 0x1.fda254c27a01ep-1, 0x1.fda254c27a01dp-1}, + {-0x1.69173f8136c74p0, -0x1.f96fe405f1acap-1, -0x1.f96fe405f1acbp-1}, + {0x1.69173f8136c74p0, 0x1.f96fe405f1acap-1, 0x1.f96fe405f1acbp-1}, + {-0x1.27701caf89e9p0, -0x1.d42de42dce13fp-1, -0x1.d42de42dce13ep-1}, + {0x1.27701caf89e9p0, 0x1.d42de42dce13fp-1, 0x1.d42de42dce13ep-1}, + {-0x1.cb91f3bbba157p-1, -0x1.904c37505de59p-1, -0x1.904c37505de5ap-1}, + {0x1.cb91f3bbba157p-1, 0x1.904c37505de59p-1, 0x1.904c37505de5ap-1}, + {-0x1.4843ae186058ep-1, -0x1.323b8b1fb4bb6p-1, -0x1.323b8b1fb4bb7p-1}, + {0x1.4843ae186058ep-1, 0x1.323b8b1fb4bb6p-1, 0x1.323b8b1fb4bb7p-1}, + {-0x1.89ead0ea0d38ap-2, -0x1.8045fe64e6309p-2, -0x1.8045fe64e6308p-2}, + {0x1.89ead0ea0d38ap-2, 0x1.8045fe64e6309p-2, 0x1.8045fe64e6308p-2}, + {-0x1.069c8b46b37fp-3, -0x1.05e4761ab8decp-3, -0x1.05e4761ab8dedp-3}, + {0x1.069c8b46b37fp-3, 0x1.05e4761ab8decp-3, 0x1.05e4761ab8dedp-3}, + {0x1.069c8b46b3734p-3, 0x1.05e4761ab8d32p-3, 0x1.05e4761ab8d31p-3}, + {-0x1.069c8b46b3734p-3, -0x1.05e4761ab8d32p-3, -0x1.05e4761ab8d31p-3}, + {0x1.89ead0ea0d32cp-2, 0x1.8045fe64e62b2p-2, 0x1.8045fe64e62b1p-2}, + {-0x1.89ead0ea0d32cp-2, -0x1.8045fe64e62b2p-2, -0x1.8045fe64e62b1p-2}, + {0x1.4843ae186055fp-1, 0x1.323b8b1fb4b9p-1, 0x1.323b8b1fb4b91p-1}, + {-0x1.4843ae186055fp-1, -0x1.323b8b1fb4b9p-1, -0x1.323b8b1fb4b91p-1}, + {0x1.cb91f3bbba128p-1, 0x1.904c37505de3cp-1, 0x1.904c37505de3bp-1}, + {-0x1.cb91f3bbba128p-1, -0x1.904c37505de3cp-1, -0x1.904c37505de3bp-1}, + {0x1.27701caf89e78p0, 0x1.d42de42dce12bp-1, 0x1.d42de42dce12cp-1}, + {-0x1.27701caf89e78p0, -0x1.d42de42dce12bp-1, -0x1.d42de42dce12cp-1}, + {0x1.69173f8136c5cp0, 0x1.f96fe405f1ac2p-1, 0x1.f96fe405f1ac3p-1}, + {-0x1.69173f8136c5cp0, -0x1.f96fe405f1ac2p-1, -0x1.f96fe405f1ac3p-1}, + {0x1.aabe6252e3a4p0, 0x1.fda254c27a022p-1, 0x1.fda254c27a023p-1}, + {-0x1.aabe6252e3a4p0, -0x1.fda254c27a022p-1, -0x1.fda254c27a023p-1}, + {0x1.ec65852490824p0, 0x1.e07eeeda109d7p-1, 0x1.e07eeeda109d6p-1}, + {-0x1.ec65852490824p0, -0x1.e07eeeda109d7p-1, -0x1.e07eeeda109d6p-1}, + {0x1.170653fb1eb04p1, 0x1.a3ed9e252939ep-1, 0x1.a3ed9e252939dp-1}, + {-0x1.170653fb1eb04p1, -0x1.a3ed9e252939ep-1, -0x1.a3ed9e252939dp-1}, + {0x1.37d9e563f51f6p1, 0x1.4be4979c5efcdp-1, 0x1.4be4979c5efccp-1}, + {-0x1.37d9e563f51f6p1, -0x1.4be4979c5efcdp-1, -0x1.4be4979c5efccp-1}, + {0x1.58ad76cccb8e8p1, 0x1.bc4c04d71abfcp-2, 0x1.bc4c04d71abfdp-2}, + {-0x1.58ad76cccb8e8p1, -0x1.bc4c04d71abfcp-2, -0x1.bc4c04d71abfdp-2}, + {0x1.79810835a1fdap1, 0x1.877e2cd4f7061p-3, 0x1.877e2cd4f706p-3}, + {-0x1.79810835a1fdap1, -0x1.877e2cd4f7061p-3, -0x1.877e2cd4f706p-3}, + {0x1.9a54999e786ccp1, -0x1.066e7eb76f4acp-4, -0x1.066e7eb76f4adp-4}, + {-0x1.9a54999e786ccp1, 0x1.066e7eb76f4acp-4, 0x1.066e7eb76f4adp-4}, + {0x1.bb282b074edbep1, -0x1.42abba8c72f77p-2, -0x1.42abba8c72f78p-2}, + {-0x1.bb282b074edbep1, 0x1.42abba8c72f77p-2, 0x1.42abba8c72f78p-2}, + {0x1.dbfbbc70254bp1, -0x1.175059bf0d407p-1, -0x1.175059bf0d406p-1}, + {-0x1.dbfbbc70254bp1, 0x1.175059bf0d407p-1, 0x1.175059bf0d406p-1}, + {0x1.fccf4dd8fbba2p1, -0x1.7b05b7b6c6116p-1, -0x1.7b05b7b6c6117p-1}, + {-0x1.fccf4dd8fbba2p1, 0x1.7b05b7b6c6116p-1, 0x1.7b05b7b6c6117p-1}, + {0x1.0ed16fa0e914ap2, -0x1.c5f058230e7ecp-1, -0x1.c5f058230e7ebp-1}, + {-0x1.0ed16fa0e914ap2, 0x1.c5f058230e7ecp-1, 0x1.c5f058230e7ebp-1}, + {0x1.1f3b3855544c3p2, -0x1.f329c0558e96p-1, -0x1.f329c0558e95fp-1}, + {-0x1.1f3b3855544c3p2, 0x1.f329c0558e96p-1, 0x1.f329c0558e95fp-1}, + {0x1.2fa50109bf83cp2, -0x1.ffbca846c4fcbp-1, -0x1.ffbca846c4fccp-1}, + {-0x1.2fa50109bf83cp2, 0x1.ffbca846c4fcbp-1, 0x1.ffbca846c4fccp-1}, + {0x1.400ec9be2abb5p2, -0x1.ead6834909ba1p-1, -0x1.ead6834909bap-1}, + {-0x1.400ec9be2abb5p2, 0x1.ead6834909ba1p-1, 0x1.ead6834909bap-1}, + {0x1.5078927295f2ep2, -0x1.b5d545b109c12p-1, -0x1.b5d545b109c13p-1}, + {-0x1.5078927295f2ep2, 0x1.b5d545b109c12p-1, 0x1.b5d545b109c13p-1}, + {0x1.60e25b27012a7p2, -0x1.643080d67ace4p-1, -0x1.643080d67ace5p-1}, + {-0x1.60e25b27012a7p2, 0x1.643080d67ace4p-1, 0x1.643080d67ace5p-1}, + {0x1.714c23db6c62p2, -0x1.f67ea975b86f6p-2, -0x1.f67ea975b86f5p-2}, + {-0x1.714c23db6c62p2, 0x1.f67ea975b86f6p-2, 0x1.f67ea975b86f5p-2}, + {0x1.81b5ec8fd7999p2, -0x1.03be06f97cc4dp-2, -0x1.03be06f97cc4ep-2}, + {-0x1.81b5ec8fd7999p2, 0x1.03be06f97cc4dp-2, 0x1.03be06f97cc4ep-2}, + {0x1.effffffffffffp-5, 0x1.efb26ef930c4cp-5, 0x1.efb26ef930c4dp-5}, + {-0x1.effffffffffffp-5, -0x1.efb26ef930c4cp-5, -0x1.efb26ef930c4dp-5}, + {0x1.fp-5, 0x1.efb26ef930c4dp-5, 0x1.efb26ef930c4ep-5}, + {-0x1.fp-5, -0x1.efb26ef930c4dp-5, -0x1.efb26ef930c4ep-5}, + {0x1.f000000000001p-5, 0x1.efb26ef930c4ep-5, 0x1.efb26ef930c4fp-5}, + {-0x1.f000000000001p-5, -0x1.efb26ef930c4ep-5, -0x1.efb26ef930c4fp-5}, + {0x1.f7fffffffffffp-4, 0x1.f6baaa131de63p-4, 0x1.f6baaa131de64p-4}, + {-0x1.f7fffffffffffp-4, -0x1.f6baaa131de63p-4, -0x1.f6baaa131de64p-4}, + {0x1.f8p-4, 0x1.f6baaa131de64p-4, 0x1.f6baaa131de65p-4}, + {-0x1.f8p-4, -0x1.f6baaa131de64p-4, -0x1.f6baaa131de65p-4}, + {0x1.f800000000001p-4, 0x1.f6baaa131de65p-4, 0x1.f6baaa131de66p-4}, + {-0x1.f800000000001p-4, -0x1.f6baaa131de65p-4, -0x1.f6baaa131de66p-4}, + {0x1.4bfffffffffffp-3, 0x1.4a8c3b4e9c7ffp-3, 0x1.4a8c3b4e9c8p-3}, + {-0x1.4bfffffffffffp-3, -0x1.4a8c3b4e9c7ffp-3, -0x1.4a8c3b4e9c8p-3}, + {0x1.4cp-3, 0x1.4a8c3b4e9c8p-3, 0x1.4a8c3b4e9c7ffp-3}, + {-0x1.4cp-3, -0x1.4a8c3b4e9c8p-3, -0x1.4a8c3b4e9c7ffp-3}, + {0x1.4c00000000001p-3, 0x1.4a8c3b4e9c801p-3, 0x1.4a8c3b4e9c8p-3}, + {-0x1.4c00000000001p-3, -0x1.4a8c3b4e9c801p-3, -0x1.4a8c3b4e9c8p-3}, + {0x1.3333333333332p-2, 0x1.2e9cd95baba32p-2, 0x1.2e9cd95baba33p-2}, + {-0x1.3333333333332p-2, -0x1.2e9cd95baba32p-2, -0x1.2e9cd95baba33p-2}, + {0x1.3333333333333p-2, 0x1.2e9cd95baba33p-2, 0x1.2e9cd95baba34p-2}, + {-0x1.3333333333333p-2, -0x1.2e9cd95baba33p-2, -0x1.2e9cd95baba34p-2}, + {0x1.3333333333334p-2, 0x1.2e9cd95baba34p-2, 0x1.2e9cd95baba35p-2}, + {-0x1.3333333333334p-2, -0x1.2e9cd95baba34p-2, -0x1.2e9cd95baba35p-2}, + {0x1.594317acc4ef8p-1, 0x1.3faefc7a5466fp-1, 0x1.3faefc7a5466ep-1}, + {-0x1.594317acc4ef8p-1, -0x1.3faefc7a5466fp-1, -0x1.3faefc7a5466ep-1}, + {0x1.594317acc4ef9p-1, 0x1.3faefc7a5467p-1, 0x1.3faefc7a5466fp-1}, + {-0x1.594317acc4ef9p-1, -0x1.3faefc7a5467p-1, -0x1.3faefc7a5466fp-1}, + {0x1.594317acc4efap-1, 0x1.3faefc7a5467p-1, 0x1.3faefc7a54671p-1}, + {-0x1.594317acc4efap-1, -0x1.3faefc7a5467p-1, -0x1.3faefc7a54671p-1}, + {0x1.8ffffffffffffp-1, 0x1.6888a4e134b2ep-1, 0x1.6888a4e134b2dp-1}, + {-0x1.8ffffffffffffp-1, -0x1.6888a4e134b2ep-1, -0x1.6888a4e134b2dp-1}, + {0x1.9p-1, 0x1.6888a4e134b2fp-1, 0x1.6888a4e134b2ep-1}, + {-0x1.9p-1, -0x1.6888a4e134b2fp-1, -0x1.6888a4e134b2ep-1}, + {0x1.9000000000001p-1, 0x1.6888a4e134b2fp-1, 0x1.6888a4e134b3p-1}, + {-0x1.9000000000001p-1, -0x1.6888a4e134b2fp-1, -0x1.6888a4e134b3p-1}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0p0, -0x0.0p0, -0x0.0p0}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x1.921fb54442d17p-5, 0x1.91f65f10dd813p-5, 0x1.91f65f10dd812p-5}, + {-0x1.921fb54442d17p-5, -0x1.91f65f10dd813p-5, -0x1.91f65f10dd812p-5}, + {0x1.921fb54442d18p-5, 0x1.91f65f10dd814p-5, 0x1.91f65f10dd813p-5}, + {-0x1.921fb54442d18p-5, -0x1.91f65f10dd814p-5, -0x1.91f65f10dd813p-5}, + {0x1.921fb54442d19p-5, 0x1.91f65f10dd815p-5, 0x1.91f65f10dd814p-5}, + {-0x1.921fb54442d19p-5, -0x1.91f65f10dd815p-5, -0x1.91f65f10dd814p-5}, + {0x1.921fb54442d17p-4, 0x1.917a6bc29b42bp-4, 0x1.917a6bc29b42ap-4}, + {-0x1.921fb54442d17p-4, -0x1.917a6bc29b42bp-4, -0x1.917a6bc29b42ap-4}, + {0x1.921fb54442d18p-4, 0x1.917a6bc29b42cp-4, 0x1.917a6bc29b42bp-4}, + {-0x1.921fb54442d18p-4, -0x1.917a6bc29b42cp-4, -0x1.917a6bc29b42bp-4}, + {0x1.921fb54442d19p-4, 0x1.917a6bc29b42dp-4, 0x1.917a6bc29b42cp-4}, + {-0x1.921fb54442d19p-4, -0x1.917a6bc29b42dp-4, -0x1.917a6bc29b42cp-4}, + {0x1.921fb54442d17p-3, 0x1.8f8b83c69a609p-3, 0x1.8f8b83c69a60ap-3}, + {-0x1.921fb54442d17p-3, -0x1.8f8b83c69a609p-3, -0x1.8f8b83c69a60ap-3}, + {0x1.921fb54442d18p-3, 0x1.8f8b83c69a60ap-3, 0x1.8f8b83c69a60bp-3}, + {-0x1.921fb54442d18p-3, -0x1.8f8b83c69a60ap-3, -0x1.8f8b83c69a60bp-3}, + {0x1.921fb54442d19p-3, 0x1.8f8b83c69a60bp-3, 0x1.8f8b83c69a60cp-3}, + {-0x1.921fb54442d19p-3, -0x1.8f8b83c69a60bp-3, -0x1.8f8b83c69a60cp-3}, + {0x1.921fb54442d17p-2, 0x1.87de2a6aea962p-2, 0x1.87de2a6aea961p-2}, + {-0x1.921fb54442d17p-2, -0x1.87de2a6aea962p-2, -0x1.87de2a6aea961p-2}, + {0x1.921fb54442d18p-2, 0x1.87de2a6aea963p-2, 0x1.87de2a6aea962p-2}, + {-0x1.921fb54442d18p-2, -0x1.87de2a6aea963p-2, -0x1.87de2a6aea962p-2}, + {0x1.921fb54442d19p-2, 0x1.87de2a6aea964p-2, 0x1.87de2a6aea963p-2}, + {-0x1.921fb54442d19p-2, -0x1.87de2a6aea964p-2, -0x1.87de2a6aea963p-2}, + {0x1.921fb54442d17p-1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcbp-1}, + {-0x1.921fb54442d17p-1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcbp-1}, + {0x1.921fb54442d18p-1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcdp-1}, + {-0x1.921fb54442d18p-1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcdp-1}, + {0x1.921fb54442d19p-1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bcep-1}, + {-0x1.921fb54442d19p-1, -0x1.6a09e667f3bcdp-1, -0x1.6a09e667f3bcep-1}, + {0x1.921fb54442d17p0, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p0, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p0, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p0, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p0, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p0, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p1, 0x1.469898cc51702p-51, 0x1.469898cc51701p-51}, + {-0x1.921fb54442d17p1, -0x1.469898cc51702p-51, -0x1.469898cc51701p-51}, + {0x1.921fb54442d18p1, 0x1.1a62633145c07p-53, 0x1.1a62633145c06p-53}, + {-0x1.921fb54442d18p1, -0x1.1a62633145c07p-53, -0x1.1a62633145c06p-53}, + {0x1.921fb54442d19p1, -0x1.72cece675d1fdp-52, -0x1.72cece675d1fcp-52}, + {-0x1.921fb54442d19p1, 0x1.72cece675d1fdp-52, 0x1.72cece675d1fcp-52}, + {0x1.921fb54442d17p2, -0x1.469898cc51702p-50, -0x1.469898cc51701p-50}, + {-0x1.921fb54442d17p2, 0x1.469898cc51702p-50, 0x1.469898cc51701p-50}, + {0x1.921fb54442d18p2, -0x1.1a62633145c07p-52, -0x1.1a62633145c06p-52}, + {-0x1.921fb54442d18p2, 0x1.1a62633145c07p-52, 0x1.1a62633145c06p-52}, + {0x1.921fb54442d19p2, 0x1.72cece675d1fdp-51, 0x1.72cece675d1fcp-51}, + {-0x1.921fb54442d19p2, -0x1.72cece675d1fdp-51, -0x1.72cece675d1fcp-51}, + {0x1.921fb54442d17p3, -0x1.469898cc51702p-49, -0x1.469898cc51701p-49}, + {-0x1.921fb54442d17p3, 0x1.469898cc51702p-49, 0x1.469898cc51701p-49}, + {0x1.921fb54442d18p3, -0x1.1a62633145c07p-51, -0x1.1a62633145c06p-51}, + {-0x1.921fb54442d18p3, 0x1.1a62633145c07p-51, 0x1.1a62633145c06p-51}, + {0x1.921fb54442d19p3, 0x1.72cece675d1fdp-50, 0x1.72cece675d1fcp-50}, + {-0x1.921fb54442d19p3, -0x1.72cece675d1fdp-50, -0x1.72cece675d1fcp-50}, + {0x1.921fb54442d17p4, -0x1.469898cc51702p-48, -0x1.469898cc51701p-48}, + {-0x1.921fb54442d17p4, 0x1.469898cc51702p-48, 0x1.469898cc51701p-48}, + {0x1.921fb54442d18p4, -0x1.1a62633145c07p-50, -0x1.1a62633145c06p-50}, + {-0x1.921fb54442d18p4, 0x1.1a62633145c07p-50, 0x1.1a62633145c06p-50}, + {0x1.921fb54442d19p4, 0x1.72cece675d1fdp-49, 0x1.72cece675d1fcp-49}, + {-0x1.921fb54442d19p4, -0x1.72cece675d1fdp-49, -0x1.72cece675d1fcp-49}, + {0x1.921fb54442d17p5, -0x1.469898cc51702p-47, -0x1.469898cc51701p-47}, + {-0x1.921fb54442d17p5, 0x1.469898cc51702p-47, 0x1.469898cc51701p-47}, + {0x1.921fb54442d18p5, -0x1.1a62633145c07p-49, -0x1.1a62633145c06p-49}, + {-0x1.921fb54442d18p5, 0x1.1a62633145c07p-49, 0x1.1a62633145c06p-49}, + {0x1.921fb54442d19p5, 0x1.72cece675d1fdp-48, 0x1.72cece675d1fcp-48}, + {-0x1.921fb54442d19p5, -0x1.72cece675d1fdp-48, -0x1.72cece675d1fcp-48}, + {0x1.921fb54442d17p6, -0x1.469898cc51702p-46, -0x1.469898cc51701p-46}, + {-0x1.921fb54442d17p6, 0x1.469898cc51702p-46, 0x1.469898cc51701p-46}, + {0x1.921fb54442d18p6, -0x1.1a62633145c07p-48, -0x1.1a62633145c06p-48}, + {-0x1.921fb54442d18p6, 0x1.1a62633145c07p-48, 0x1.1a62633145c06p-48}, + {0x1.921fb54442d19p6, 0x1.72cece675d1fdp-47, 0x1.72cece675d1fcp-47}, + {-0x1.921fb54442d19p6, -0x1.72cece675d1fdp-47, -0x1.72cece675d1fcp-47}, + {0x1.921fb54442d17p7, -0x1.469898cc51702p-45, -0x1.469898cc51701p-45}, + {-0x1.921fb54442d17p7, 0x1.469898cc51702p-45, 0x1.469898cc51701p-45}, + {0x1.921fb54442d18p7, -0x1.1a62633145c07p-47, -0x1.1a62633145c06p-47}, + {-0x1.921fb54442d18p7, 0x1.1a62633145c07p-47, 0x1.1a62633145c06p-47}, + {0x1.921fb54442d19p7, 0x1.72cece675d1fdp-46, 0x1.72cece675d1fcp-46}, + {-0x1.921fb54442d19p7, -0x1.72cece675d1fdp-46, -0x1.72cece675d1fcp-46}, + {0x1.2d97c7f3321d1p1, 0x1.6a09e667f3bdp-1, 0x1.6a09e667f3bcfp-1}, + {-0x1.2d97c7f3321d1p1, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bcfp-1}, + {0x1.2d97c7f3321d2p1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bcep-1}, + {-0x1.2d97c7f3321d2p1, -0x1.6a09e667f3bcdp-1, -0x1.6a09e667f3bcep-1}, + {0x1.2d97c7f3321d3p1, 0x1.6a09e667f3bcap-1, 0x1.6a09e667f3bcbp-1}, + {-0x1.2d97c7f3321d3p1, -0x1.6a09e667f3bcap-1, -0x1.6a09e667f3bcbp-1}, + {0x1.f6a7a2955385dp1, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bc8p-1}, + {-0x1.f6a7a2955385dp1, 0x1.6a09e667f3bc9p-1, 0x1.6a09e667f3bc8p-1}, + {0x1.f6a7a2955385ep1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcbp-1}, + {-0x1.f6a7a2955385ep1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcbp-1}, + {0x1.f6a7a2955385fp1, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcfp-1}, + {-0x1.f6a7a2955385fp1, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcfp-1}, + {0x1.2d97c7f3321d1p2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d1p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d2p2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d2p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d3p2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d3p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.5fdbbe9bba774p2, -0x1.6a09e667f3bd4p-1, -0x1.6a09e667f3bd3p-1}, + {-0x1.5fdbbe9bba774p2, 0x1.6a09e667f3bd4p-1, 0x1.6a09e667f3bd3p-1}, + {0x1.5fdbbe9bba775p2, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcdp-1}, + {-0x1.5fdbbe9bba775p2, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcdp-1}, + {0x1.5fdbbe9bba776p2, -0x1.6a09e667f3bc8p-1, -0x1.6a09e667f3bc9p-1}, + {-0x1.5fdbbe9bba776p2, 0x1.6a09e667f3bc8p-1, 0x1.6a09e667f3bc9p-1}, + {0x1.c463abeccb2bap2, 0x1.6a09e667f3bc5p-1, 0x1.6a09e667f3bc6p-1}, + {-0x1.c463abeccb2bap2, -0x1.6a09e667f3bc5p-1, -0x1.6a09e667f3bc6p-1}, + {0x1.c463abeccb2bbp2, 0x1.6a09e667f3bcbp-1, 0x1.6a09e667f3bcap-1}, + {-0x1.c463abeccb2bbp2, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bcap-1}, + {0x1.c463abeccb2bcp2, 0x1.6a09e667f3bd1p-1, 0x1.6a09e667f3bdp-1}, + {-0x1.c463abeccb2bcp2, -0x1.6a09e667f3bd1p-1, -0x1.6a09e667f3bdp-1}, + {0x1.f6a7a2955385dp2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385dp2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.f6a7a2955385ep2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385ep2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.f6a7a2955385fp2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385fp2, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.1475cc9eedeffp3, 0x1.6a09e667f3bdfp-1, 0x1.6a09e667f3bep-1}, + {-0x1.1475cc9eedeffp3, -0x1.6a09e667f3bdfp-1, -0x1.6a09e667f3bep-1}, + {0x1.1475cc9eedfp3, 0x1.6a09e667f3bd4p-1, 0x1.6a09e667f3bd5p-1}, + {-0x1.1475cc9eedfp3, -0x1.6a09e667f3bd4p-1, -0x1.6a09e667f3bd5p-1}, + {0x1.1475cc9eedf01p3, 0x1.6a09e667f3bc9p-1, 0x1.6a09e667f3bcap-1}, + {-0x1.1475cc9eedf01p3, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bcap-1}, + {0x1.2d97c7f3321d1p3, 0x1.34f272993d141p-49, 0x1.34f272993d142p-49}, + {-0x1.2d97c7f3321d1p3, -0x1.34f272993d141p-49, -0x1.34f272993d142p-49}, + {0x1.2d97c7f3321d2p3, 0x1.a79394c9e8a0ap-52, 0x1.a79394c9e8a0bp-52}, + {-0x1.2d97c7f3321d2p3, -0x1.a79394c9e8a0ap-52, -0x1.a79394c9e8a0bp-52}, + {0x1.2d97c7f3321d3p3, -0x1.961b1acd85d7dp-50, -0x1.961b1acd85d7ep-50}, + {-0x1.2d97c7f3321d3p3, 0x1.961b1acd85d7dp-50, 0x1.961b1acd85d7ep-50}, + {0x1.46b9c347764a2p3, -0x1.6a09e667f3bb9p-1, -0x1.6a09e667f3bbap-1}, + {-0x1.46b9c347764a2p3, 0x1.6a09e667f3bb9p-1, 0x1.6a09e667f3bbap-1}, + {0x1.46b9c347764a3p3, -0x1.6a09e667f3bc4p-1, -0x1.6a09e667f3bc5p-1}, + {-0x1.46b9c347764a3p3, 0x1.6a09e667f3bc4p-1, 0x1.6a09e667f3bc5p-1}, + {0x1.46b9c347764a4p3, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bcfp-1}, + {-0x1.46b9c347764a4p3, 0x1.6a09e667f3bdp-1, 0x1.6a09e667f3bcfp-1}, + {0x1.5fdbbe9bba774p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba774p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.5fdbbe9bba775p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba775p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.5fdbbe9bba776p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba776p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.78fdb9effea45p3, -0x1.6a09e667f3bep-1, -0x1.6a09e667f3be1p-1}, + {-0x1.78fdb9effea45p3, 0x1.6a09e667f3bep-1, 0x1.6a09e667f3be1p-1}, + {0x1.78fdb9effea46p3, -0x1.6a09e667f3bd5p-1, -0x1.6a09e667f3bd6p-1}, + {-0x1.78fdb9effea46p3, 0x1.6a09e667f3bd5p-1, 0x1.6a09e667f3bd6p-1}, + {0x1.78fdb9effea47p3, -0x1.6a09e667f3bcap-1, -0x1.6a09e667f3bc9p-1}, + {-0x1.78fdb9effea47p3, 0x1.6a09e667f3bcap-1, 0x1.6a09e667f3bc9p-1}, + {0x1.ab41b09886fe8p3, 0x1.6a09e667f3bb8p-1, 0x1.6a09e667f3bb9p-1}, + {-0x1.ab41b09886fe8p3, -0x1.6a09e667f3bb8p-1, -0x1.6a09e667f3bb9p-1}, + {0x1.ab41b09886fe9p3, 0x1.6a09e667f3bc4p-1, 0x1.6a09e667f3bc3p-1}, + {-0x1.ab41b09886fe9p3, -0x1.6a09e667f3bc4p-1, -0x1.6a09e667f3bc3p-1}, + {0x1.ab41b09886feap3, 0x1.6a09e667f3bcfp-1, 0x1.6a09e667f3bcep-1}, + {-0x1.ab41b09886feap3, -0x1.6a09e667f3bcfp-1, -0x1.6a09e667f3bcep-1}, + {0x1.c463abeccb2bap3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.c463abeccb2bap3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.c463abeccb2bbp3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.c463abeccb2bbp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.c463abeccb2bcp3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.c463abeccb2bcp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.dd85a7410f58bp3, 0x1.6a09e667f3be1p-1, 0x1.6a09e667f3be2p-1}, + {-0x1.dd85a7410f58bp3, -0x1.6a09e667f3be1p-1, -0x1.6a09e667f3be2p-1}, + {0x1.dd85a7410f58cp3, 0x1.6a09e667f3bd6p-1, 0x1.6a09e667f3bd5p-1}, + {-0x1.dd85a7410f58cp3, -0x1.6a09e667f3bd6p-1, -0x1.6a09e667f3bd5p-1}, + {0x1.dd85a7410f58dp3, 0x1.6a09e667f3bcbp-1, 0x1.6a09e667f3bcap-1}, + {-0x1.dd85a7410f58dp3, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bcap-1}, + {0x1.f6a7a2955385dp3, 0x1.583ebeff65cc2p-49, 0x1.583ebeff65cc3p-49}, + {-0x1.f6a7a2955385dp3, -0x1.583ebeff65cc2p-49, -0x1.583ebeff65cc3p-49}, + {0x1.f6a7a2955385ep3, 0x1.60fafbfd97309p-51, 0x1.60fafbfd97308p-51}, + {-0x1.f6a7a2955385ep3, -0x1.60fafbfd97309p-51, -0x1.60fafbfd97308p-51}, + {0x1.f6a7a2955385fp3, -0x1.4f8282013467cp-50, -0x1.4f8282013467bp-50}, + {-0x1.f6a7a2955385fp3, 0x1.4f8282013467cp-50, 0x1.4f8282013467bp-50}, + {0x1.07e4cef4cbd96p4, -0x1.6a09e667f3ba1p-1, -0x1.6a09e667f3bap-1}, + {-0x1.07e4cef4cbd96p4, 0x1.6a09e667f3ba1p-1, 0x1.6a09e667f3bap-1}, + {0x1.07e4cef4cbd97p4, -0x1.6a09e667f3bb8p-1, -0x1.6a09e667f3bb7p-1}, + {-0x1.07e4cef4cbd97p4, 0x1.6a09e667f3bb8p-1, 0x1.6a09e667f3bb7p-1}, + {0x1.07e4cef4cbd98p4, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcfp-1}, + {-0x1.07e4cef4cbd98p4, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcfp-1}, + {0x1.1475cc9eedeffp4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.1475cc9eedeffp4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.1475cc9eedfp4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.1475cc9eedfp4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.1475cc9eedf01p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.1475cc9eedf01p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2106ca4910068p4, -0x1.6a09e667f3bedp-1, -0x1.6a09e667f3beep-1}, + {-0x1.2106ca4910068p4, 0x1.6a09e667f3bedp-1, 0x1.6a09e667f3beep-1}, + {0x1.2106ca4910069p4, -0x1.6a09e667f3bd7p-1, -0x1.6a09e667f3bd6p-1}, + {-0x1.2106ca4910069p4, 0x1.6a09e667f3bd7p-1, 0x1.6a09e667f3bd6p-1}, + {0x1.2106ca491006ap4, -0x1.6a09e667f3bcp-1, -0x1.6a09e667f3bc1p-1}, + {-0x1.2106ca491006ap4, 0x1.6a09e667f3bcp-1, 0x1.6a09e667f3bc1p-1}, + {0x1.2d97c7f3321d1p4, -0x1.34f272993d141p-48, -0x1.34f272993d142p-48}, + {-0x1.2d97c7f3321d1p4, 0x1.34f272993d141p-48, 0x1.34f272993d142p-48}, + {0x1.2d97c7f3321d2p4, -0x1.a79394c9e8a0ap-51, -0x1.a79394c9e8a0bp-51}, + {-0x1.2d97c7f3321d2p4, 0x1.a79394c9e8a0ap-51, 0x1.a79394c9e8a0bp-51}, + {0x1.2d97c7f3321d3p4, 0x1.961b1acd85d7dp-49, 0x1.961b1acd85d7ep-49}, + {-0x1.2d97c7f3321d3p4, -0x1.961b1acd85d7dp-49, -0x1.961b1acd85d7ep-49}, + {0x1.3a28c59d54339p4, 0x1.6a09e667f3bap-1, 0x1.6a09e667f3ba1p-1}, + {-0x1.3a28c59d54339p4, -0x1.6a09e667f3bap-1, -0x1.6a09e667f3ba1p-1}, + {0x1.3a28c59d5433ap4, 0x1.6a09e667f3bb7p-1, 0x1.6a09e667f3bb6p-1}, + {-0x1.3a28c59d5433ap4, -0x1.6a09e667f3bb7p-1, -0x1.6a09e667f3bb6p-1}, + {0x1.3a28c59d5433bp4, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcdp-1}, + {-0x1.3a28c59d5433bp4, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcdp-1}, + {0x1.46b9c347764a2p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.46b9c347764a2p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.46b9c347764a3p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.46b9c347764a3p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.46b9c347764a4p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.46b9c347764a4p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.534ac0f19860bp4, 0x1.6a09e667f3beep-1, 0x1.6a09e667f3befp-1}, + {-0x1.534ac0f19860bp4, -0x1.6a09e667f3beep-1, -0x1.6a09e667f3befp-1}, + {0x1.534ac0f19860cp4, 0x1.6a09e667f3bd8p-1, 0x1.6a09e667f3bd7p-1}, + {-0x1.534ac0f19860cp4, -0x1.6a09e667f3bd8p-1, -0x1.6a09e667f3bd7p-1}, + {0x1.534ac0f19860dp4, 0x1.6a09e667f3bc1p-1, 0x1.6a09e667f3bcp-1}, + {-0x1.534ac0f19860dp4, -0x1.6a09e667f3bc1p-1, -0x1.6a09e667f3bcp-1}, + {0x1.5fdbbe9bba774p4, 0x1.3dc585b2c7422p-48, 0x1.3dc585b2c7421p-48}, + {-0x1.5fdbbe9bba774p4, -0x1.3dc585b2c7422p-48, -0x1.3dc585b2c7421p-48}, + {0x1.5fdbbe9bba775p4, 0x1.ee2c2d963a10cp-51, 0x1.ee2c2d963a10dp-51}, + {-0x1.5fdbbe9bba775p4, -0x1.ee2c2d963a10cp-51, -0x1.ee2c2d963a10dp-51}, + {0x1.5fdbbe9bba776p4, -0x1.8474f49a717bdp-49, -0x1.8474f49a717bcp-49}, + {-0x1.5fdbbe9bba776p4, 0x1.8474f49a717bdp-49, 0x1.8474f49a717bcp-49}, + {0x1.6c6cbc45dc8dcp4, -0x1.6a09e667f3b9fp-1, -0x1.6a09e667f3bap-1}, + {-0x1.6c6cbc45dc8dcp4, 0x1.6a09e667f3b9fp-1, 0x1.6a09e667f3bap-1}, + {0x1.6c6cbc45dc8ddp4, -0x1.6a09e667f3bb6p-1, -0x1.6a09e667f3bb5p-1}, + {-0x1.6c6cbc45dc8ddp4, 0x1.6a09e667f3bb6p-1, 0x1.6a09e667f3bb5p-1}, + {0x1.6c6cbc45dc8dep4, -0x1.6a09e667f3bcdp-1, -0x1.6a09e667f3bccp-1}, + {-0x1.6c6cbc45dc8dep4, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bccp-1}, + {0x1.78fdb9effea45p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.78fdb9effea45p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.78fdb9effea46p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.78fdb9effea46p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.78fdb9effea47p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.78fdb9effea47p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.858eb79a20baep4, -0x1.6a09e667f3befp-1, -0x1.6a09e667f3beep-1}, + {-0x1.858eb79a20baep4, 0x1.6a09e667f3befp-1, 0x1.6a09e667f3beep-1}, + {0x1.858eb79a20bafp4, -0x1.6a09e667f3bd8p-1, -0x1.6a09e667f3bd9p-1}, + {-0x1.858eb79a20bafp4, 0x1.6a09e667f3bd8p-1, 0x1.6a09e667f3bd9p-1}, + {0x1.858eb79a20bbp4, -0x1.6a09e667f3bc2p-1, -0x1.6a09e667f3bc1p-1}, + {-0x1.858eb79a20bbp4, 0x1.6a09e667f3bc2p-1, 0x1.6a09e667f3bc1p-1}, + {0x1.fffffffffffffp62, 0x1.fa7299b17573dp-1, 0x1.fa7299b17573ep-1}, + {-0x1.fffffffffffffp62, -0x1.fa7299b17573dp-1, -0x1.fa7299b17573ep-1}, + {0x1.0p63, 0x1.fff6dfd42dc54p-1, 0x1.fff6dfd42dc55p-1}, + {-0x1.0p63, -0x1.fff6dfd42dc54p-1, -0x1.fff6dfd42dc55p-1}, + {0x1.0000000000001p63, 0x1.e456b818e7397p-1, 0x1.e456b818e7396p-1}, + {-0x1.0000000000001p63, -0x1.e456b818e7397p-1, -0x1.e456b818e7396p-1}, + {0x1.fffffffffffffp26, -0x1.86dcca0d689e8p-1, -0x1.86dcca0d689e7p-1}, + {-0x1.fffffffffffffp26, 0x1.86dcca0d689e8p-1, 0x1.86dcca0d689e7p-1}, + {0x1.0p27, -0x1.86dcc9babb0a4p-1, -0x1.86dcc9babb0a5p-1}, + {-0x1.0p27, 0x1.86dcc9babb0a4p-1, 0x1.86dcc9babb0a5p-1}, + {0x1.0000000000001p27, -0x1.86dcc9155fe18p-1, -0x1.86dcc9155fe19p-1}, + {-0x1.0000000000001p27, 0x1.86dcc9155fe18p-1, 0x1.86dcc9155fe19p-1}, + {0x1.fffffffffffffp23, -0x1.8f22f84d42da2p-1, -0x1.8f22f84d42da1p-1}, + {-0x1.fffffffffffffp23, 0x1.8f22f84d42da2p-1, 0x1.8f22f84d42da1p-1}, + {0x1.0p24, -0x1.8f22f8433d6eep-1, -0x1.8f22f8433d6edp-1}, + {-0x1.0p24, 0x1.8f22f8433d6eep-1, 0x1.8f22f8433d6edp-1}, + {0x1.0000000000001p24, -0x1.8f22f82f32986p-1, -0x1.8f22f82f32985p-1}, + {-0x1.0000000000001p24, 0x1.8f22f82f32986p-1, 0x1.8f22f82f32985p-1}, + {0x1.fffffffffffffp1, -0x1.837b9dddc1eacp-1, -0x1.837b9dddc1eabp-1}, + {-0x1.fffffffffffffp1, 0x1.837b9dddc1eacp-1, 0x1.837b9dddc1eabp-1}, + {0x1.0p2, -0x1.837b9dddc1eaep-1, -0x1.837b9dddc1eafp-1}, + {-0x1.0p2, 0x1.837b9dddc1eaep-1, 0x1.837b9dddc1eafp-1}, + {0x1.0000000000001p2, -0x1.837b9dddc1eb4p-1, -0x1.837b9dddc1eb3p-1}, + {-0x1.0000000000001p2, 0x1.837b9dddc1eb4p-1, 0x1.837b9dddc1eb3p-1}, + {0x1.fffffffffffffp0, 0x1.d18f6ead1b447p-1, 0x1.d18f6ead1b446p-1}, + {-0x1.fffffffffffffp0, -0x1.d18f6ead1b447p-1, -0x1.d18f6ead1b446p-1}, + {0x1.0p1, 0x1.d18f6ead1b446p-1, 0x1.d18f6ead1b445p-1}, + {-0x1.0p1, -0x1.d18f6ead1b446p-1, -0x1.d18f6ead1b445p-1}, + {0x1.0000000000001p1, 0x1.d18f6ead1b444p-1, 0x1.d18f6ead1b445p-1}, + {-0x1.0000000000001p1, -0x1.d18f6ead1b444p-1, -0x1.d18f6ead1b445p-1}, + {0x1.fffffffffffffp-1, 0x1.aed548f090cedp-1, 0x1.aed548f090ceep-1}, + {-0x1.fffffffffffffp-1, -0x1.aed548f090cedp-1, -0x1.aed548f090ceep-1}, + {0x1.0p0, 0x1.aed548f090ceep-1, 0x1.aed548f090cefp-1}, + {-0x1.0p0, -0x1.aed548f090ceep-1, -0x1.aed548f090cefp-1}, + {0x1.0000000000001p0, 0x1.aed548f090cefp-1, 0x1.aed548f090cfp-1}, + {-0x1.0000000000001p0, -0x1.aed548f090cefp-1, -0x1.aed548f090cfp-1}, + {0x1.fffffffffffffp-2, 0x1.eaee8744b05efp-2, 0x1.eaee8744b05fp-2}, + {-0x1.fffffffffffffp-2, -0x1.eaee8744b05efp-2, -0x1.eaee8744b05fp-2}, + {0x1.0p-1, 0x1.eaee8744b05fp-2, 0x1.eaee8744b05efp-2}, + {-0x1.0p-1, -0x1.eaee8744b05fp-2, -0x1.eaee8744b05efp-2}, + {0x1.0000000000001p-1, 0x1.eaee8744b05f2p-2, 0x1.eaee8744b05f1p-2}, + {-0x1.0000000000001p-1, -0x1.eaee8744b05f2p-2, -0x1.eaee8744b05f1p-2}, + {0x1.fffffffffffffp-3, 0x1.faaeed4f31576p-3, 0x1.faaeed4f31575p-3}, + {-0x1.fffffffffffffp-3, -0x1.faaeed4f31576p-3, -0x1.faaeed4f31575p-3}, + {0x1.0p-2, 0x1.faaeed4f31577p-3, 0x1.faaeed4f31576p-3}, + {-0x1.0p-2, -0x1.faaeed4f31577p-3, -0x1.faaeed4f31576p-3}, + {0x1.0000000000001p-2, 0x1.faaeed4f31579p-3, 0x1.faaeed4f31578p-3}, + {-0x1.0000000000001p-2, -0x1.faaeed4f31579p-3, -0x1.faaeed4f31578p-3}, + {0x1.fffffffffffffp-4, 0x1.feaaeee86ee35p-4, 0x1.feaaeee86ee34p-4}, + {-0x1.fffffffffffffp-4, -0x1.feaaeee86ee35p-4, -0x1.feaaeee86ee34p-4}, + {0x1.0p-3, 0x1.feaaeee86ee36p-4, 0x1.feaaeee86ee35p-4}, + {-0x1.0p-3, -0x1.feaaeee86ee36p-4, -0x1.feaaeee86ee35p-4}, + {0x1.0000000000001p-3, 0x1.feaaeee86ee38p-4, 0x1.feaaeee86ee37p-4}, + {-0x1.0000000000001p-3, -0x1.feaaeee86ee38p-4, -0x1.feaaeee86ee37p-4}, + {0x1.fffffffffffffp-5, 0x1.ffaaaeeed4edap-5, 0x1.ffaaaeeed4ed9p-5}, + {-0x1.fffffffffffffp-5, -0x1.ffaaaeeed4edap-5, -0x1.ffaaaeeed4ed9p-5}, + {0x1.0p-4, 0x1.ffaaaeeed4edbp-5, 0x1.ffaaaeeed4edap-5}, + {-0x1.0p-4, -0x1.ffaaaeeed4edbp-5, -0x1.ffaaaeeed4edap-5}, + {0x1.0000000000001p-4, 0x1.ffaaaeeed4eddp-5, 0x1.ffaaaeeed4edcp-5}, + {-0x1.0000000000001p-4, -0x1.ffaaaeeed4eddp-5, -0x1.ffaaaeeed4edcp-5}, + {0x1.fffffffffffffp-6, 0x1.ffeaaaeeee86ep-6, 0x1.ffeaaaeeee86dp-6}, + {-0x1.fffffffffffffp-6, -0x1.ffeaaaeeee86ep-6, -0x1.ffeaaaeeee86dp-6}, + {0x1.0p-5, 0x1.ffeaaaeeee86fp-6, 0x1.ffeaaaeeee86ep-6}, + {-0x1.0p-5, -0x1.ffeaaaeeee86fp-6, -0x1.ffeaaaeeee86ep-6}, + {0x1.0000000000001p-5, 0x1.ffeaaaeeee871p-6, 0x1.ffeaaaeeee87p-6}, + {-0x1.0000000000001p-5, -0x1.ffeaaaeeee871p-6, -0x1.ffeaaaeeee87p-6}, + {0x1.fffffffffffffp-7, 0x1.fffaaaaeeeed4p-7, 0x1.fffaaaaeeeed3p-7}, + {-0x1.fffffffffffffp-7, -0x1.fffaaaaeeeed4p-7, -0x1.fffaaaaeeeed3p-7}, + {0x1.0p-6, 0x1.fffaaaaeeeed5p-7, 0x1.fffaaaaeeeed4p-7}, + {-0x1.0p-6, -0x1.fffaaaaeeeed5p-7, -0x1.fffaaaaeeeed4p-7}, + {0x1.0000000000001p-6, 0x1.fffaaaaeeeed7p-7, 0x1.fffaaaaeeeed6p-7}, + {-0x1.0000000000001p-6, -0x1.fffaaaaeeeed7p-7, -0x1.fffaaaaeeeed6p-7}, + {0x1.fffffffffffffp-15, 0x1.fffffffaaaaaap-15, 0x1.fffffffaaaaa9p-15}, + {-0x1.fffffffffffffp-15, -0x1.fffffffaaaaaap-15, -0x1.fffffffaaaaa9p-15}, + {0x1.0p-14, 0x1.fffffffaaaaabp-15, 0x1.fffffffaaaaaap-15}, + {-0x1.0p-14, -0x1.fffffffaaaaabp-15, -0x1.fffffffaaaaaap-15}, + {0x1.0000000000001p-14, 0x1.fffffffaaaaadp-15, 0x1.fffffffaaaaacp-15}, + {-0x1.0000000000001p-14, -0x1.fffffffaaaaadp-15, -0x1.fffffffaaaaacp-15}, + {0x1.fffffffffffffp-28, 0x1.fffffffffffffp-28, 0x1.ffffffffffffep-28}, + {-0x1.fffffffffffffp-28, -0x1.fffffffffffffp-28, -0x1.ffffffffffffep-28}, + {0x1.0p-27, 0x1.0p-27, 0x1.fffffffffffffp-28}, + {-0x1.0p-27, -0x1.0p-27, -0x1.fffffffffffffp-28}, + {0x1.0000000000001p-27, 0x1.0000000000001p-27, 0x1.0p-27}, + {-0x1.0000000000001p-27, -0x1.0000000000001p-27, -0x1.0p-27}, + {0x1.fffffffffffffp-31, 0x1.fffffffffffffp-31, 0x1.ffffffffffffep-31}, + {-0x1.fffffffffffffp-31, -0x1.fffffffffffffp-31, -0x1.ffffffffffffep-31}, + {0x1.0p-30, 0x1.0p-30, 0x1.fffffffffffffp-31}, + {-0x1.0p-30, -0x1.0p-30, -0x1.fffffffffffffp-31}, + {0x1.0000000000001p-30, 0x1.0000000000001p-30, 0x1.0p-30}, + {-0x1.0000000000001p-30, -0x1.0000000000001p-30, -0x1.0p-30}, + {-0x1.fffffffffffffp1023, -0x1.452fc98b34e97p-8, -0x1.452fc98b34e96p-8}, + {0x1.fffffffffffffp1023, 0x1.452fc98b34e97p-8, 0x1.452fc98b34e96p-8}, + {0x1.fffffffffffffp1023, 0x1.452fc98b34e97p-8, 0x1.452fc98b34e96p-8}, + {-0x1.fffffffffffffp1023, -0x1.452fc98b34e97p-8, -0x1.452fc98b34e96p-8}, + {0x1.fffffffffffffp1023, 0x1.452fc98b34e97p-8, 0x1.452fc98b34e96p-8}, + {-0x1.fffffffffffffp1023, -0x1.452fc98b34e97p-8, -0x1.452fc98b34e96p-8}, + {0x1.ffffffffffffep1023, 0x1.daa3677c6ee8ap-1, 0x1.daa3677c6ee8bp-1}, + {-0x1.ffffffffffffep1023, -0x1.daa3677c6ee8ap-1, -0x1.daa3677c6ee8bp-1}, + {0x1.921fb54442d18p1, 0x1.1a62633145c07p-53, 0x1.1a62633145c06p-53}, + {-0x1.921fb54442d18p1, -0x1.1a62633145c07p-53, -0x1.1a62633145c06p-53}, + {0x1.921fb54442d18p0, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p0, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.0000000000001p0, 0x1.aed548f090cefp-1, 0x1.aed548f090cfp-1}, + {-0x1.0000000000001p0, -0x1.aed548f090cefp-1, -0x1.aed548f090cfp-1}, + {0x1.0p0, 0x1.aed548f090ceep-1, 0x1.aed548f090cefp-1}, + {-0x1.0p0, -0x1.aed548f090ceep-1, -0x1.aed548f090cefp-1}, + {0x1.fffffffffffffp-1, 0x1.aed548f090cedp-1, 0x1.aed548f090ceep-1}, + {-0x1.fffffffffffffp-1, -0x1.aed548f090cedp-1, -0x1.aed548f090ceep-1}, + {0x1.921fb54442d18p-1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcdp-1}, + {-0x1.921fb54442d18p-1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcdp-1}, + {0x1.0000000000001p-1022, 0x1.0000000000001p-1022, 0x1.0000000000001p-1022}, + {-0x1.0000000000001p-1022, -0x1.0000000000001p-1022, -0x1.0000000000001p-1022}, + {0x1.0p-1022, 0x1.0p-1022, 0x1.0p-1022}, + {-0x1.0p-1022, -0x1.0p-1022, -0x1.0p-1022}, + {0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022}, + {-0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022}, + {0x0.ffffffffffffep-1022, 0x0.ffffffffffffep-1022, 0x0.ffffffffffffep-1022}, + {-0x0.ffffffffffffep-1022, -0x0.ffffffffffffep-1022, -0x0.ffffffffffffep-1022}, + {0x0.0000000000002p-1022, 0x0.0000000000002p-1022, 0x0.0000000000002p-1022}, + {-0x0.0000000000002p-1022, -0x0.0000000000002p-1022, -0x0.0000000000001p-1022}, + {0x0.0000000000001p-1022, 0x0.0000000000001p-1022, 0x0.0p0}, + {-0x0.0000000000001p-1022, -0x0.0000000000001p-1022, -0x0.0p0}, + {0x0.0p0, 0x0.0p0, 0x0.0p0}, + {-0x0.0p0, -0x0.0p0, -0x0.0p0} + + }; + + for(double[] testCase: testCases) { + failures += testSinCase(testCase[0], testCase[1], testCase[2]); + } + + return failures; + } + + private static int testSinCase(double input, double bound1, double bound2) { + int failures = 0; + failures += Tests.testBounds("Math.sin", input, Math.sin(input), bound1, bound2); + return failures; + } + + private static int testCornerCasesCos() { + int failures = 0; + double[][] testCases = { + {0x1.feb1f7920e248p-2, 0x1.c1a27ae836f13p-1, 0x1.c1a27ae836f12p-1}, + {-0x1.feb1f7920e248p-2, 0x1.c1a27ae836f13p-1, 0x1.c1a27ae836f12p-1}, + {0x1.7cb7648526f99p-1, 0x1.78daf01036d0dp-1, 0x1.78daf01036d0cp-1}, + {-0x1.7cb7648526f99p-1, 0x1.78daf01036d0dp-1, 0x1.78daf01036d0cp-1}, + {0x1.549ec0c0c5afap-5, 0x1.ff8eb6a91ecbp-1, 0x1.ff8eb6a91ecb1p-1}, + {-0x1.549ec0c0c5afap-5, 0x1.ff8eb6a91ecbp-1, 0x1.ff8eb6a91ecb1p-1}, + {0x1.16e534ee3658p-4, 0x1.fed0476fc75cap-1, 0x1.fed0476fc75c9p-1}, + {-0x1.16e534ee3658p-4, 0x1.fed0476fc75cap-1, 0x1.fed0476fc75c9p-1}, + {0x1.efeef61d39ac2p-3, 0x1.f10fc61e2c78fp-1, 0x1.f10fc61e2c78ep-1}, + {-0x1.efeef61d39ac2p-3, 0x1.f10fc61e2c78fp-1, 0x1.f10fc61e2c78ep-1}, + {0x1.c65a170474549p-1, 0x1.434a3645be208p-1, 0x1.434a3645be209p-1}, + {-0x1.c65a170474549p-1, 0x1.434a3645be208p-1, 0x1.434a3645be209p-1}, + {0x1.6b8a6273d7c21p0, 0x1.337fc5b072c53p-3, 0x1.337fc5b072c52p-3}, + {-0x1.6b8a6273d7c21p0, 0x1.337fc5b072c53p-3, 0x1.337fc5b072c52p-3}, + {-0x1.036f4ba7e90aap-2, 0x1.efa7cddb128fcp-1, 0x1.efa7cddb128fbp-1}, + {0x1.036f4ba7e90aap-2, 0x1.efa7cddb128fcp-1, 0x1.efa7cddb128fbp-1}, + {-0x1.1500766c9df2p-31, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.1500766c9df2p-31, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.1e2a1563e068ep-2, 0x1.ec231802917bep-1, 0x1.ec231802917bdp-1}, + {0x1.1e2a1563e068ep-2, 0x1.ec231802917bep-1, 0x1.ec231802917bdp-1}, + {-0x1.2115aa73f8d05p5, 0x1.dc044ac92b7fcp-8, 0x1.dc044ac92b7fbp-8}, + {0x1.2115aa73f8d05p5, 0x1.dc044ac92b7fcp-8, 0x1.dc044ac92b7fbp-8}, + {-0x1.34e3bcdf8f69ap2, 0x1.d1fa67c50dd53p-4, 0x1.d1fa67c50dd52p-4}, + {0x1.34e3bcdf8f69ap2, 0x1.d1fa67c50dd53p-4, 0x1.d1fa67c50dd52p-4}, + {-0x1.380000000000bp7, 0x1.e2f8d19fb8db8p-2, 0x1.e2f8d19fb8db9p-2}, + {0x1.380000000000bp7, 0x1.e2f8d19fb8db8p-2, 0x1.e2f8d19fb8db9p-2}, + {-0x1.440000004p6, 0x1.8da9c90c3eda1p-1, 0x1.8da9c90c3eda2p-1}, + {0x1.440000004p6, 0x1.8da9c90c3eda1p-1, 0x1.8da9c90c3eda2p-1}, + {-0x1.550c8ee67a4c4p29, 0x1.b59b320603f83p-1, 0x1.b59b320603f84p-1}, + {0x1.550c8ee67a4c4p29, 0x1.b59b320603f83p-1, 0x1.b59b320603f84p-1}, + {-0x1.711789fdb2e8ap-13, 0x1.ffffff7af6c88p-1, 0x1.ffffff7af6c89p-1}, + {0x1.711789fdb2e8ap-13, 0x1.ffffff7af6c88p-1, 0x1.ffffff7af6c89p-1}, + {-0x1.77e000002p8, 0x1.c1b68ebb0b4fep-2, 0x1.c1b68ebb0b4ffp-2}, + {0x1.77e000002p8, 0x1.c1b68ebb0b4fep-2, 0x1.c1b68ebb0b4ffp-2}, + {-0x1.8106561931b43p0, 0x1.1161e1dad76dcp-4, 0x1.1161e1dad76dbp-4}, + {0x1.8106561931b43p0, 0x1.1161e1dad76dcp-4, 0x1.1161e1dad76dbp-4}, + {-0x1.825be2461cad4p0, 0x1.f828c3226b3d7p-5, 0x1.f828c3226b3d8p-5}, + {0x1.825be2461cad4p0, 0x1.f828c3226b3d7p-5, 0x1.f828c3226b3d8p-5}, + {-0x1.8288755803b08p0, 0x1.f2990d742e9fbp-5, 0x1.f2990d742e9fap-5}, + {0x1.8288755803b08p0, 0x1.f2990d742e9fbp-5, 0x1.f2990d742e9fap-5}, + {-0x1.8a75701f4ccd3p1, -0x1.ff150dda7524dp-1, -0x1.ff150dda7524cp-1}, + {0x1.8a75701f4ccd3p1, -0x1.ff150dda7524dp-1, -0x1.ff150dda7524cp-1}, + {-0x1.b389316f37f37p3, 0x1.015c47c32b574p-1, 0x1.015c47c32b575p-1}, + {0x1.b389316f37f37p3, 0x1.015c47c32b574p-1, 0x1.015c47c32b575p-1}, + {-0x1.c602c465d7d27p6, 0x1.d681a366a0534p-1, 0x1.d681a366a0535p-1}, + {0x1.c602c465d7d27p6, 0x1.d681a366a0534p-1, 0x1.d681a366a0535p-1}, + {-0x1.cfb81fe69664cp4, -0x1.84e896c7543d6p-1, -0x1.84e896c7543d5p-1}, + {0x1.cfb81fe69664cp4, -0x1.84e896c7543d6p-1, -0x1.84e896c7543d5p-1}, + {-0x1.d08f2d86b12c6p13, 0x1.fc5dcfddd54cp-1, 0x1.fc5dcfddd54c1p-1}, + {0x1.d08f2d86b12c6p13, 0x1.fc5dcfddd54cp-1, 0x1.fc5dcfddd54c1p-1}, + {-0x1.de13f0943c494p99, 0x1.fe83235fbe016p-3, 0x1.fe83235fbe015p-3}, + {0x1.de13f0943c494p99, 0x1.fe83235fbe016p-3, 0x1.fe83235fbe015p-3}, + {-0x1.de3c1f1285e8bp3, -0x1.720321239ec5p-1, -0x1.720321239ec4fp-1}, + {0x1.de3c1f1285e8bp3, -0x1.720321239ec5p-1, -0x1.720321239ec4fp-1}, + {-0x1.fffffffffff7fp1023, 0x1.f7143c8bba407p-4, 0x1.f7143c8bba406p-4}, + {0x1.fffffffffff7fp1023, 0x1.f7143c8bba407p-4, 0x1.f7143c8bba406p-4}, + {-0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.0000000000001p51, 0x1.055e457ac1227p-5, 0x1.055e457ac1228p-5}, + {-0x1.0000000000001p51, 0x1.055e457ac1227p-5, 0x1.055e457ac1228p-5}, + {0x1.0000000000003p-1, 0x1.c1528065b7d4ep-1, 0x1.c1528065b7d4fp-1}, + {-0x1.0000000000003p-1, 0x1.c1528065b7d4ep-1, 0x1.c1528065b7d4fp-1}, + {0x1.0000000000003p-32, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.0000000000003p-32, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.000000000002p150, 0x1.fffea444bc05ep-1, 0x1.fffea444bc05fp-1}, + {-0x1.000000000002p150, 0x1.fffea444bc05ep-1, 0x1.fffea444bc05fp-1}, + {0x1.0000000000038p380, -0x1.ebddee876f434p-1, -0x1.ebddee876f433p-1}, + {-0x1.0000000000038p380, -0x1.ebddee876f434p-1, -0x1.ebddee876f433p-1}, + {0x1.0000000000118p380, -0x1.f2ffc51dc6968p-1, -0x1.f2ffc51dc6969p-1}, + {-0x1.0000000000118p380, -0x1.f2ffc51dc6968p-1, -0x1.f2ffc51dc6969p-1}, + {0x1.00000000003ffp641, -0x1.f8fbb4d358b2p-1, -0x1.f8fbb4d358b21p-1}, + {-0x1.00000000003ffp641, -0x1.f8fbb4d358b2p-1, -0x1.f8fbb4d358b21p-1}, + {0x1.0000000001p1, -0x1.aa2265753e668p-2, -0x1.aa2265753e669p-2}, + {-0x1.0000000001p1, -0x1.aa2265753e668p-2, -0x1.aa2265753e669p-2}, + {0x1.000000008p452, 0x1.fd1242c25994dp-1, 0x1.fd1242c25994ep-1}, + {-0x1.000000008p452, 0x1.fd1242c25994dp-1, 0x1.fd1242c25994ep-1}, + {0x1.00000000effafp-7, 0x1.fffc0001554dap-1, 0x1.fffc0001554dbp-1}, + {-0x1.00000000effafp-7, 0x1.fffc0001554dap-1, 0x1.fffc0001554dbp-1}, + {0x1.00000114fefe2p0, 0x1.14a27f2925522p-1, 0x1.14a27f2925523p-1}, + {-0x1.00000114fefe2p0, 0x1.14a27f2925522p-1, 0x1.14a27f2925523p-1}, + {0x1.000007p40, 0x1.bf81e0269c59dp-3, 0x1.bf81e0269c59cp-3}, + {-0x1.000007p40, 0x1.bf81e0269c59dp-3, 0x1.bf81e0269c59cp-3}, + {0x1.00000acadb3d3p0, 0x1.14a26ed1960d6p-1, 0x1.14a26ed1960d7p-1}, + {-0x1.00000acadb3d3p0, 0x1.14a26ed1960d6p-1, 0x1.14a26ed1960d7p-1}, + {0x1.00003p-17, 0x1.ffffffffbfffep-1, 0x1.ffffffffbffffp-1}, + {-0x1.00003p-17, 0x1.ffffffffbfffep-1, 0x1.ffffffffbffffp-1}, + {0x1.00003ffffffaep-18, 0x1.ffffffffeffffp-1, 0x1.fffffffffp-1}, + {-0x1.00003ffffffaep-18, 0x1.ffffffffeffffp-1, 0x1.fffffffffp-1}, + {0x1.00003ffffffffp-18, 0x1.ffffffffeffffp-1, 0x1.fffffffffp-1}, + {-0x1.00003ffffffffp-18, 0x1.ffffffffeffffp-1, 0x1.fffffffffp-1}, + {0x1.00007ffffdeap41, -0x1.dab7efeb35baep-2, -0x1.dab7efeb35badp-2}, + {-0x1.00007ffffdeap41, -0x1.dab7efeb35baep-2, -0x1.dab7efeb35badp-2}, + {0x1.0000ffff8p-19, 0x1.fffffffffcp-1, 0x1.fffffffffbfffp-1}, + {-0x1.0000ffff8p-19, 0x1.fffffffffcp-1, 0x1.fffffffffbfffp-1}, + {0x1.0003fff800051p-20, 0x1.ffffffffffp-1, 0x1.fffffffffefffp-1}, + {-0x1.0003fff800051p-20, 0x1.ffffffffffp-1, 0x1.fffffffffefffp-1}, + {0x1.0003fff800096p-20, 0x1.ffffffffffp-1, 0x1.fffffffffefffp-1}, + {-0x1.0003fff800096p-20, 0x1.ffffffffffp-1, 0x1.fffffffffefffp-1}, + {0x1.000fd2p334, -0x1.fbf2b71a23a58p-2, -0x1.fbf2b71a23a57p-2}, + {-0x1.000fd2p334, -0x1.fbf2b71a23a58p-2, -0x1.fbf2b71a23a57p-2}, + {0x1.003p514, 0x1.fccc87eae7737p-5, 0x1.fccc87eae7736p-5}, + {-0x1.003p514, 0x1.fccc87eae7737p-5, 0x1.fccc87eae7736p-5}, + {0x1.00600000015f4p41, -0x1.a43f40d92b7edp-7, -0x1.a43f40d92b7eep-7}, + {-0x1.00600000015f4p41, -0x1.a43f40d92b7edp-7, -0x1.a43f40d92b7eep-7}, + {0x1.007p-1, 0x1.c11cc38f40ab3p-1, 0x1.c11cc38f40ab2p-1}, + {-0x1.007p-1, 0x1.c11cc38f40ab3p-1, 0x1.c11cc38f40ab2p-1}, + {0x1.007p-21, 0x1.ffffffffffbfcp-1, 0x1.ffffffffffbfdp-1}, + {-0x1.007p-21, 0x1.ffffffffffbfcp-1, 0x1.ffffffffffbfdp-1}, + {0x1.00cp40, 0x1.e9ba98231f734p-8, 0x1.e9ba98231f735p-8}, + {-0x1.00cp40, 0x1.e9ba98231f734p-8, 0x1.e9ba98231f735p-8}, + {0x1.011p-4, 0x1.fefdf48ed649dp-1, 0x1.fefdf48ed649cp-1}, + {-0x1.011p-4, 0x1.fefdf48ed649dp-1, 0x1.fefdf48ed649cp-1}, + {0x1.011p996, -0x1.ffc16a0f12ff2p-1, -0x1.ffc16a0f12ff3p-1}, + {-0x1.011p996, -0x1.ffc16a0f12ff2p-1, -0x1.ffc16a0f12ff3p-1}, + {0x1.02p-2, 0x1.efd5b61a30a38p-1, 0x1.efd5b61a30a39p-1}, + {-0x1.02p-2, 0x1.efd5b61a30a38p-1, 0x1.efd5b61a30a39p-1}, + {0x1.0204260c18307p59, 0x1.c97b8161dc50ap-2, 0x1.c97b8161dc50bp-2}, + {-0x1.0204260c18307p59, 0x1.c97b8161dc50ap-2, 0x1.c97b8161dc50bp-2}, + {0x1.02e78a321155ep1, -0x1.bf26a3c9b9fbfp-2, -0x1.bf26a3c9b9fbep-2}, + {-0x1.02e78a321155ep1, -0x1.bf26a3c9b9fbfp-2, -0x1.bf26a3c9b9fbep-2}, + {0x1.04p-4, 0x1.fef806b1f84e5p-1, 0x1.fef806b1f84e4p-1}, + {-0x1.04p-4, 0x1.fef806b1f84e5p-1, 0x1.fef806b1f84e4p-1}, + {0x1.04bde8bb80258p98, 0x1.fe851fbf87d17p-1, 0x1.fe851fbf87d18p-1}, + {-0x1.04bde8bb80258p98, 0x1.fe851fbf87d17p-1, 0x1.fe851fbf87d18p-1}, + {0x1.077e749e37ceep236, 0x1.70f6a51da8effp-1, 0x1.70f6a51da8efep-1}, + {-0x1.077e749e37ceep236, 0x1.70f6a51da8effp-1, 0x1.70f6a51da8efep-1}, + {0x1.07f8p300, 0x1.6b408c856bda6p-3, 0x1.6b408c856bda5p-3}, + {-0x1.07f8p300, 0x1.6b408c856bda6p-3, 0x1.6b408c856bda5p-3}, + {0x1.07f9bea1b3546p27, 0x1.2b2f965ae40fcp-1, 0x1.2b2f965ae40fdp-1}, + {-0x1.07f9bea1b3546p27, 0x1.2b2f965ae40fcp-1, 0x1.2b2f965ae40fdp-1}, + {0x1.090d18372f2d5p4, -0x1.4eed2f3fc76a8p-1, -0x1.4eed2f3fc76a7p-1}, + {-0x1.090d18372f2d5p4, -0x1.4eed2f3fc76a8p-1, -0x1.4eed2f3fc76a7p-1}, + {0x1.0b4p-3, 0x1.fba59aecee5p-1, 0x1.fba59aecee501p-1}, + {-0x1.0b4p-3, 0x1.fba59aecee5p-1, 0x1.fba59aecee501p-1}, + {0x1.0c0d5c2af3c2ep346, 0x1.fffd1bcda7a7dp-1, 0x1.fffd1bcda7a7ep-1}, + {-0x1.0c0d5c2af3c2ep346, 0x1.fffd1bcda7a7dp-1, 0x1.fffd1bcda7a7ep-1}, + {0x1.0d30596ee91fdp216, -0x1.e4dfe83129286p-1, -0x1.e4dfe83129287p-1}, + {-0x1.0d30596ee91fdp216, -0x1.e4dfe83129286p-1, -0x1.e4dfe83129287p-1}, + {0x1.0d6p0, 0x1.fb8432886a284p-2, 0x1.fb8432886a283p-2}, + {-0x1.0d6p0, 0x1.fb8432886a284p-2, 0x1.fb8432886a283p-2}, + {0x1.0e9474c68831cp-10, 0x1.ffffee202854p-1, 0x1.ffffee202853fp-1}, + {-0x1.0e9474c68831cp-10, 0x1.ffffee202854p-1, 0x1.ffffee202853fp-1}, + {0x1.113bae4049849p2, -0x1.b70d3d5584b1bp-2, -0x1.b70d3d5584b1ap-2}, + {-0x1.113bae4049849p2, -0x1.b70d3d5584b1bp-2, -0x1.b70d3d5584b1ap-2}, + {0x1.12eb87097654p-4, 0x1.fed8df58f626p-1, 0x1.fed8df58f625fp-1}, + {-0x1.12eb87097654p-4, 0x1.fed8df58f626p-1, 0x1.fed8df58f625fp-1}, + {0x1.13cp0, 0x1.e536ae395dfcep-2, 0x1.e536ae395dfcfp-2}, + {-0x1.13cp0, 0x1.e536ae395dfcep-2, 0x1.e536ae395dfcfp-2}, + {0x1.16e534ee3658p-4, 0x1.fed0476fc75cap-1, 0x1.fed0476fc75c9p-1}, + {-0x1.16e534ee3658p-4, 0x1.fed0476fc75cap-1, 0x1.fed0476fc75c9p-1}, + {0x1.17fffffffea98p-3, 0x1.fb38e82e3193ap-1, 0x1.fb38e82e3193bp-1}, + {-0x1.17fffffffea98p-3, 0x1.fb38e82e3193ap-1, 0x1.fb38e82e3193bp-1}, + {0x1.18p-3, 0x1.fb38e82e3188p-1, 0x1.fb38e82e3187fp-1}, + {-0x1.18p-3, 0x1.fb38e82e3188p-1, 0x1.fb38e82e3187fp-1}, + {0x1.1a191ebbb4d7fp7, -0x1.e59647f1fe9c7p-1, -0x1.e59647f1fe9c8p-1}, + {-0x1.1a191ebbb4d7fp7, -0x1.e59647f1fe9c7p-1, -0x1.e59647f1fe9c8p-1}, + {0x1.1da84f2b7b1d8p7, -0x1.d0dca1f8715bep-4, -0x1.d0dca1f8715bdp-4}, + {-0x1.1da84f2b7b1d8p7, -0x1.d0dca1f8715bep-4, -0x1.d0dca1f8715bdp-4}, + {0x1.201e973251302p0, 0x1.b917ebbc30e1ep-2, 0x1.b917ebbc30e1dp-2}, + {-0x1.201e973251302p0, 0x1.b917ebbc30e1ep-2, 0x1.b917ebbc30e1dp-2}, + {0x1.21e02p-7, 0x1.fffadf12ff414p-1, 0x1.fffadf12ff415p-1}, + {-0x1.21e02p-7, 0x1.fffadf12ff414p-1, 0x1.fffadf12ff415p-1}, + {0x1.27e29a4b985bfp1, -0x1.598a4dab3de5ap-1, -0x1.598a4dab3de59p-1}, + {-0x1.27e29a4b985bfp1, -0x1.598a4dab3de5ap-1, -0x1.598a4dab3de59p-1}, + {0x1.2a1f28dbfb6cp-3, 0x1.fa95c1154abf5p-1, 0x1.fa95c1154abf6p-1}, + {-0x1.2a1f28dbfb6cp-3, 0x1.fa95c1154abf5p-1, 0x1.fa95c1154abf6p-1}, + {0x1.2b8p1, -0x1.6412293adb7bcp-1, -0x1.6412293adb7bdp-1}, + {-0x1.2b8p1, -0x1.6412293adb7bcp-1, -0x1.6412293adb7bdp-1}, + {0x1.31199def72f4dp-7, 0x1.fffa518a7d0e7p-1, 0x1.fffa518a7d0e8p-1}, + {-0x1.31199def72f4dp-7, 0x1.fffa518a7d0e7p-1, 0x1.fffa518a7d0e8p-1}, + {0x1.31260e1485014p4, 0x1.f36895fe177f8p-1, 0x1.f36895fe177f7p-1}, + {-0x1.31260e1485014p4, 0x1.f36895fe177f8p-1, 0x1.f36895fe177f7p-1}, + {0x1.34e964cd103bdp2, 0x1.d36207b4fee17p-4, 0x1.d36207b4fee16p-4}, + {-0x1.34e964cd103bdp2, 0x1.d36207b4fee17p-4, 0x1.d36207b4fee16p-4}, + {0x1.37618a0ba785p1, -0x1.84a37f4fa7616p-1, -0x1.84a37f4fa7617p-1}, + {-0x1.37618a0ba785p1, -0x1.84a37f4fa7616p-1, -0x1.84a37f4fa7617p-1}, + {0x1.379704f5f1eb3p24, -0x1.c830bbc99e229p-39, -0x1.c830bbc99e22ap-39}, + {-0x1.379704f5f1eb3p24, -0x1.c830bbc99e229p-39, -0x1.c830bbc99e22ap-39}, + {0x1.3b61dd166d47p2, 0x1.b5daaa233bd5p-3, 0x1.b5daaa233bd4fp-3}, + {-0x1.3b61dd166d47p2, 0x1.b5daaa233bd5p-3, 0x1.b5daaa233bd4fp-3}, + {0x1.3c011022acbdp37, -0x1.ffd00dc4db401p-4, -0x1.ffd00dc4db4p-4}, + {-0x1.3c011022acbdp37, -0x1.ffd00dc4db401p-4, -0x1.ffd00dc4db4p-4}, + {0x1.3e7788e900b7p727, -0x1.14052b4016ff5p-1, -0x1.14052b4016ff6p-1}, + {-0x1.3e7788e900b7p727, -0x1.14052b4016ff5p-1, -0x1.14052b4016ff6p-1}, + {0x1.423eafdcc2779p-10, 0x1.ffffe6a5e4198p-1, 0x1.ffffe6a5e4197p-1}, + {-0x1.423eafdcc2779p-10, 0x1.ffffe6a5e4198p-1, 0x1.ffffe6a5e4197p-1}, + {0x1.4321828c1b538p119, -0x1.fe09fc3d16feep-6, -0x1.fe09fc3d16fedp-6}, + {-0x1.4321828c1b538p119, -0x1.fe09fc3d16feep-6, -0x1.fe09fc3d16fedp-6}, + {0x1.43506cb22975dp22, 0x1.b685d949a27ap-14, 0x1.b685d949a27a1p-14}, + {-0x1.43506cb22975dp22, 0x1.b685d949a27ap-14, 0x1.b685d949a27a1p-14}, + {0x1.439f63495786ap67, 0x1.fe398090e203cp-1, 0x1.fe398090e203bp-1}, + {-0x1.439f63495786ap67, 0x1.fe398090e203cp-1, 0x1.fe398090e203bp-1}, + {0x1.457538a6bd073p-4, 0x1.fe6274e000974p-1, 0x1.fe6274e000973p-1}, + {-0x1.457538a6bd073p-4, 0x1.fe6274e000974p-1, 0x1.fe6274e000973p-1}, + {0x1.478fc08p43, 0x1.09fcb69359c0ap-1, 0x1.09fcb69359c09p-1}, + {-0x1.478fc08p43, 0x1.09fcb69359c0ap-1, 0x1.09fcb69359c09p-1}, + {0x1.48a45797cbe63p61, -0x1.20c2158511e79p-9, -0x1.20c2158511e78p-9}, + {-0x1.48a45797cbe63p61, -0x1.20c2158511e79p-9, -0x1.20c2158511e78p-9}, + {0x1.4a62e0e12c173p-1, 0x1.990d17aae253p-1, 0x1.990d17aae2531p-1}, + {-0x1.4a62e0e12c173p-1, 0x1.990d17aae253p-1, 0x1.990d17aae2531p-1}, + {0x1.4c596642a9488p9, 0x1.fdd4f1e00b387p-3, 0x1.fdd4f1e00b388p-3}, + {-0x1.4c596642a9488p9, 0x1.fdd4f1e00b387p-3, 0x1.fdd4f1e00b388p-3}, + {0x1.4dp-4, 0x1.fe4f141032f38p-1, 0x1.fe4f141032f37p-1}, + {-0x1.4dp-4, 0x1.fe4f141032f38p-1, 0x1.fe4f141032f37p-1}, + {0x1.4f0f308p488, 0x1.94e9f45d43c14p-2, 0x1.94e9f45d43c13p-2}, + {-0x1.4f0f308p488, 0x1.94e9f45d43c14p-2, 0x1.94e9f45d43c13p-2}, + {0x1.52f00ep793, 0x1.9355f69ad4326p-2, 0x1.9355f69ad4327p-2}, + {-0x1.52f00ep793, 0x1.9355f69ad4326p-2, 0x1.9355f69ad4327p-2}, + {0x1.52f06c730ec02p2, 0x1.1a19be8bea10ap-1, 0x1.1a19be8bea10bp-1}, + {-0x1.52f06c730ec02p2, 0x1.1a19be8bea10ap-1, 0x1.1a19be8bea10bp-1}, + {0x1.53e7d5845fe3dp220, 0x1.385d92ec0c734p-1, 0x1.385d92ec0c733p-1}, + {-0x1.53e7d5845fe3dp220, 0x1.385d92ec0c734p-1, 0x1.385d92ec0c733p-1}, + {0x1.59p-20, 0x1.fffffffffe2f1p-1, 0x1.fffffffffe2fp-1}, + {-0x1.59p-20, 0x1.fffffffffe2f1p-1, 0x1.fffffffffe2fp-1}, + {0x1.592f1176f098p86, -0x1.ffd7bc28ded92p-1, -0x1.ffd7bc28ded91p-1}, + {-0x1.592f1176f098p86, -0x1.ffd7bc28ded92p-1, -0x1.ffd7bc28ded91p-1}, + {0x1.5999999dc09dcp1, -0x1.cee28b3d79799p-1, -0x1.cee28b3d7979ap-1}, + {-0x1.5999999dc09dcp1, -0x1.cee28b3d79799p-1, -0x1.cee28b3d7979ap-1}, + {0x1.5bea01p468, 0x1.c1f1eb08c2604p-1, 0x1.c1f1eb08c2605p-1}, + {-0x1.5bea01p468, 0x1.c1f1eb08c2604p-1, 0x1.c1f1eb08c2605p-1}, + {0x1.5cb80a6135e5ap1000, 0x1.fffe35ab09a65p-1, 0x1.fffe35ab09a66p-1}, + {-0x1.5cb80a6135e5ap1000, 0x1.fffe35ab09a65p-1, 0x1.fffe35ab09a66p-1}, + {0x1.5d5be48730d2dp13, -0x1.07b85f606e75dp-3, -0x1.07b85f606e75ep-3}, + {-0x1.5d5be48730d2dp13, -0x1.07b85f606e75dp-3, -0x1.07b85f606e75ep-3}, + {0x1.614p-21, 0x1.ffffffffff862p-1, 0x1.ffffffffff863p-1}, + {-0x1.614p-21, 0x1.ffffffffff862p-1, 0x1.ffffffffff863p-1}, + {0x1.62adc8a660364p1, -0x1.dd3a806e89cf2p-1, -0x1.dd3a806e89cf1p-1}, + {-0x1.62adc8a660364p1, -0x1.dd3a806e89cf2p-1, -0x1.dd3a806e89cf1p-1}, + {0x1.64ef438p142, -0x1.4308b14f4b6eep-1, -0x1.4308b14f4b6edp-1}, + {-0x1.64ef438p142, -0x1.4308b14f4b6eep-1, -0x1.4308b14f4b6edp-1}, + {0x1.652p0, 0x1.6623d2eb6add2p-3, 0x1.6623d2eb6add1p-3}, + {-0x1.652p0, 0x1.6623d2eb6add2p-3, 0x1.6623d2eb6add1p-3}, + {0x1.65865b2cb08a2p-7, 0x1.fff832c50f472p-1, 0x1.fff832c50f471p-1}, + {-0x1.65865b2cb08a2p-7, 0x1.fff832c50f472p-1, 0x1.fff832c50f471p-1}, + {0x1.6a937daabc20ep375, 0x1.acc251be33023p-1, 0x1.acc251be33022p-1}, + {-0x1.6a937daabc20ep375, 0x1.acc251be33023p-1, 0x1.acc251be33022p-1}, + {0x1.6ac5b262ca1ffp849, -0x1.14ae72e6ba22fp-61, -0x1.14ae72e6ba22ep-61}, + {-0x1.6ac5b262ca1ffp849, -0x1.14ae72e6ba22fp-61, -0x1.14ae72e6ba22ep-61}, + {0x1.6f7bdef7bdef4p3, 0x1.e0619960a11c6p-2, 0x1.e0619960a11c7p-2}, + {-0x1.6f7bdef7bdef4p3, 0x1.e0619960a11c6p-2, 0x1.e0619960a11c7p-2}, + {0x1.739ce759ce738p200, 0x1.8d23f97901a3p-1, 0x1.8d23f97901a31p-1}, + {-0x1.739ce759ce738p200, 0x1.8d23f97901a3p-1, 0x1.8d23f97901a31p-1}, + {0x1.7450c3f49d0b2p-11, 0x1.fffff78a14ba1p-1, 0x1.fffff78a14bap-1}, + {-0x1.7450c3f49d0b2p-11, 0x1.fffff78a14ba1p-1, 0x1.fffff78a14bap-1}, + {0x1.749fe53f963fdp0, 0x1.d6f1c727fb2ccp-4, 0x1.d6f1c727fb2cbp-4}, + {-0x1.749fe53f963fdp0, 0x1.d6f1c727fb2ccp-4, 0x1.d6f1c727fb2cbp-4}, + {0x1.74af6725c6206p1, -0x1.f284b5028c184p-1, -0x1.f284b5028c185p-1}, + {-0x1.74af6725c6206p1, -0x1.f284b5028c184p-1, -0x1.f284b5028c185p-1}, + {0x1.7550d28ffccc4p1, -0x1.f3165a0b306b2p-1, -0x1.f3165a0b306b1p-1}, + {-0x1.7550d28ffccc4p1, -0x1.f3165a0b306b2p-1, -0x1.f3165a0b306b1p-1}, + {0x1.775e397cd6aap6, 0x1.d66d2078ebdecp-1, 0x1.d66d2078ebdebp-1}, + {-0x1.775e397cd6aap6, 0x1.d66d2078ebdecp-1, 0x1.d66d2078ebdebp-1}, + {0x1.799302bf7f29p-1, 0x1.7af9a13085f53p-1, 0x1.7af9a13085f54p-1}, + {-0x1.799302bf7f29p-1, 0x1.7af9a13085f53p-1, 0x1.7af9a13085f54p-1}, + {0x1.799fffffffffdp-6, 0x1.ffdd2fdac0c25p-1, 0x1.ffdd2fdac0c24p-1}, + {-0x1.799fffffffffdp-6, 0x1.ffdd2fdac0c25p-1, 0x1.ffdd2fdac0c24p-1}, + {0x1.7a3692ca9449p-7, 0x1.fff744f185a73p-1, 0x1.fff744f185a74p-1}, + {-0x1.7a3692ca9449p-7, 0x1.fff744f185a73p-1, 0x1.fff744f185a74p-1}, + {0x1.7a66a638ac5b5p-1, 0x1.7a6b326b690fbp-1, 0x1.7a6b326b690fap-1}, + {-0x1.7a66a638ac5b5p-1, 0x1.7a6b326b690fbp-1, 0x1.7a6b326b690fap-1}, + {0x1.7ba65462b49ap0, 0x1.671fdb64ffbeep-4, 0x1.671fdb64ffbedp-4}, + {-0x1.7ba65462b49ap0, 0x1.671fdb64ffbeep-4, 0x1.671fdb64ffbedp-4}, + {0x1.7cdf37cdf37c9p239, 0x1.ffa55490f206ep-1, 0x1.ffa55490f206fp-1}, + {-0x1.7cdf37cdf37c9p239, 0x1.ffa55490f206ep-1, 0x1.ffa55490f206fp-1}, + {0x1.7d542565f472ep0, 0x1.4c5b5970a3a49p-4, 0x1.4c5b5970a3a48p-4}, + {-0x1.7d542565f472ep0, 0x1.4c5b5970a3a49p-4, 0x1.4c5b5970a3a48p-4}, + {0x1.7da0751649058p0, 0x1.479a5667c63f6p-4, 0x1.479a5667c63f5p-4}, + {-0x1.7da0751649058p0, 0x1.479a5667c63f6p-4, 0x1.479a5667c63f5p-4}, + {0x1.7e0ddcda6cc0dp-7, 0x1.fff717511dcb5p-1, 0x1.fff717511dcb6p-1}, + {-0x1.7e0ddcda6cc0dp-7, 0x1.fff717511dcb5p-1, 0x1.fff717511dcb6p-1}, + {0x1.7f6p-21, 0x1.ffffffffff707p-1, 0x1.ffffffffff708p-1}, + {-0x1.7f6p-21, 0x1.ffffffffff707p-1, 0x1.ffffffffff708p-1}, + {0x1.7f90117d44c74p100, -0x1.fff9e1554698p-1, -0x1.fff9e15546981p-1}, + {-0x1.7f90117d44c74p100, -0x1.fff9e1554698p-1, -0x1.fff9e15546981p-1}, + {0x1.7ffffffffef7ap-6, 0x1.ffdc006bff7eap-1, 0x1.ffdc006bff7e9p-1}, + {-0x1.7ffffffffef7ap-6, 0x1.ffdc006bff7eap-1, 0x1.ffdc006bff7e9p-1}, + {0x1.7fffffffffa26p-6, 0x1.ffdc006bff7e8p-1, 0x1.ffdc006bff7e7p-1}, + {-0x1.7fffffffffa26p-6, 0x1.ffdc006bff7e8p-1, 0x1.ffdc006bff7e7p-1}, + {0x1.7ffffffffff8p-6, 0x1.ffdc006bff7e7p-1, 0x1.ffdc006bff7e6p-1}, + {-0x1.7ffffffffff8p-6, 0x1.ffdc006bff7e7p-1, 0x1.ffdc006bff7e6p-1}, + {0x1.80ep-1, 0x1.760718ab44398p-1, 0x1.760718ab44397p-1}, + {-0x1.80ep-1, 0x1.760718ab44398p-1, 0x1.760718ab44397p-1}, + {0x1.81ae0dffa3b33p959, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.81ae0dffa3b33p959, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.81d612289c5cfp1, -0x1.fbdc48125b345p-1, -0x1.fbdc48125b346p-1}, + {-0x1.81d612289c5cfp1, -0x1.fbdc48125b345p-1, -0x1.fbdc48125b346p-1}, + {0x1.8220192270a0ep0, 0x1.ff9e396651ccap-5, 0x1.ff9e396651cc9p-5}, + {-0x1.8220192270a0ep0, 0x1.ff9e396651ccap-5, 0x1.ff9e396651cc9p-5}, + {0x1.822bb780e9104p0, 0x1.fe2b26dddb5c9p-5, 0x1.fe2b26dddb5c8p-5}, + {-0x1.822bb780e9104p0, 0x1.fe2b26dddb5c9p-5, 0x1.fe2b26dddb5c8p-5}, + {0x1.82c119c4b8e49p0, 0x1.eb87cff7c9115p-5, 0x1.eb87cff7c9116p-5}, + {-0x1.82c119c4b8e49p0, 0x1.eb87cff7c9115p-5, 0x1.eb87cff7c9116p-5}, + {0x1.82c119c4b9fc4p0, 0x1.eb87cff7a62b7p-5, 0x1.eb87cff7a62b8p-5}, + {-0x1.82c119c4b9fc4p0, 0x1.eb87cff7a62b7p-5, 0x1.eb87cff7a62b8p-5}, + {0x1.82c119c4ba808p0, 0x1.eb87cff795ab1p-5, 0x1.eb87cff795ab2p-5}, + {-0x1.82c119c4ba808p0, 0x1.eb87cff795ab1p-5, 0x1.eb87cff795ab2p-5}, + {0x1.832c9fc76527p0, 0x1.de1d17ab0d6a5p-5, 0x1.de1d17ab0d6a4p-5}, + {-0x1.832c9fc76527p0, 0x1.de1d17ab0d6a5p-5, 0x1.de1d17ab0d6a4p-5}, + {0x1.833956ce7d1f9p0, 0x1.dc86e7bec0c45p-5, 0x1.dc86e7bec0c44p-5}, + {-0x1.833956ce7d1f9p0, 0x1.dc86e7bec0c45p-5, 0x1.dc86e7bec0c44p-5}, + {0x1.834574eb1c099p0, 0x1.db03cbb942a7bp-5, 0x1.db03cbb942a7ap-5}, + {-0x1.834574eb1c099p0, 0x1.db03cbb942a7bp-5, 0x1.db03cbb942a7ap-5}, + {0x1.83aba5688e13ep0, 0x1.ce431710d1507p-5, 0x1.ce431710d1508p-5}, + {-0x1.83aba5688e13ep0, 0x1.ce431710d1507p-5, 0x1.ce431710d1508p-5}, + {0x1.83b38bbafd75bp0, 0x1.cd46b3a77f6ddp-5, 0x1.cd46b3a77f6dep-5}, + {-0x1.83b38bbafd75bp0, 0x1.cd46b3a77f6ddp-5, 0x1.cd46b3a77f6dep-5}, + {0x1.86a017cb1c31cp16, -0x1.ff29bc666bee7p-1, -0x1.ff29bc666bee6p-1}, + {-0x1.86a017cb1c31cp16, -0x1.ff29bc666bee7p-1, -0x1.ff29bc666bee6p-1}, + {0x1.8720588p392, -0x1.7968916e4c646p-2, -0x1.7968916e4c647p-2}, + {-0x1.8720588p392, -0x1.7968916e4c646p-2, -0x1.7968916e4c647p-2}, + {0x1.88a2288a22888p9, 0x1.fb97c7e452918p-1, 0x1.fb97c7e452917p-1}, + {-0x1.88a2288a22888p9, 0x1.fb97c7e452918p-1, 0x1.fb97c7e452917p-1}, + {0x1.8cf013991c308p1000, -0x1.ae44a5f01bf63p-1, -0x1.ae44a5f01bf64p-1}, + {-0x1.8cf013991c308p1000, -0x1.ae44a5f01bf63p-1, -0x1.ae44a5f01bf64p-1}, + {0x1.9p-2, 0x1.d96e82f71a9dcp-1, 0x1.d96e82f71a9ddp-1}, + {-0x1.9p-2, 0x1.d96e82f71a9dcp-1, 0x1.d96e82f71a9ddp-1}, + {0x1.9p0, 0x1.0fd9d5c093df5p-7, 0x1.0fd9d5c093df4p-7}, + {-0x1.9p0, 0x1.0fd9d5c093df5p-7, 0x1.0fd9d5c093df4p-7}, + {0x1.90000000006bp0, 0x1.0fd9d5c05e5fdp-7, 0x1.0fd9d5c05e5fcp-7}, + {-0x1.90000000006bp0, 0x1.0fd9d5c05e5fdp-7, 0x1.0fd9d5c05e5fcp-7}, + {0x1.900c206d44162p6, 0x1.bc8be725417d8p-1, 0x1.bc8be725417d9p-1}, + {-0x1.900c206d44162p6, 0x1.bc8be725417d8p-1, 0x1.bc8be725417d9p-1}, + {0x1.900c2af7baef3p-19, 0x1.fffffffff63b6p-1, 0x1.fffffffff63b7p-1}, + {-0x1.900c2af7baef3p-19, 0x1.fffffffff63b6p-1, 0x1.fffffffff63b7p-1}, + {0x1.900f11bd8955dp6, 0x1.bd464c9352d11p-1, 0x1.bd464c9352d1p-1}, + {-0x1.900f11bd8955dp6, 0x1.bd464c9352d11p-1, 0x1.bd464c9352d1p-1}, + {0x1.910b35c3253d4p100, 0x1.fffffda85cdd1p-1, 0x1.fffffda85cddp-1}, + {-0x1.910b35c3253d4p100, 0x1.fffffda85cdd1p-1, 0x1.fffffda85cddp-1}, + {0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {-0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {0x1.922p0, -0x1.2aeef4b9ea1aep-18, -0x1.2aeef4b9ea1afp-18}, + {-0x1.922p0, -0x1.2aeef4b9ea1aep-18, -0x1.2aeef4b9ea1afp-18}, + {0x1.9220354442d18p0, -0x1.ffffffffd9048p-18, -0x1.ffffffffd9049p-18}, + {-0x1.9220354442d18p0, -0x1.ffffffffd9048p-18, -0x1.ffffffffd9049p-18}, + {0x1.9251f93aeb59dp12, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.9251f93aeb59dp12, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.943be221d909ap2, 0x1.ffb8c4d1f78a8p-1, 0x1.ffb8c4d1f78a9p-1}, + {-0x1.943be221d909ap2, 0x1.ffb8c4d1f78a8p-1, 0x1.ffb8c4d1f78a9p-1}, + {0x1.94af699302875p-7, 0x1.fff6011fdddabp-1, 0x1.fff6011fdddacp-1}, + {-0x1.94af699302875p-7, 0x1.fff6011fdddabp-1, 0x1.fff6011fdddacp-1}, + {0x1.999999ab7b0edp-2, 0x1.d7954e7a3ee99p-1, 0x1.d7954e7a3ee9ap-1}, + {-0x1.999999ab7b0edp-2, 0x1.d7954e7a3ee99p-1, 0x1.d7954e7a3ee9ap-1}, + {0x1.999999bd4190bp-2, 0x1.d7954e76c8e31p-1, 0x1.d7954e76c8e3p-1}, + {-0x1.999999bd4190bp-2, 0x1.d7954e76c8e31p-1, 0x1.d7954e76c8e3p-1}, + {0x1.9bd0f19479a24p2, 0x1.fa23cfb820224p-1, 0x1.fa23cfb820225p-1}, + {-0x1.9bd0f19479a24p2, 0x1.fa23cfb820224p-1, 0x1.fa23cfb820225p-1}, + {0x1.9c55835e7e83ep8, -0x1.6a09e667f3af1p-1, -0x1.6a09e667f3afp-1}, + {-0x1.9c55835e7e83ep8, -0x1.6a09e667f3af1p-1, -0x1.6a09e667f3afp-1}, + {0x1.9c9942b14448dp-7, 0x1.fff59c1255809p-1, 0x1.fff59c125580ap-1}, + {-0x1.9c9942b14448dp-7, 0x1.fff59c1255809p-1, 0x1.fff59c125580ap-1}, + {0x1.9d3d92485e2b5p523, 0x1.ffece5cab4ca5p-1, 0x1.ffece5cab4ca6p-1}, + {-0x1.9d3d92485e2b5p523, 0x1.ffece5cab4ca5p-1, 0x1.ffece5cab4ca6p-1}, + {0x1.a0d068341a08p1000, -0x1.ff55301d3a781p-5, -0x1.ff55301d3a78p-5}, + {-0x1.a0d068341a08p1000, -0x1.ff55301d3a781p-5, -0x1.ff55301d3a78p-5}, + {0x1.a7ep-1, 0x1.5a5615acd0dcp-1, 0x1.5a5615acd0dc1p-1}, + {-0x1.a7ep-1, 0x1.5a5615acd0dcp-1, 0x1.5a5615acd0dc1p-1}, + {0x1.a858343863965p119, 0x1.766ad27a1de5p-14, 0x1.766ad27a1de4fp-14}, + {-0x1.a858343863965p119, 0x1.766ad27a1de5p-14, 0x1.766ad27a1de4fp-14}, + {0x1.ab190633d88eap3, 0x1.6bd4d5be72494p-1, 0x1.6bd4d5be72493p-1}, + {-0x1.ab190633d88eap3, 0x1.6bd4d5be72494p-1, 0x1.6bd4d5be72493p-1}, + {0x1.af4bd2f4bd2fp-21, 0x1.ffffffffff4a5p-1, 0x1.ffffffffff4a6p-1}, + {-0x1.af4bd2f4bd2fp-21, 0x1.ffffffffff4a5p-1, 0x1.ffffffffff4a6p-1}, + {0x1.afa70300aee6p72, 0x1.7ff2934ad29a8p-1, 0x1.7ff2934ad29a7p-1}, + {-0x1.afa70300aee6p72, 0x1.7ff2934ad29a8p-1, 0x1.7ff2934ad29a7p-1}, + {0x1.b5ab427cffb4cp94, 0x1.ff866aebdce0ap-1, 0x1.ff866aebdce0bp-1}, + {-0x1.b5ab427cffb4cp94, 0x1.ff866aebdce0ap-1, 0x1.ff866aebdce0bp-1}, + {0x1.b951f1572eba5p23, -0x1.f54f5227a4e84p-60, -0x1.f54f5227a4e83p-60}, + {-0x1.b951f1572eba5p23, -0x1.f54f5227a4e84p-60, -0x1.f54f5227a4e83p-60}, + {0x1.b96e5b96e5b91p-8, 0x1.fffd06d35579cp-1, 0x1.fffd06d35579dp-1}, + {-0x1.b96e5b96e5b91p-8, 0x1.fffd06d35579cp-1, 0x1.fffd06d35579dp-1}, + {0x1.ba3b18395d17bp8, -0x1.7c4128e2aff4cp-1, -0x1.7c4128e2aff4bp-1}, + {-0x1.ba3b18395d17bp8, -0x1.7c4128e2aff4cp-1, -0x1.7c4128e2aff4bp-1}, + {0x1.bab62ed655019p970, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.bab62ed655019p970, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.bd55aa411ab46p-13, 0x1.ffffff3e53446p-1, 0x1.ffffff3e53447p-1}, + {-0x1.bd55aa411ab46p-13, 0x1.ffffff3e53446p-1, 0x1.ffffff3e53447p-1}, + {0x1.bd616d4fe95cdp36, -0x1.7fdb07b9f77ep-1, -0x1.7fdb07b9f77e1p-1}, + {-0x1.bd616d4fe95cdp36, -0x1.7fdb07b9f77ep-1, -0x1.7fdb07b9f77e1p-1}, + {0x1.beap-6, 0x1.ffcf4da76222dp-1, 0x1.ffcf4da76222cp-1}, + {-0x1.beap-6, 0x1.ffcf4da76222dp-1, 0x1.ffcf4da76222cp-1}, + {0x1.c11516af585a4p1, -0x1.ddee13357ec6fp-1, -0x1.ddee13357ec7p-1}, + {-0x1.c11516af585a4p1, -0x1.ddee13357ec6fp-1, -0x1.ddee13357ec7p-1}, + {0x1.c75e54de4c06ep2, 0x1.58cccec059da2p-1, 0x1.58cccec059da1p-1}, + {-0x1.c75e54de4c06ep2, 0x1.58cccec059da2p-1, 0x1.58cccec059da1p-1}, + {0x1.cb44e86bc192bp648, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.cb44e86bc192bp648, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.cb44e86bc192bp649, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.cb44e86bc192bp649, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.cd5a6f8762affp1, -0x1.ca281d7fe44bp-1, -0x1.ca281d7fe44b1p-1}, + {-0x1.cd5a6f8762affp1, -0x1.ca281d7fe44bp-1, -0x1.ca281d7fe44b1p-1}, + {0x1.d0cb95f02ad77p464, 0x1.e80ad4fe54c72p-5, 0x1.e80ad4fe54c71p-5}, + {-0x1.d0cb95f02ad77p464, 0x1.e80ad4fe54c72p-5, 0x1.e80ad4fe54c71p-5}, + {0x1.d31bd604903ap2, 0x1.0df8eb409efe4p-1, 0x1.0df8eb409efe3p-1}, + {-0x1.d31bd604903ap2, 0x1.0df8eb409efe4p-1, 0x1.0df8eb409efe3p-1}, + {0x1.d32f4610180f6p-5, 0x1.ff2ae968efe71p-1, 0x1.ff2ae968efe7p-1}, + {-0x1.d32f4610180f6p-5, 0x1.ff2ae968efe71p-1, 0x1.ff2ae968efe7p-1}, + {0x1.d96e058p488, -0x1.cec307a674d3fp-3, -0x1.cec307a674d3ep-3}, + {-0x1.d96e058p488, -0x1.cec307a674d3fp-3, -0x1.cec307a674d3ep-3}, + {0x1.db0803c392b4cp15, -0x1.ac8dbf9cdc955p-5, -0x1.ac8dbf9cdc954p-5}, + {-0x1.db0803c392b4cp15, -0x1.ac8dbf9cdc955p-5, -0x1.ac8dbf9cdc954p-5}, + {0x1.db0803c3ff51dp15, -0x1.ac94870ca6317p-5, -0x1.ac94870ca6316p-5}, + {-0x1.db0803c3ff51dp15, -0x1.ac94870ca6317p-5, -0x1.ac94870ca6316p-5}, + {0x1.dc4p-5, 0x1.ff229073fd8b6p-1, 0x1.ff229073fd8b5p-1}, + {-0x1.dc4p-5, 0x1.ff229073fd8b6p-1, 0x1.ff229073fd8b5p-1}, + {0x1.dcf73dcf73dccp-5, 0x1.ff21e5f976p-1, 0x1.ff21e5f975fffp-1}, + {-0x1.dcf73dcf73dccp-5, 0x1.ff21e5f976p-1, 0x1.ff21e5f975fffp-1}, + {0x1.dffffffffffffp-1, 0x1.2f011326420e5p-1, 0x1.2f011326420e6p-1}, + {-0x1.dffffffffffffp-1, 0x1.2f011326420e5p-1, 0x1.2f011326420e6p-1}, + {0x1.e123691a7c4bep26, 0x1.f72c8e16dbc79p-1, 0x1.f72c8e16dbc78p-1}, + {-0x1.e123691a7c4bep26, 0x1.f72c8e16dbc79p-1, 0x1.f72c8e16dbc78p-1}, + {0x1.e666666f9cf49p0, -0x1.4b0c6bb623f58p-2, -0x1.4b0c6bb623f57p-2}, + {-0x1.e666666f9cf49p0, -0x1.4b0c6bb623f58p-2, -0x1.4b0c6bb623f57p-2}, + {0x1.e83accfc50b7p995, 0x1.fd74b55875885p-1, 0x1.fd74b55875884p-1}, + {-0x1.e83accfc50b7p995, 0x1.fd74b55875885p-1, 0x1.fd74b55875884p-1}, + {0x1.e8ep-7, 0x1.fff169b6ab7d1p-1, 0x1.fff169b6ab7d2p-1}, + {-0x1.e8ep-7, 0x1.fff169b6ab7d1p-1, 0x1.fff169b6ab7d2p-1}, + {0x1.eaf5ea5317442p4, 0x1.7d39c9f1b0b3cp-1, 0x1.7d39c9f1b0b3dp-1}, + {-0x1.eaf5ea5317442p4, 0x1.7d39c9f1b0b3cp-1, 0x1.7d39c9f1b0b3dp-1}, + {0x1.eb0c2b00b1b83p4, 0x1.7f13af7081a68p-1, 0x1.7f13af7081a67p-1}, + {-0x1.eb0c2b00b1b83p4, 0x1.7f13af7081a68p-1, 0x1.7f13af7081a67p-1}, + {0x1.ebc6b555311c4p15, -0x1.7ad7b88a1fe1p-1, -0x1.7ad7b88a1fe0fp-1}, + {-0x1.ebc6b555311c4p15, -0x1.7ad7b88a1fe1p-1, -0x1.7ad7b88a1fe0fp-1}, + {0x1.ef7bdef7bdef2p239, 0x1.b06b2b58a2a24p-5, 0x1.b06b2b58a2a23p-5}, + {-0x1.ef7bdef7bdef2p239, 0x1.b06b2b58a2a24p-5, 0x1.b06b2b58a2a23p-5}, + {0x1.efbbeefbbeef8p15, 0x1.fe6ded53172a7p-1, 0x1.fe6ded53172a6p-1}, + {-0x1.efbbeefbbeef8p15, 0x1.fe6ded53172a7p-1, 0x1.fe6ded53172a6p-1}, + {0x1.f07c1f07c1ef7p239, -0x1.fe2bcb87a7e16p-1, -0x1.fe2bcb87a7e15p-1}, + {-0x1.f07c1f07c1ef7p239, -0x1.fe2bcb87a7e16p-1, -0x1.fe2bcb87a7e15p-1}, + {0x1.f0f2b5e060b29p1, -0x1.79d08d6b3a883p-1, -0x1.79d08d6b3a882p-1}, + {-0x1.f0f2b5e060b29p1, -0x1.79d08d6b3a883p-1, -0x1.79d08d6b3a882p-1}, + {0x1.f4p-3, 0x1.f0d11d321178ep-1, 0x1.f0d11d321178dp-1}, + {-0x1.f4p-3, 0x1.f0d11d321178ep-1, 0x1.f0d11d321178dp-1}, + {0x1.f43d49f947e87p9, 0x1.e3ff5b15f723ep-4, 0x1.e3ff5b15f723dp-4}, + {-0x1.f43d49f947e87p9, 0x1.e3ff5b15f723ep-4, 0x1.e3ff5b15f723dp-4}, + {0x1.f7fffffffffffp1, -0x1.6636c9f6a87aap-1, -0x1.6636c9f6a87a9p-1}, + {-0x1.f7fffffffffffp1, -0x1.6636c9f6a87aap-1, -0x1.6636c9f6a87a9p-1}, + {0x1.f8fffffffffffp-6, 0x1.ffc1be3309286p-1, 0x1.ffc1be3309285p-1}, + {-0x1.f8fffffffffffp-6, 0x1.ffc1be3309286p-1, 0x1.ffc1be3309285p-1}, + {0x1.f9p-6, 0x1.ffc1be3309285p-1, 0x1.ffc1be3309286p-1}, + {-0x1.f9p-6, 0x1.ffc1be3309285p-1, 0x1.ffc1be3309286p-1}, + {0x1.fa0236523ce54p344, -0x1.fffffffcab0d6p-1, -0x1.fffffffcab0d5p-1}, + {-0x1.fa0236523ce54p344, -0x1.fffffffcab0d6p-1, -0x1.fffffffcab0d5p-1}, + {0x1.fceab54d37dap-4, 0x1.fc0d98ace2308p-1, 0x1.fc0d98ace2309p-1}, + {-0x1.fceab54d37dap-4, 0x1.fc0d98ace2308p-1, 0x1.fc0d98ace2309p-1}, + {0x1.fd0072fffffffp2, -0x1.9589bca128b92p-4, -0x1.9589bca128b91p-4}, + {-0x1.fd0072fffffffp2, -0x1.9589bca128b92p-4, -0x1.9589bca128b91p-4}, + {0x1.fe0f827673422p62, -0x1.4d304b07fc898p-2, -0x1.4d304b07fc897p-2}, + {-0x1.fe0f827673422p62, -0x1.4d304b07fc898p-2, -0x1.4d304b07fc897p-2}, + {0x1.feb1f7920e248p-2, 0x1.c1a27ae836f13p-1, 0x1.c1a27ae836f12p-1}, + {-0x1.feb1f7920e248p-2, 0x1.c1a27ae836f13p-1, 0x1.c1a27ae836f12p-1}, + {0x1.feeffffffffc6p995, -0x1.936b64e955979p-1, -0x1.936b64e955978p-1}, + {-0x1.feeffffffffc6p995, -0x1.936b64e955979p-1, -0x1.936b64e955978p-1}, + {0x1.ff8ffffffffffp-7, 0x1.fff007147ea57p-1, 0x1.fff007147ea58p-1}, + {-0x1.ff8ffffffffffp-7, 0x1.fff007147ea57p-1, 0x1.fff007147ea58p-1}, + {0x1.ff8ffffffffffp-10, 0x1.ffffc01bfe443p-1, 0x1.ffffc01bfe442p-1}, + {-0x1.ff8ffffffffffp-10, 0x1.ffffc01bfe443p-1, 0x1.ffffc01bfe442p-1}, + {0x1.ff8ffffffffffp870, 0x1.7cc9fb75317aep-1, 0x1.7cc9fb75317afp-1}, + {-0x1.ff8ffffffffffp870, 0x1.7cc9fb75317aep-1, 0x1.7cc9fb75317afp-1}, + {0x1.ffcfff8p19, 0x1.d6aea48015589p-1, 0x1.d6aea48015588p-1}, + {-0x1.ffcfff8p19, 0x1.d6aea48015589p-1, 0x1.d6aea48015588p-1}, + {0x1.ffcfff8p365, -0x1.6a9972eee19bbp-2, -0x1.6a9972eee19bap-2}, + {-0x1.ffcfff8p365, -0x1.6a9972eee19bbp-2, -0x1.6a9972eee19bap-2}, + {0x1.ffcffffffff6cp720, -0x1.3aaa15f7544b7p-1, -0x1.3aaa15f7544b6p-1}, + {-0x1.ffcffffffff6cp720, -0x1.3aaa15f7544b7p-1, -0x1.3aaa15f7544b6p-1}, + {0x1.ffcfffffffff9p320, 0x1.3f164bce055c5p-1, 0x1.3f164bce055c4p-1}, + {-0x1.ffcfffffffff9p320, 0x1.3f164bce055c5p-1, 0x1.3f164bce055c4p-1}, + {0x1.ffcffffffffffp-11, 0x1.fffff002fff15p-1, 0x1.fffff002fff14p-1}, + {-0x1.ffcffffffffffp-11, 0x1.fffff002fff15p-1, 0x1.fffff002fff14p-1}, + {0x1.ffcffffffffffp405, -0x1.ffffff987f986p-1, -0x1.ffffff987f985p-1}, + {-0x1.ffcffffffffffp405, -0x1.ffffff987f986p-1, -0x1.ffffff987f985p-1}, + {0x1.ffcffffffffffp567, -0x1.ffff6235a25eep-1, -0x1.ffff6235a25edp-1}, + {-0x1.ffcffffffffffp567, -0x1.ffff6235a25eep-1, -0x1.ffff6235a25edp-1}, + {0x1.ffefff8ffffffp16, 0x1.fdf11ae4608b1p-3, 0x1.fdf11ae4608bp-3}, + {-0x1.ffefff8ffffffp16, 0x1.fdf11ae4608b1p-3, 0x1.fdf11ae4608bp-3}, + {0x1.ffeffffffffccp995, 0x1.8f5525ab4583cp-1, 0x1.8f5525ab4583dp-1}, + {-0x1.ffeffffffffccp995, 0x1.8f5525ab4583cp-1, 0x1.8f5525ab4583dp-1}, + {0x1.ffeffffffffffp77, 0x1.a0af44a45c057p-8, 0x1.a0af44a45c056p-8}, + {-0x1.ffeffffffffffp77, 0x1.a0af44a45c057p-8, 0x1.a0af44a45c056p-8}, + {0x1.ffeffffffffffp122, -0x1.df7546c31bf8dp-1, -0x1.df7546c31bf8cp-1}, + {-0x1.ffeffffffffffp122, -0x1.df7546c31bf8dp-1, -0x1.df7546c31bf8cp-1}, + {0x1.ffeffffffffffp179, -0x1.825a7bea27d5bp-1, -0x1.825a7bea27d5cp-1}, + {-0x1.ffeffffffffffp179, -0x1.825a7bea27d5bp-1, -0x1.825a7bea27d5cp-1}, + {0x1.ffeffffffffffp238, -0x1.1be2ab2078d54p-1, -0x1.1be2ab2078d55p-1}, + {-0x1.ffeffffffffffp238, -0x1.1be2ab2078d54p-1, -0x1.1be2ab2078d55p-1}, + {0x1.fff0000002511p492, -0x1.a4cc5f838f529p-7, -0x1.a4cc5f838f52ap-7}, + {-0x1.fff0000002511p492, -0x1.a4cc5f838f529p-7, -0x1.a4cc5f838f52ap-7}, + {0x1.fff1fffffffffp41, 0x1.f16437d6119f9p-10, 0x1.f16437d6119f8p-10}, + {-0x1.fff1fffffffffp41, 0x1.f16437d6119f9p-10, 0x1.f16437d6119f8p-10}, + {0x1.ffffc7fffffffp45, 0x1.898324c2f1cfcp-11, 0x1.898324c2f1cfdp-11}, + {-0x1.ffffc7fffffffp45, 0x1.898324c2f1cfcp-11, 0x1.898324c2f1cfdp-11}, + {0x1.ffffdf1ffffffp-3, 0x1.f0154c00688f8p-1, 0x1.f0154c00688f9p-1}, + {-0x1.ffffdf1ffffffp-3, 0x1.f0154c00688f8p-1, 0x1.f0154c00688f9p-1}, + {0x1.fffff8fffffffp-6, 0x1.ffc00157126a8p-1, 0x1.ffc00157126a7p-1}, + {-0x1.fffff8fffffffp-6, 0x1.ffc00157126a8p-1, 0x1.ffc00157126a7p-1}, + {0x1.fffffbfffffffp968, -0x1.e0d9f0f38c73fp-2, -0x1.e0d9f0f38c74p-2}, + {-0x1.fffffbfffffffp968, -0x1.e0d9f0f38c73fp-2, -0x1.e0d9f0f38c74p-2}, + {0x1.fffffcfffffffp40, 0x1.fff4699dd560bp-1, 0x1.fff4699dd560cp-1}, + {-0x1.fffffcfffffffp40, 0x1.fff4699dd560bp-1, 0x1.fff4699dd560cp-1}, + {0x1.ffffff000004p-5, 0x1.ff0015559f228p-1, 0x1.ff0015559f229p-1}, + {-0x1.ffffff000004p-5, 0x1.ff0015559f228p-1, 0x1.ff0015559f229p-1}, + {0x1.ffffff8p119, -0x1.9c6951cccd39cp-2, -0x1.9c6951cccd39bp-2}, + {-0x1.ffffff8p119, -0x1.9c6951cccd39cp-2, -0x1.9c6951cccd39bp-2}, + {0x1.ffffff8p192, -0x1.f2c2263590035p-1, -0x1.f2c2263590034p-1}, + {-0x1.ffffff8p192, -0x1.f2c2263590035p-1, -0x1.f2c2263590034p-1}, + {0x1.ffffff8p543, 0x1.c7884d6cfb551p-1, 0x1.c7884d6cfb552p-1}, + {-0x1.ffffff8p543, 0x1.c7884d6cfb551p-1, 0x1.c7884d6cfb552p-1}, + {0x1.ffffffc3fffffp500, 0x1.e66c79e776a1fp-2, 0x1.e66c79e776a1ep-2}, + {-0x1.ffffffc3fffffp500, 0x1.e66c79e776a1fp-2, 0x1.e66c79e776a1ep-2}, + {0x1.ffffffe1fffffp700, 0x1.c7c9a9c57c0b2p-3, 0x1.c7c9a9c57c0b3p-3}, + {-0x1.ffffffe1fffffp700, 0x1.c7c9a9c57c0b2p-3, 0x1.c7c9a9c57c0b3p-3}, + {0x1.ffffffff0f0ffp400, 0x1.7bb28daf5f9aep-1, 0x1.7bb28daf5f9adp-1}, + {-0x1.ffffffff0f0ffp400, 0x1.7bb28daf5f9aep-1, 0x1.7bb28daf5f9adp-1}, + {0x1.ffffffff3ffffp-4, 0x1.fc015527d8bb3p-1, 0x1.fc015527d8bb4p-1}, + {-0x1.ffffffff3ffffp-4, 0x1.fc015527d8bb3p-1, 0x1.fc015527d8bb4p-1}, + {0x1.ffffffff8ffffp3, -0x1.ea5257eb66e3cp-1, -0x1.ea5257eb66e3bp-1}, + {-0x1.ffffffff8ffffp3, -0x1.ea5257eb66e3cp-1, -0x1.ea5257eb66e3bp-1}, + {0x1.fffffffffbcffp1, -0x1.4eaa606dbef97p-1, -0x1.4eaa606dbef96p-1}, + {-0x1.fffffffffbcffp1, -0x1.4eaa606dbef97p-1, -0x1.4eaa606dbef96p-1}, + {0x1.fffffffffe0b5p720, -0x1.fc9cd6b5f0095p-1, -0x1.fc9cd6b5f0094p-1}, + {-0x1.fffffffffe0b5p720, -0x1.fc9cd6b5f0095p-1, -0x1.fc9cd6b5f0094p-1}, + {0x1.fffffffffe7ffp41, 0x1.e96ac045dd139p-3, 0x1.e96ac045dd138p-3}, + {-0x1.fffffffffe7ffp41, 0x1.e96ac045dd139p-3, 0x1.e96ac045dd138p-3}, + {0x1.fffffffffee09p720, -0x1.fcaf39cfb94d5p-1, -0x1.fcaf39cfb94d4p-1}, + {-0x1.fffffffffee09p720, -0x1.fcaf39cfb94d5p-1, -0x1.fcaf39cfb94d4p-1}, + {0x1.ffffffffffdffp40, 0x1.8432232a6d1dap-1, 0x1.8432232a6d1dbp-1}, + {-0x1.ffffffffffdffp40, 0x1.8432232a6d1dap-1, 0x1.8432232a6d1dbp-1}, + {0x1.ffffffffffeffp41, 0x1.9e375143139dap-6, 0x1.9e375143139d9p-6}, + {-0x1.ffffffffffeffp41, 0x1.9e375143139dap-6, 0x1.9e375143139d9p-6}, + {0x1.fffffffffff4ap-8, 0x1.fffc000155552p-1, 0x1.fffc000155553p-1}, + {-0x1.fffffffffff4ap-8, 0x1.fffc000155552p-1, 0x1.fffc000155553p-1}, + {0x1.fffffffffff78p920, 0x1.463a895c4ea5dp-1, 0x1.463a895c4ea5cp-1}, + {-0x1.fffffffffff78p920, 0x1.463a895c4ea5dp-1, 0x1.463a895c4ea5cp-1}, + {0x1.fffffffffffd5p995, 0x1.3c1a48635cf38p-1, 0x1.3c1a48635cf39p-1}, + {-0x1.fffffffffffd5p995, 0x1.3c1a48635cf38p-1, 0x1.3c1a48635cf39p-1}, + {0x1.fffffffffffe8p720, 0x1.91c4e0708bd48p-1, 0x1.91c4e0708bd49p-1}, + {-0x1.fffffffffffe8p720, 0x1.91c4e0708bd48p-1, 0x1.91c4e0708bd49p-1}, + {0x1.fffffffffffebp920, -0x1.3e15cb849b5eap-1, -0x1.3e15cb849b5ebp-1}, + {-0x1.fffffffffffebp920, -0x1.3e15cb849b5eap-1, -0x1.3e15cb849b5ebp-1}, + {0x1.ffffffffffff1p245, -0x1.816808349b80ep-1, -0x1.816808349b80dp-1}, + {-0x1.ffffffffffff1p245, -0x1.816808349b80ep-1, -0x1.816808349b80dp-1}, + {0x1.ffffffffffff4p845, 0x1.4699c814c5f07p-1, 0x1.4699c814c5f08p-1}, + {-0x1.ffffffffffff4p845, 0x1.4699c814c5f07p-1, 0x1.4699c814c5f08p-1}, + {0x1.ffffffffffff4p1020, -0x1.815e92b7a2a01p-1, -0x1.815e92b7a2a02p-1}, + {-0x1.ffffffffffff4p1020, -0x1.815e92b7a2a01p-1, -0x1.815e92b7a2a02p-1}, + {0x1.ffffffffffffcp45, -0x1.3e8d028153202p-10, -0x1.3e8d028153201p-10}, + {-0x1.ffffffffffffcp45, -0x1.3e8d028153202p-10, -0x1.3e8d028153201p-10}, + {0x1.ffffffffffffep105, 0x1.7d6765714c786p-1, 0x1.7d6765714c785p-1}, + {-0x1.ffffffffffffep105, 0x1.7d6765714c786p-1, 0x1.7d6765714c785p-1}, + {0x1.ffffffffffffep480, -0x1.f869fb14d2569p-3, -0x1.f869fb14d2568p-3}, + {-0x1.ffffffffffffep480, -0x1.f869fb14d2569p-3, -0x1.f869fb14d2568p-3}, + {0x1.ffffffffffffep970, -0x1.80a75b369d3c4p-1, -0x1.80a75b369d3c3p-1}, + {-0x1.ffffffffffffep970, -0x1.80a75b369d3c4p-1, -0x1.80a75b369d3c3p-1}, + {0x1.0000000000001p42, -0x1.9dba69e853bd8p-4, -0x1.9dba69e853bd7p-4}, + {-0x1.0000000000001p42, -0x1.9dba69e853bd8p-4, -0x1.9dba69e853bd7p-4}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0p0, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.999999999999ap-13, 0x1.ffffff5c28f5dp-1, 0x1.ffffff5c28f5cp-1}, + {-0x1.999999999999ap-13, 0x1.ffffff5c28f5dp-1, 0x1.ffffff5c28f5cp-1}, + {0x1.999999999999ap-12, 0x1.fffffd70a3d79p-1, 0x1.fffffd70a3d7ap-1}, + {-0x1.999999999999ap-12, 0x1.fffffd70a3d79p-1, 0x1.fffffd70a3d7ap-1}, + {0x1.3333333333334p-11, 0x1.fffffa3d70a6ap-1, 0x1.fffffa3d70a69p-1}, + {-0x1.3333333333334p-11, 0x1.fffffa3d70a6ap-1, 0x1.fffffa3d70a69p-1}, + {0x1.999999999999ap-11, 0x1.fffff5c28f64ep-1, 0x1.fffff5c28f64fp-1}, + {-0x1.999999999999ap-11, 0x1.fffff5c28f64ep-1, 0x1.fffff5c28f64fp-1}, + {0x1.0p-10, 0x1.fffff00000155p-1, 0x1.fffff00000156p-1}, + {-0x1.0p-10, 0x1.fffff00000155p-1, 0x1.fffff00000156p-1}, + {0x1.3333333333333p-10, 0x1.ffffe8f5c2bbap-1, 0x1.ffffe8f5c2bb9p-1}, + {-0x1.3333333333333p-10, 0x1.ffffe8f5c2bbap-1, 0x1.ffffe8f5c2bb9p-1}, + {0x1.6666666666666p-10, 0x1.ffffe0a3d75c3p-1, 0x1.ffffe0a3d75c4p-1}, + {-0x1.6666666666666p-10, 0x1.ffffe0a3d75c3p-1, 0x1.ffffe0a3d75c4p-1}, + {0x1.9999999999999p-10, 0x1.ffffd70a3dfc7p-1, 0x1.ffffd70a3dfc8p-1}, + {-0x1.9999999999999p-10, 0x1.ffffd70a3dfc7p-1, 0x1.ffffd70a3dfc8p-1}, + {0x1.cccccccccccccp-10, 0x1.ffffcc28f6a28p-1, 0x1.ffffcc28f6a29p-1}, + {-0x1.cccccccccccccp-10, 0x1.ffffcc28f6a28p-1, 0x1.ffffcc28f6a29p-1}, + {0x1.0666666666666p-7, 0x1.fffbcc2a6e87p-1, 0x1.fffbcc2a6e86fp-1}, + {-0x1.0666666666666p-7, 0x1.fffbcc2a6e87p-1, 0x1.fffbcc2a6e86fp-1}, + {0x1.cccccccccccccp-7, 0x1.fff30a4b6fcc1p-1, 0x1.fff30a4b6fcc2p-1}, + {-0x1.cccccccccccccp-7, 0x1.fff30a4b6fcc1p-1, 0x1.fff30a4b6fcc2p-1}, + {0x1.4999999999999p-6, 0x1.ffe57a780f38cp-1, 0x1.ffe57a780f38dp-1}, + {-0x1.4999999999999p-6, 0x1.ffe57a780f38cp-1, 0x1.ffe57a780f38dp-1}, + {0x1.accccccccccccp-6, 0x1.ffd31cd0e1d63p-1, 0x1.ffd31cd0e1d62p-1}, + {-0x1.accccccccccccp-6, 0x1.ffd31cd0e1d63p-1, 0x1.ffd31cd0e1d62p-1}, + {0x1.08p-5, 0x1.ffbbf18207543p-1, 0x1.ffbbf18207542p-1}, + {-0x1.08p-5, 0x1.ffbbf18207543p-1, 0x1.ffbbf18207542p-1}, + {0x1.399999999999ap-5, 0x1.ff9ff8c3299f5p-1, 0x1.ff9ff8c3299f6p-1}, + {-0x1.399999999999ap-5, 0x1.ff9ff8c3299f5p-1, 0x1.ff9ff8c3299f6p-1}, + {0x1.6b33333333334p-5, 0x1.ff7f32d77c5b2p-1, 0x1.ff7f32d77c5b1p-1}, + {-0x1.6b33333333334p-5, 0x1.ff7f32d77c5b2p-1, 0x1.ff7f32d77c5b1p-1}, + {0x1.9cccccccccccep-5, 0x1.ff59a00dbc409p-1, 0x1.ff59a00dbc408p-1}, + {-0x1.9cccccccccccep-5, 0x1.ff59a00dbc409p-1, 0x1.ff59a00dbc408p-1}, + {0x1.ce66666666666p-5, 0x1.ff2f40c02e60fp-1, 0x1.ff2f40c02e61p-1}, + {-0x1.ce66666666666p-5, 0x1.ff2f40c02e60fp-1, 0x1.ff2f40c02e61p-1}, + {0x1.5e7fc4369bdadp-1, 0x1.8ca46c7d8975ep-1, 0x1.8ca46c7d8975fp-1}, + {-0x1.5e7fc4369bdadp-1, 0x1.8ca46c7d8975ep-1, 0x1.8ca46c7d8975fp-1}, + {0x1.4e7fc4369bdadp0, 0x1.0b5d3802fc799p-2, 0x1.0b5d3802fc79ap-2}, + {-0x1.4e7fc4369bdadp0, 0x1.0b5d3802fc799p-2, 0x1.0b5d3802fc79ap-2}, + {0x1.edbfa651e9c84p0, -0x1.66b96f53323afp-2, -0x1.66b96f53323bp-2}, + {-0x1.edbfa651e9c84p0, -0x1.66b96f53323afp-2, -0x1.66b96f53323bp-2}, + {0x1.467fc4369bdadp1, -0x1.a93554888c33p-1, -0x1.a93554888c32fp-1}, + {-0x1.467fc4369bdadp1, -0x1.a93554888c33p-1, -0x1.a93554888c32fp-1}, + {0x1.961fb54442d18p1, -0x1.ffc00155527d3p-1, -0x1.ffc00155527d2p-1}, + {-0x1.961fb54442d18p1, -0x1.ffc00155527d3p-1, -0x1.ffc00155527d2p-1}, + {0x1.e5bfa651e9c83p1, -0x1.96907c5c7c25cp-1, -0x1.96907c5c7c25bp-1}, + {-0x1.e5bfa651e9c83p1, -0x1.96907c5c7c25cp-1, -0x1.96907c5c7c25bp-1}, + {0x1.1aafcbafc85f7p2, -0x1.2a1e5a50f948dp-2, -0x1.2a1e5a50f948cp-2}, + {-0x1.1aafcbafc85f7p2, -0x1.2a1e5a50f948dp-2, -0x1.2a1e5a50f948cp-2}, + {0x1.427fc4369bdadp2, 0x1.4894f695dc56cp-2, 0x1.4894f695dc56bp-2}, + {-0x1.427fc4369bdadp2, 0x1.4894f695dc56cp-2, 0x1.4894f695dc56bp-2}, + {0x1.6a4fbcbd6f562p2, 0x1.a016ea3a692cep-1, 0x1.a016ea3a692cfp-1}, + {-0x1.6a4fbcbd6f562p2, 0x1.a016ea3a692cep-1, 0x1.a016ea3a692cfp-1}, + {0x1.6af2eff0a2896p2, 0x1.a30a69f5537ecp-1, 0x1.a30a69f5537ebp-1}, + {-0x1.6af2eff0a2896p2, 0x1.a30a69f5537ecp-1, 0x1.a30a69f5537ebp-1}, + {0x1.43c62a9d02414p2, 0x1.5bd62e8b04ad6p-2, 0x1.5bd62e8b04ad5p-2}, + {-0x1.43c62a9d02414p2, 0x1.5bd62e8b04ad6p-2, 0x1.5bd62e8b04ad5p-2}, + {0x1.1c99654961f92p2, -0x1.0cb71f671e634p-2, -0x1.0cb71f671e635p-2}, + {-0x1.1c99654961f92p2, -0x1.0cb71f671e634p-2, -0x1.0cb71f671e635p-2}, + {0x1.ead93feb8361fp1, -0x1.89d86aa8521c1p-1, -0x1.89d86aa8521c2p-1}, + {-0x1.ead93feb8361fp1, -0x1.89d86aa8521c1p-1, -0x1.89d86aa8521c2p-1}, + {0x1.9c7fb54442d1ap1, -0x1.fe51ac554a16bp-1, -0x1.fe51ac554a16ap-1}, + {-0x1.9c7fb54442d1ap1, -0x1.fe51ac554a16bp-1, -0x1.fe51ac554a16ap-1}, + {0x1.4e262a9d02415p1, -0x1.b97c04d08bc5dp-1, -0x1.b97c04d08bc5ep-1}, + {-0x1.4e262a9d02415p1, -0x1.b97c04d08bc5dp-1, -0x1.b97c04d08bc5ep-1}, + {0x1.ff993feb8362p0, -0x1.a8ac8a3e58f6dp-2, -0x1.a8ac8a3e58f6cp-2}, + {-0x1.ff993feb8362p0, -0x1.a8ac8a3e58f6dp-2, -0x1.a8ac8a3e58f6cp-2}, + {0x1.62e62a9d02416p0, 0x1.77a8b9b3d254bp-3, 0x1.77a8b9b3d254ap-3}, + {-0x1.62e62a9d02416p0, 0x1.77a8b9b3d254bp-3, 0x1.77a8b9b3d254ap-3}, + {0x1.8c662a9d02419p-1, 0x1.6e1061205dd79p-1, 0x1.6e1061205dd7ap-1}, + {-0x1.8c662a9d02419p-1, 0x1.6e1061205dd79p-1, 0x1.6e1061205dd7ap-1}, + {-0x1.a8aa1d11c44ffp0, -0x1.682f3cc3c7a09p-4, -0x1.682f3cc3c7a08p-4}, + {0x1.a8aa1d11c44ffp0, -0x1.682f3cc3c7a09p-4, -0x1.682f3cc3c7a08p-4}, + {-0x1.95ec8b9e03d54p0, -0x1.e6669a270c36dp-7, -0x1.e6669a270c36ep-7}, + {0x1.95ec8b9e03d54p0, -0x1.e6669a270c36dp-7, -0x1.e6669a270c36ep-7}, + {-0x1.832efa2a435a9p0, 0x1.ddd1ec25e209fp-5, 0x1.ddd1ec25e20ap-5}, + {0x1.832efa2a435a9p0, 0x1.ddd1ec25e209fp-5, 0x1.ddd1ec25e20ap-5}, + {-0x1.707168b682dfep0, 0x1.0cab9115640dap-3, 0x1.0cab9115640d9p-3}, + {0x1.707168b682dfep0, 0x1.0cab9115640dap-3, 0x1.0cab9115640d9p-3}, + {-0x1.5db3d742c2653p0, 0x1.a0723a95492eep-3, 0x1.a0723a95492edp-3}, + {0x1.5db3d742c2653p0, 0x1.a0723a95492eep-3, 0x1.a0723a95492edp-3}, + {-0x1.4af645cf01ea8p0, 0x1.18fee96a1a586p-2, 0x1.18fee96a1a585p-2}, + {0x1.4af645cf01ea8p0, 0x1.18fee96a1a586p-2, 0x1.18fee96a1a585p-2}, + {-0x1.3838b45b416fdp0, 0x1.6043621b13be3p-2, 0x1.6043621b13be2p-2}, + {0x1.3838b45b416fdp0, 0x1.6043621b13be3p-2, 0x1.6043621b13be2p-2}, + {-0x1.257b22e780f52p0, 0x1.a5a4ccf40d9dap-2, 0x1.a5a4ccf40d9d9p-2}, + {0x1.257b22e780f52p0, 0x1.a5a4ccf40d9dap-2, 0x1.a5a4ccf40d9d9p-2}, + {-0x1.12bd9173c07abp0, 0x1.e8c405f36f85cp-2, 0x1.e8c405f36f85bp-2}, + {0x1.12bd9173c07abp0, 0x1.e8c405f36f85cp-2, 0x1.e8c405f36f85bp-2}, + {-0x1.ea5c3ed5b385p-1, 0x1.26976a6c4e0f8p-1, 0x1.26976a6c4e0f9p-1}, + {0x1.ea5c3ed5b385p-1, 0x1.26976a6c4e0f8p-1, 0x1.26976a6c4e0f9p-1}, + {-0x1.d4b87dab670ap-1, 0x1.3805a1882009fp-1, 0x1.3805a188200ap-1}, + {0x1.d4b87dab670ap-1, 0x1.3805a1882009fp-1, 0x1.3805a188200ap-1}, + {-0x1.bf14bc811a8fp-1, 0x1.48e52e0a65bcbp-1, 0x1.48e52e0a65bccp-1}, + {0x1.bf14bc811a8fp-1, 0x1.48e52e0a65bcbp-1, 0x1.48e52e0a65bccp-1}, + {-0x1.a970fb56ce14p-1, 0x1.592e58ea0a9efp-1, 0x1.592e58ea0a9eep-1}, + {0x1.a970fb56ce14p-1, 0x1.592e58ea0a9efp-1, 0x1.592e58ea0a9eep-1}, + {-0x1.93cd3a2c8199p-1, 0x1.68d9afe052d1fp-1, 0x1.68d9afe052d2p-1}, + {0x1.93cd3a2c8199p-1, 0x1.68d9afe052d1fp-1, 0x1.68d9afe052d2p-1}, + {-0x1.7e297902351ep-1, 0x1.77e008d0775e7p-1, 0x1.77e008d0775e8p-1}, + {0x1.7e297902351ep-1, 0x1.77e008d0775e7p-1, 0x1.77e008d0775e8p-1}, + {-0x1.6885b7d7e8a3p-1, 0x1.863a850e438fep-1, 0x1.863a850e438ffp-1}, + {0x1.6885b7d7e8a3p-1, 0x1.863a850e438fep-1, 0x1.863a850e438ffp-1}, + {-0x1.52e1f6ad9c28p-1, 0x1.93e2948233fcep-1, 0x1.93e2948233fcfp-1}, + {0x1.52e1f6ad9c28p-1, 0x1.93e2948233fcep-1, 0x1.93e2948233fcfp-1}, + {-0x1.3d3e35834fadp-1, 0x1.a0d1f8a9a791dp-1, 0x1.a0d1f8a9a791ep-1}, + {0x1.3d3e35834fadp-1, 0x1.a0d1f8a9a791dp-1, 0x1.a0d1f8a9a791ep-1}, + {-0x1.0a0b02501c799p-1, 0x1.bc6bd861e13dep-1, 0x1.bc6bd861e13dfp-1}, + {0x1.0a0b02501c799p-1, 0x1.bc6bd861e13dep-1, 0x1.bc6bd861e13dfp-1}, + {-0x1.d8f7208e6b82cp-2, 0x1.ca59c6fa3d9cep-1, 0x1.ca59c6fa3d9cfp-1}, + {0x1.d8f7208e6b82cp-2, 0x1.ca59c6fa3d9cep-1, 0x1.ca59c6fa3d9cfp-1}, + {-0x1.9dd83c7c9e126p-2, 0x1.d6c0b125791dp-1, 0x1.d6c0b125791cfp-1}, + {0x1.9dd83c7c9e126p-2, 0x1.d6c0b125791dp-1, 0x1.d6c0b125791cfp-1}, + {-0x1.62b9586ad0a2p-2, 0x1.e196026182986p-1, 0x1.e196026182985p-1}, + {0x1.62b9586ad0a2p-2, 0x1.e196026182986p-1, 0x1.e196026182985p-1}, + {-0x1.279a74590331ap-2, 0x1.ead07cc635696p-1, 0x1.ead07cc635697p-1}, + {0x1.279a74590331ap-2, 0x1.ead07cc635696p-1, 0x1.ead07cc635697p-1}, + {-0x1.d8f7208e6b829p-3, 0x1.f26840e7b2189p-1, 0x1.f26840e7b2188p-1}, + {0x1.d8f7208e6b829p-3, 0x1.f26840e7b2189p-1, 0x1.f26840e7b2188p-1}, + {-0x1.62b9586ad0a1ep-3, 0x1.f856d48db797ep-1, 0x1.f856d48db797dp-1}, + {0x1.62b9586ad0a1ep-3, 0x1.f856d48db797ep-1, 0x1.f856d48db797dp-1}, + {-0x1.d8f7208e6b826p-4, 0x1.fc97283a42479p-1, 0x1.fc97283a4247ap-1}, + {0x1.d8f7208e6b826p-4, 0x1.fc97283a42479p-1, 0x1.fc97283a4247ap-1}, + {-0x1.d8f7208e6b82dp-5, 0x1.ff259b7ab9f5p-1, 0x1.ff259b7ab9f4fp-1}, + {0x1.d8f7208e6b82dp-5, 0x1.ff259b7ab9f5p-1, 0x1.ff259b7ab9f4fp-1}, + {0x1.d8f7208e6b82dp-5, 0x1.ff259b7ab9f5p-1, 0x1.ff259b7ab9f4fp-1}, + {-0x1.d8f7208e6b82dp-5, 0x1.ff259b7ab9f5p-1, 0x1.ff259b7ab9f4fp-1}, + {0x1.d8f7208e6b82dp-4, 0x1.fc97283a42479p-1, 0x1.fc97283a4247ap-1}, + {-0x1.d8f7208e6b82dp-4, 0x1.fc97283a42479p-1, 0x1.fc97283a4247ap-1}, + {0x1.62b9586ad0a22p-3, 0x1.f856d48db797ep-1, 0x1.f856d48db797dp-1}, + {-0x1.62b9586ad0a22p-3, 0x1.f856d48db797ep-1, 0x1.f856d48db797dp-1}, + {0x1.d8f7208e6b82dp-3, 0x1.f26840e7b2189p-1, 0x1.f26840e7b2188p-1}, + {-0x1.d8f7208e6b82dp-3, 0x1.f26840e7b2189p-1, 0x1.f26840e7b2188p-1}, + {0x1.279a74590331cp-2, 0x1.ead07cc635696p-1, 0x1.ead07cc635697p-1}, + {-0x1.279a74590331cp-2, 0x1.ead07cc635696p-1, 0x1.ead07cc635697p-1}, + {0x1.62b9586ad0a22p-2, 0x1.e196026182985p-1, 0x1.e196026182986p-1}, + {-0x1.62b9586ad0a22p-2, 0x1.e196026182985p-1, 0x1.e196026182986p-1}, + {0x1.9dd83c7c9e128p-2, 0x1.d6c0b125791dp-1, 0x1.d6c0b125791cfp-1}, + {-0x1.9dd83c7c9e128p-2, 0x1.d6c0b125791dp-1, 0x1.d6c0b125791cfp-1}, + {0x1.d8f7208e6b82ep-2, 0x1.ca59c6fa3d9cep-1, 0x1.ca59c6fa3d9cdp-1}, + {-0x1.d8f7208e6b82ep-2, 0x1.ca59c6fa3d9cep-1, 0x1.ca59c6fa3d9cdp-1}, + {0x1.0a0b02501c799p-1, 0x1.bc6bd861e13dep-1, 0x1.bc6bd861e13dfp-1}, + {-0x1.0a0b02501c799p-1, 0x1.bc6bd861e13dep-1, 0x1.bc6bd861e13dfp-1}, + {0x1.3d3e35834faccp-1, 0x1.a0d1f8a9a792p-1, 0x1.a0d1f8a9a791fp-1}, + {-0x1.3d3e35834faccp-1, 0x1.a0d1f8a9a792p-1, 0x1.a0d1f8a9a791fp-1}, + {0x1.52e1f6ad9c27cp-1, 0x1.93e2948233fd1p-1, 0x1.93e2948233fdp-1}, + {-0x1.52e1f6ad9c27cp-1, 0x1.93e2948233fd1p-1, 0x1.93e2948233fdp-1}, + {0x1.6885b7d7e8a2cp-1, 0x1.863a850e439p-1, 0x1.863a850e43901p-1}, + {-0x1.6885b7d7e8a2cp-1, 0x1.863a850e439p-1, 0x1.863a850e43901p-1}, + {0x1.7e297902351dcp-1, 0x1.77e008d0775eap-1, 0x1.77e008d0775e9p-1}, + {-0x1.7e297902351dcp-1, 0x1.77e008d0775eap-1, 0x1.77e008d0775e9p-1}, + {0x1.93cd3a2c8198cp-1, 0x1.68d9afe052d22p-1, 0x1.68d9afe052d21p-1}, + {-0x1.93cd3a2c8198cp-1, 0x1.68d9afe052d22p-1, 0x1.68d9afe052d21p-1}, + {0x1.a970fb56ce13cp-1, 0x1.592e58ea0a9f2p-1, 0x1.592e58ea0a9f1p-1}, + {-0x1.a970fb56ce13cp-1, 0x1.592e58ea0a9f2p-1, 0x1.592e58ea0a9f1p-1}, + {0x1.bf14bc811a8ecp-1, 0x1.48e52e0a65bcep-1, 0x1.48e52e0a65bcfp-1}, + {-0x1.bf14bc811a8ecp-1, 0x1.48e52e0a65bcep-1, 0x1.48e52e0a65bcfp-1}, + {0x1.d4b87dab6709cp-1, 0x1.3805a188200a2p-1, 0x1.3805a188200a3p-1}, + {-0x1.d4b87dab6709cp-1, 0x1.3805a188200a2p-1, 0x1.3805a188200a3p-1}, + {0x1.ea5c3ed5b384cp-1, 0x1.26976a6c4e0fcp-1, 0x1.26976a6c4e0fbp-1}, + {-0x1.ea5c3ed5b384cp-1, 0x1.26976a6c4e0fcp-1, 0x1.26976a6c4e0fbp-1}, + {0x1.12bd9173c07abp0, 0x1.e8c405f36f85cp-2, 0x1.e8c405f36f85bp-2}, + {-0x1.12bd9173c07abp0, 0x1.e8c405f36f85cp-2, 0x1.e8c405f36f85bp-2}, + {0x1.257b22e780f56p0, 0x1.a5a4ccf40d9cbp-2, 0x1.a5a4ccf40d9ccp-2}, + {-0x1.257b22e780f56p0, 0x1.a5a4ccf40d9cbp-2, 0x1.a5a4ccf40d9ccp-2}, + {0x1.3838b45b41701p0, 0x1.6043621b13bd4p-2, 0x1.6043621b13bd3p-2}, + {-0x1.3838b45b41701p0, 0x1.6043621b13bd4p-2, 0x1.6043621b13bd3p-2}, + {0x1.4af645cf01eacp0, 0x1.18fee96a1a576p-2, 0x1.18fee96a1a577p-2}, + {-0x1.4af645cf01eacp0, 0x1.18fee96a1a576p-2, 0x1.18fee96a1a577p-2}, + {0x1.5db3d742c2657p0, 0x1.a0723a95492cfp-3, 0x1.a0723a95492cep-3}, + {-0x1.5db3d742c2657p0, 0x1.a0723a95492cfp-3, 0x1.a0723a95492cep-3}, + {0x1.707168b682e02p0, 0x1.0cab9115640bap-3, 0x1.0cab9115640b9p-3}, + {-0x1.707168b682e02p0, 0x1.0cab9115640bap-3, 0x1.0cab9115640b9p-3}, + {0x1.832efa2a435adp0, 0x1.ddd1ec25e201fp-5, 0x1.ddd1ec25e202p-5}, + {-0x1.832efa2a435adp0, 0x1.ddd1ec25e201fp-5, 0x1.ddd1ec25e202p-5}, + {0x1.95ec8b9e03d58p0, -0x1.e6669a270c56dp-7, -0x1.e6669a270c56ep-7}, + {-0x1.95ec8b9e03d58p0, -0x1.e6669a270c56dp-7, -0x1.e6669a270c56ep-7}, + {0x1.a8aa1d11c44ffp0, -0x1.682f3cc3c7a09p-4, -0x1.682f3cc3c7a08p-4}, + {-0x1.a8aa1d11c44ffp0, -0x1.682f3cc3c7a09p-4, -0x1.682f3cc3c7a08p-4}, + {0x1.04aff6d330942p0, 0x1.0cb3469a29ea6p-1, 0x1.0cb3469a29ea7p-1}, + {-0x1.04aff6d330942p0, 0x1.0cb3469a29ea6p-1, 0x1.0cb3469a29ea7p-1}, + {0x1.04b09e98dcdb4p0, 0x1.0cb228fa7f811p-1, 0x1.0cb228fa7f812p-1}, + {-0x1.04b09e98dcdb4p0, 0x1.0cb228fa7f811p-1, 0x1.0cb228fa7f812p-1}, + {0x1.04b1465e89226p0, 0x1.0cb10b5a61b06p-1, 0x1.0cb10b5a61b05p-1}, + {-0x1.04b1465e89226p0, 0x1.0cb10b5a61b06p-1, 0x1.0cb10b5a61b05p-1}, + {0x1.04b1ee2435698p0, 0x1.0cafedb9d078bp-1, 0x1.0cafedb9d078ap-1}, + {-0x1.04b1ee2435698p0, 0x1.0cafedb9d078bp-1, 0x1.0cafedb9d078ap-1}, + {0x1.04b295e9e1b0ap0, 0x1.0caed018cbda8p-1, 0x1.0caed018cbda7p-1}, + {-0x1.04b295e9e1b0ap0, 0x1.0caed018cbda8p-1, 0x1.0caed018cbda7p-1}, + {0x1.04b33daf8df7cp0, 0x1.0cadb27753d65p-1, 0x1.0cadb27753d66p-1}, + {-0x1.04b33daf8df7cp0, 0x1.0cadb27753d65p-1, 0x1.0cadb27753d66p-1}, + {0x1.04b3e5753a3eep0, 0x1.0cac94d5686cbp-1, 0x1.0cac94d5686cap-1}, + {-0x1.04b3e5753a3eep0, 0x1.0cac94d5686cbp-1, 0x1.0cac94d5686cap-1}, + {0x1.04b48d3ae686p0, 0x1.0cab7733099dfp-1, 0x1.0cab7733099ep-1}, + {-0x1.04b48d3ae686p0, 0x1.0cab7733099dfp-1, 0x1.0cab7733099ep-1}, + {0x1.04b5350092ccfp0, 0x1.0caa5990376bp-1, 0x1.0caa5990376b1p-1}, + {-0x1.04b5350092ccfp0, 0x1.0caa5990376bp-1, 0x1.0caa5990376b1p-1}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0p0, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.279a74590331bp-1, 0x1.ad02c771c35edp-1, 0x1.ad02c771c35eep-1}, + {-0x1.279a74590331bp-1, 0x1.ad02c771c35edp-1, 0x1.ad02c771c35eep-1}, + {0x1.279a74590331cp-1, 0x1.ad02c771c35edp-1, 0x1.ad02c771c35ecp-1}, + {-0x1.279a74590331cp-1, 0x1.ad02c771c35edp-1, 0x1.ad02c771c35ecp-1}, + {0x1.279a74590331dp-1, 0x1.ad02c771c35ecp-1, 0x1.ad02c771c35edp-1}, + {-0x1.279a74590331dp-1, 0x1.ad02c771c35ecp-1, 0x1.ad02c771c35edp-1}, + {0x1.bb67ae8584ca9p0, -0x1.48d1ddd2b2b4p-3, -0x1.48d1ddd2b2b3fp-3}, + {-0x1.bb67ae8584ca9p0, -0x1.48d1ddd2b2b4p-3, -0x1.48d1ddd2b2b3fp-3}, + {0x1.bb67ae8584caap0, -0x1.48d1ddd2b2b47p-3, -0x1.48d1ddd2b2b48p-3}, + {-0x1.bb67ae8584caap0, -0x1.48d1ddd2b2b47p-3, -0x1.48d1ddd2b2b48p-3}, + {0x1.bb67ae8584cabp0, -0x1.48d1ddd2b2b4fp-3, -0x1.48d1ddd2b2b5p-3}, + {-0x1.bb67ae8584cabp0, -0x1.48d1ddd2b2b4fp-3, -0x1.48d1ddd2b2b5p-3}, + {0x1.bffffffffffffp-2, 0x1.cfc6cfa52adap-1, 0x1.cfc6cfa52ad9fp-1}, + {-0x1.bffffffffffffp-2, 0x1.cfc6cfa52adap-1, 0x1.cfc6cfa52ad9fp-1}, + {0x1.cp-2, 0x1.cfc6cfa52ad9fp-1, 0x1.cfc6cfa52adap-1}, + {-0x1.cp-2, 0x1.cfc6cfa52ad9fp-1, 0x1.cfc6cfa52adap-1}, + {0x1.c000000000001p-2, 0x1.cfc6cfa52ad9fp-1, 0x1.cfc6cfa52adap-1}, + {-0x1.c000000000001p-2, 0x1.cfc6cfa52ad9fp-1, 0x1.cfc6cfa52adap-1}, + {0x1.5ffffffffffffp-1, 0x1.8bb105a5dc901p-1, 0x1.8bb105a5dc902p-1}, + {-0x1.5ffffffffffffp-1, 0x1.8bb105a5dc901p-1, 0x1.8bb105a5dc902p-1}, + {0x1.6p-1, 0x1.8bb105a5dc9p-1, 0x1.8bb105a5dc901p-1}, + {-0x1.6p-1, 0x1.8bb105a5dc9p-1, 0x1.8bb105a5dc901p-1}, + {0x1.6000000000001p-1, 0x1.8bb105a5dc9p-1, 0x1.8bb105a5dc8ffp-1}, + {-0x1.6000000000001p-1, 0x1.8bb105a5dc9p-1, 0x1.8bb105a5dc8ffp-1}, + {0x1.2ffffffffffffp0, 0x1.7ef4842f0bcd1p-2, 0x1.7ef4842f0bcd2p-2}, + {-0x1.2ffffffffffffp0, 0x1.7ef4842f0bcd1p-2, 0x1.7ef4842f0bcd2p-2}, + {0x1.3p0, 0x1.7ef4842f0bccdp-2, 0x1.7ef4842f0bccep-2}, + {-0x1.3p0, 0x1.7ef4842f0bccdp-2, 0x1.7ef4842f0bccep-2}, + {0x1.3000000000001p0, 0x1.7ef4842f0bccap-2, 0x1.7ef4842f0bcc9p-2}, + {-0x1.3000000000001p0, 0x1.7ef4842f0bccap-2, 0x1.7ef4842f0bcc9p-2}, + {0x1.37fffffffffffp1, -0x1.863efa361dc22p-1, -0x1.863efa361dc23p-1}, + {-0x1.37fffffffffffp1, -0x1.863efa361dc22p-1, -0x1.863efa361dc23p-1}, + {0x1.38p1, -0x1.863efa361dc25p-1, -0x1.863efa361dc26p-1}, + {-0x1.38p1, -0x1.863efa361dc25p-1, -0x1.863efa361dc26p-1}, + {0x1.3800000000001p1, -0x1.863efa361dc28p-1, -0x1.863efa361dc27p-1}, + {-0x1.3800000000001p1, -0x1.863efa361dc28p-1, -0x1.863efa361dc27p-1}, + {0x1.069c8b46b3792p-4, 0x1.fef2b2d21cf6cp-1, 0x1.fef2b2d21cf6dp-1}, + {-0x1.069c8b46b3792p-4, 0x1.fef2b2d21cf6cp-1, 0x1.fef2b2d21cf6dp-1}, + {0x1.069c8b46b3792p-3, 0x1.fbcbe693bd8edp-1, 0x1.fbcbe693bd8ecp-1}, + {-0x1.069c8b46b3792p-3, 0x1.fbcbe693bd8edp-1, 0x1.fbcbe693bd8ecp-1}, + {0x1.89ead0ea0d35bp-3, 0x1.f68eebfcbb5e8p-1, 0x1.f68eebfcbb5e9p-1}, + {-0x1.89ead0ea0d35bp-3, 0x1.f68eebfcbb5e8p-1, 0x1.f68eebfcbb5e9p-1}, + {0x1.069c8b46b3792p-2, 0x1.ef4145b4aedp-1, 0x1.ef4145b4aecffp-1}, + {-0x1.069c8b46b3792p-2, 0x1.ef4145b4aedp-1, 0x1.ef4145b4aecffp-1}, + {0x1.4843ae1860576p-2, 0x1.e5eaa286fbbc6p-1, 0x1.e5eaa286fbbc7p-1}, + {-0x1.4843ae1860576p-2, 0x1.e5eaa286fbbc6p-1, 0x1.e5eaa286fbbc7p-1}, + {0x1.89ead0ea0d35ap-2, 0x1.da94d54dd4c08p-1, 0x1.da94d54dd4c09p-1}, + {-0x1.89ead0ea0d35ap-2, 0x1.da94d54dd4c08p-1, 0x1.da94d54dd4c09p-1}, + {0x1.cb91f3bbba13ep-2, 0x1.cd4bca9cb5c71p-1, 0x1.cd4bca9cb5c72p-1}, + {-0x1.cb91f3bbba13ep-2, 0x1.cd4bca9cb5c71p-1, 0x1.cd4bca9cb5c72p-1}, + {0x1.069c8b46b3791p-1, 0x1.be1d7c3534c4p-1, 0x1.be1d7c3534c41p-1}, + {-0x1.069c8b46b3791p-1, 0x1.be1d7c3534c4p-1, 0x1.be1d7c3534c41p-1}, + {0x1.27701caf89e83p-1, 0x1.ad19e2535aa96p-1, 0x1.ad19e2535aa97p-1}, + {-0x1.27701caf89e83p-1, 0x1.ad19e2535aa96p-1, 0x1.ad19e2535aa97p-1}, + {0x1.4843ae1860575p-1, 0x1.9a52e2e0fbcb4p-1, 0x1.9a52e2e0fbcb3p-1}, + {-0x1.4843ae1860575p-1, 0x1.9a52e2e0fbcb4p-1, 0x1.9a52e2e0fbcb3p-1}, + {0x1.69173f8136c67p-1, 0x1.85dc3ea1bbceap-1, 0x1.85dc3ea1bbce9p-1}, + {-0x1.69173f8136c67p-1, 0x1.85dc3ea1bbceap-1, 0x1.85dc3ea1bbce9p-1}, + {0x1.89ead0ea0d359p-1, 0x1.6fcb7c6b8b91ap-1, 0x1.6fcb7c6b8b919p-1}, + {-0x1.89ead0ea0d359p-1, 0x1.6fcb7c6b8b91ap-1, 0x1.6fcb7c6b8b919p-1}, + {0x1.aabe6252e3a4bp-1, 0x1.5837d2817cf3p-1, 0x1.5837d2817cf31p-1}, + {-0x1.aabe6252e3a4bp-1, 0x1.5837d2817cf3p-1, 0x1.5837d2817cf31p-1}, + {0x1.cb91f3bbba13dp-1, 0x1.3f3a0e28bedd4p-1, 0x1.3f3a0e28bedd5p-1}, + {-0x1.cb91f3bbba13dp-1, 0x1.3f3a0e28bedd4p-1, 0x1.3f3a0e28bedd5p-1}, + {0x1.ec6585249082fp-1, 0x1.24ec799171643p-1, 0x1.24ec799171642p-1}, + {-0x1.ec6585249082fp-1, 0x1.24ec799171643p-1, 0x1.24ec799171642p-1}, + {0x1.069c8b46b3791p0, 0x1.096ac02ec42c8p-1, 0x1.096ac02ec42c9p-1}, + {-0x1.069c8b46b3791p0, 0x1.096ac02ec42c8p-1, 0x1.096ac02ec42c9p-1}, + {0x1.170653fb1eb0ap0, 0x1.d9a3a336edb76p-2, 0x1.d9a3a336edb77p-2}, + {-0x1.170653fb1eb0ap0, 0x1.d9a3a336edb76p-2, 0x1.d9a3a336edb77p-2}, + {0x1.27701caf89e83p0, 0x1.9e7f8652b4758p-2, 0x1.9e7f8652b4759p-2}, + {-0x1.27701caf89e83p0, 0x1.9e7f8652b4758p-2, 0x1.9e7f8652b4759p-2}, + {0x1.37d9e563f51fcp0, 0x1.61a76077aee08p-2, 0x1.61a76077aee07p-2}, + {-0x1.37d9e563f51fcp0, 0x1.61a76077aee08p-2, 0x1.61a76077aee07p-2}, + {0x1.4843ae1860575p0, 0x1.235b331d8f749p-2, 0x1.235b331d8f748p-2}, + {-0x1.4843ae1860575p0, 0x1.235b331d8f749p-2, 0x1.235b331d8f748p-2}, + {0x1.58ad76cccb8eep0, 0x1.c7b90e3024594p-3, 0x1.c7b90e3024593p-3}, + {-0x1.58ad76cccb8eep0, 0x1.c7b90e3024594p-3, 0x1.c7b90e3024593p-3}, + {0x1.69173f8136c67p0, 0x1.46dc4f4ce83dap-3, 0x1.46dc4f4ce83dbp-3}, + {-0x1.69173f8136c67p0, 0x1.46dc4f4ce83dap-3, 0x1.46dc4f4ce83dbp-3}, + {0x1.79810835a1fep0, 0x1.894f70befbb9ap-4, 0x1.894f70befbb99p-4}, + {-0x1.79810835a1fep0, 0x1.894f70befbb9ap-4, 0x1.894f70befbb99p-4}, + {0x1.89ead0ea0d359p0, 0x1.069107ae9333p-5, 0x1.069107ae9332fp-5}, + {-0x1.89ead0ea0d359p0, 0x1.069107ae9333p-5, 0x1.069107ae9332fp-5}, + {0x1.9a54999e786d2p0, -0x1.069107ae9327ep-5, -0x1.069107ae9327fp-5}, + {-0x1.9a54999e786d2p0, -0x1.069107ae9327ep-5, -0x1.069107ae9327fp-5}, + {0x1.aabe6252e3a4bp0, -0x1.894f70befbb41p-4, -0x1.894f70befbb42p-4}, + {-0x1.aabe6252e3a4bp0, -0x1.894f70befbb41p-4, -0x1.894f70befbb42p-4}, + {0x1.bb282b074edc4p0, -0x1.46dc4f4ce83afp-3, -0x1.46dc4f4ce83aep-3}, + {-0x1.bb282b074edc4p0, -0x1.46dc4f4ce83afp-3, -0x1.46dc4f4ce83aep-3}, + {0x1.cb91f3bbba13dp0, -0x1.c7b90e3024569p-3, -0x1.c7b90e3024568p-3}, + {-0x1.cb91f3bbba13dp0, -0x1.c7b90e3024569p-3, -0x1.c7b90e3024568p-3}, + {0x1.dbfbbc70254b6p0, -0x1.235b331d8f734p-2, -0x1.235b331d8f733p-2}, + {-0x1.dbfbbc70254b6p0, -0x1.235b331d8f734p-2, -0x1.235b331d8f733p-2}, + {0x1.ec6585249082fp0, -0x1.61a76077aedf3p-2, -0x1.61a76077aedf2p-2}, + {-0x1.ec6585249082fp0, -0x1.61a76077aedf3p-2, -0x1.61a76077aedf2p-2}, + {0x1.fccf4dd8fbba8p0, -0x1.9e7f8652b4744p-2, -0x1.9e7f8652b4743p-2}, + {-0x1.fccf4dd8fbba8p0, -0x1.9e7f8652b4744p-2, -0x1.9e7f8652b4743p-2}, + {0x1.069c8b46b3791p1, -0x1.d9a3a336edb66p-2, -0x1.d9a3a336edb65p-2}, + {-0x1.069c8b46b3791p1, -0x1.d9a3a336edb66p-2, -0x1.d9a3a336edb65p-2}, + {0x1.0ed16fa0e914ep1, -0x1.096ac02ec42c2p-1, -0x1.096ac02ec42c3p-1}, + {-0x1.0ed16fa0e914ep1, -0x1.096ac02ec42c2p-1, -0x1.096ac02ec42c3p-1}, + {0x1.170653fb1eb0bp1, -0x1.24ec79917163ep-1, -0x1.24ec79917163dp-1}, + {-0x1.170653fb1eb0bp1, -0x1.24ec79917163ep-1, -0x1.24ec79917163dp-1}, + {0x1.1f3b3855544c8p1, -0x1.3f3a0e28bedd1p-1, -0x1.3f3a0e28beddp-1}, + {-0x1.1f3b3855544c8p1, -0x1.3f3a0e28bedd1p-1, -0x1.3f3a0e28beddp-1}, + {0x1.27701caf89e85p1, -0x1.5837d2817cf2fp-1, -0x1.5837d2817cf2ep-1}, + {-0x1.27701caf89e85p1, -0x1.5837d2817cf2fp-1, -0x1.5837d2817cf2ep-1}, + {0x1.2fa50109bf842p1, -0x1.6fcb7c6b8b91ap-1, -0x1.6fcb7c6b8b919p-1}, + {-0x1.2fa50109bf842p1, -0x1.6fcb7c6b8b91ap-1, -0x1.6fcb7c6b8b919p-1}, + {0x1.37d9e563f51ffp1, -0x1.85dc3ea1bbcebp-1, -0x1.85dc3ea1bbceap-1}, + {-0x1.37d9e563f51ffp1, -0x1.85dc3ea1bbcebp-1, -0x1.85dc3ea1bbceap-1}, + {0x1.400ec9be2abbcp1, -0x1.9a52e2e0fbcb6p-1, -0x1.9a52e2e0fbcb5p-1}, + {-0x1.400ec9be2abbcp1, -0x1.9a52e2e0fbcb6p-1, -0x1.9a52e2e0fbcb5p-1}, + {0x1.4843ae1860579p1, -0x1.ad19e2535aa9ap-1, -0x1.ad19e2535aa99p-1}, + {-0x1.4843ae1860579p1, -0x1.ad19e2535aa9ap-1, -0x1.ad19e2535aa99p-1}, + {0x1.5078927295f36p1, -0x1.be1d7c3534c44p-1, -0x1.be1d7c3534c45p-1}, + {-0x1.5078927295f36p1, -0x1.be1d7c3534c44p-1, -0x1.be1d7c3534c45p-1}, + {0x1.58ad76cccb8f3p1, -0x1.cd4bca9cb5c76p-1, -0x1.cd4bca9cb5c75p-1}, + {-0x1.58ad76cccb8f3p1, -0x1.cd4bca9cb5c76p-1, -0x1.cd4bca9cb5c75p-1}, + {0x1.60e25b27012bp1, -0x1.da94d54dd4c0dp-1, -0x1.da94d54dd4c0cp-1}, + {-0x1.60e25b27012bp1, -0x1.da94d54dd4c0dp-1, -0x1.da94d54dd4c0cp-1}, + {0x1.69173f8136c6dp1, -0x1.e5eaa286fbbcbp-1, -0x1.e5eaa286fbbcap-1}, + {-0x1.69173f8136c6dp1, -0x1.e5eaa286fbbcbp-1, -0x1.e5eaa286fbbcap-1}, + {0x1.714c23db6c62ap1, -0x1.ef4145b4aed04p-1, -0x1.ef4145b4aed03p-1}, + {-0x1.714c23db6c62ap1, -0x1.ef4145b4aed04p-1, -0x1.ef4145b4aed03p-1}, + {0x1.79810835a1fe7p1, -0x1.f68eebfcbb5ecp-1, -0x1.f68eebfcbb5ebp-1}, + {-0x1.79810835a1fe7p1, -0x1.f68eebfcbb5ecp-1, -0x1.f68eebfcbb5ebp-1}, + {0x1.81b5ec8fd79a4p1, -0x1.fbcbe693bd8efp-1, -0x1.fbcbe693bd8fp-1}, + {-0x1.81b5ec8fd79a4p1, -0x1.fbcbe693bd8efp-1, -0x1.fbcbe693bd8fp-1}, + {0x1.89ead0ea0d35bp1, -0x1.fef2b2d21cf6cp-1, -0x1.fef2b2d21cf6bp-1}, + {-0x1.89ead0ea0d35bp1, -0x1.fef2b2d21cf6cp-1, -0x1.fef2b2d21cf6bp-1}, + {-0x1.81b5ec8fd799fp2, 0x1.ef4145b4aecffp-1, 0x1.ef4145b4aedp-1}, + {0x1.81b5ec8fd799fp2, 0x1.ef4145b4aecffp-1, 0x1.ef4145b4aedp-1}, + {-0x1.714c23db6c626p2, 0x1.be1d7c3534c4p-1, 0x1.be1d7c3534c3fp-1}, + {0x1.714c23db6c626p2, 0x1.be1d7c3534c4p-1, 0x1.be1d7c3534c3fp-1}, + {-0x1.60e25b27012adp2, 0x1.6fcb7c6b8b919p-1, 0x1.6fcb7c6b8b918p-1}, + {0x1.60e25b27012adp2, 0x1.6fcb7c6b8b919p-1, 0x1.6fcb7c6b8b918p-1}, + {-0x1.5078927295f34p2, 0x1.096ac02ec42c8p-1, 0x1.096ac02ec42c9p-1}, + {0x1.5078927295f34p2, 0x1.096ac02ec42c8p-1, 0x1.096ac02ec42c9p-1}, + {-0x1.400ec9be2abbbp2, 0x1.235b331d8f748p-2, 0x1.235b331d8f749p-2}, + {0x1.400ec9be2abbbp2, 0x1.235b331d8f748p-2, 0x1.235b331d8f749p-2}, + {-0x1.2fa50109bf842p2, 0x1.069107ae9332cp-5, 0x1.069107ae9332dp-5}, + {0x1.2fa50109bf842p2, 0x1.069107ae9332cp-5, 0x1.069107ae9332dp-5}, + {-0x1.1f3b3855544c9p2, -0x1.c7b90e3024569p-3, -0x1.c7b90e302456ap-3}, + {0x1.1f3b3855544c9p2, -0x1.c7b90e3024569p-3, -0x1.c7b90e302456ap-3}, + {-0x1.0ed16fa0e915p2, -0x1.d9a3a336edb63p-2, -0x1.d9a3a336edb62p-2}, + {0x1.0ed16fa0e915p2, -0x1.d9a3a336edb63p-2, -0x1.d9a3a336edb62p-2}, + {-0x1.fccf4dd8fbbaep1, -0x1.5837d2817cf28p-1, -0x1.5837d2817cf27p-1}, + {0x1.fccf4dd8fbbaep1, -0x1.5837d2817cf28p-1, -0x1.5837d2817cf27p-1}, + {-0x1.dbfbbc70254bcp1, -0x1.ad19e2535aa9p-1, -0x1.ad19e2535aa8fp-1}, + {0x1.dbfbbc70254bcp1, -0x1.ad19e2535aa9p-1, -0x1.ad19e2535aa8fp-1}, + {-0x1.bb282b074edcap1, -0x1.e5eaa286fbbc3p-1, -0x1.e5eaa286fbbc2p-1}, + {0x1.bb282b074edcap1, -0x1.e5eaa286fbbc3p-1, -0x1.e5eaa286fbbc2p-1}, + {-0x1.9a54999e786d8p1, -0x1.fef2b2d21cf6bp-1, -0x1.fef2b2d21cf6cp-1}, + {0x1.9a54999e786d8p1, -0x1.fef2b2d21cf6bp-1, -0x1.fef2b2d21cf6cp-1}, + {-0x1.79810835a1fe6p1, -0x1.f68eebfcbb5ebp-1, -0x1.f68eebfcbb5eap-1}, + {0x1.79810835a1fe6p1, -0x1.f68eebfcbb5ebp-1, -0x1.f68eebfcbb5eap-1}, + {-0x1.58ad76cccb8f4p1, -0x1.cd4bca9cb5c77p-1, -0x1.cd4bca9cb5c78p-1}, + {0x1.58ad76cccb8f4p1, -0x1.cd4bca9cb5c77p-1, -0x1.cd4bca9cb5c78p-1}, + {-0x1.37d9e563f5202p1, -0x1.85dc3ea1bbcf3p-1, -0x1.85dc3ea1bbcf2p-1}, + {0x1.37d9e563f5202p1, -0x1.85dc3ea1bbcf3p-1, -0x1.85dc3ea1bbcf2p-1}, + {-0x1.170653fb1eb1p1, -0x1.24ec79917164ep-1, -0x1.24ec79917164fp-1}, + {0x1.170653fb1eb1p1, -0x1.24ec79917164ep-1, -0x1.24ec79917164fp-1}, + {-0x1.ec6585249083cp0, -0x1.61a76077aee24p-2, -0x1.61a76077aee23p-2}, + {0x1.ec6585249083cp0, -0x1.61a76077aee24p-2, -0x1.61a76077aee23p-2}, + {-0x1.aabe6252e3a58p0, -0x1.894f70befbc1p-4, -0x1.894f70befbc11p-4}, + {0x1.aabe6252e3a58p0, -0x1.894f70befbc1p-4, -0x1.894f70befbc11p-4}, + {-0x1.69173f8136c74p0, 0x1.46dc4f4ce8374p-3, 0x1.46dc4f4ce8373p-3}, + {0x1.69173f8136c74p0, 0x1.46dc4f4ce8374p-3, 0x1.46dc4f4ce8373p-3}, + {-0x1.27701caf89e9p0, 0x1.9e7f8652b4729p-2, 0x1.9e7f8652b4728p-2}, + {0x1.27701caf89e9p0, 0x1.9e7f8652b4729p-2, 0x1.9e7f8652b4728p-2}, + {-0x1.cb91f3bbba157p-1, 0x1.3f3a0e28bedcp-1, 0x1.3f3a0e28bedbfp-1}, + {0x1.cb91f3bbba157p-1, 0x1.3f3a0e28bedcp-1, 0x1.3f3a0e28bedbfp-1}, + {-0x1.4843ae186058ep-1, 0x1.9a52e2e0fbca5p-1, 0x1.9a52e2e0fbca4p-1}, + {0x1.4843ae186058ep-1, 0x1.9a52e2e0fbca5p-1, 0x1.9a52e2e0fbca4p-1}, + {-0x1.89ead0ea0d38ap-2, 0x1.da94d54dd4bffp-1, 0x1.da94d54dd4cp-1}, + {0x1.89ead0ea0d38ap-2, 0x1.da94d54dd4bffp-1, 0x1.da94d54dd4cp-1}, + {-0x1.069c8b46b37fp-3, 0x1.fbcbe693bd8eap-1, 0x1.fbcbe693bd8e9p-1}, + {0x1.069c8b46b37fp-3, 0x1.fbcbe693bd8eap-1, 0x1.fbcbe693bd8e9p-1}, + {0x1.069c8b46b3734p-3, 0x1.fbcbe693bd8fp-1, 0x1.fbcbe693bd8efp-1}, + {-0x1.069c8b46b3734p-3, 0x1.fbcbe693bd8fp-1, 0x1.fbcbe693bd8efp-1}, + {0x1.89ead0ea0d32cp-2, 0x1.da94d54dd4c11p-1, 0x1.da94d54dd4c12p-1}, + {-0x1.89ead0ea0d32cp-2, 0x1.da94d54dd4c11p-1, 0x1.da94d54dd4c12p-1}, + {0x1.4843ae186055fp-1, 0x1.9a52e2e0fbcc1p-1, 0x1.9a52e2e0fbccp-1}, + {-0x1.4843ae186055fp-1, 0x1.9a52e2e0fbcc1p-1, 0x1.9a52e2e0fbccp-1}, + {0x1.cb91f3bbba128p-1, 0x1.3f3a0e28bede4p-1, 0x1.3f3a0e28bede5p-1}, + {-0x1.cb91f3bbba128p-1, 0x1.3f3a0e28bede4p-1, 0x1.3f3a0e28bede5p-1}, + {0x1.27701caf89e78p0, 0x1.9e7f8652b478p-2, 0x1.9e7f8652b4781p-2}, + {-0x1.27701caf89e78p0, 0x1.9e7f8652b478p-2, 0x1.9e7f8652b4781p-2}, + {0x1.69173f8136c5cp0, 0x1.46dc4f4ce8431p-3, 0x1.46dc4f4ce8432p-3}, + {-0x1.69173f8136c5cp0, 0x1.46dc4f4ce8431p-3, 0x1.46dc4f4ce8432p-3}, + {0x1.aabe6252e3a4p0, -0x1.894f70befba92p-4, -0x1.894f70befba93p-4}, + {-0x1.aabe6252e3a4p0, -0x1.894f70befba92p-4, -0x1.894f70befba93p-4}, + {0x1.ec65852490824p0, -0x1.61a76077aedcap-2, -0x1.61a76077aedc9p-2}, + {-0x1.ec65852490824p0, -0x1.61a76077aedcap-2, -0x1.61a76077aedc9p-2}, + {0x1.170653fb1eb04p1, -0x1.24ec799171627p-1, -0x1.24ec799171626p-1}, + {-0x1.170653fb1eb04p1, -0x1.24ec799171627p-1, -0x1.24ec799171626p-1}, + {0x1.37d9e563f51f6p1, -0x1.85dc3ea1bbcd3p-1, -0x1.85dc3ea1bbcd4p-1}, + {-0x1.37d9e563f51f6p1, -0x1.85dc3ea1bbcd3p-1, -0x1.85dc3ea1bbcd4p-1}, + {0x1.58ad76cccb8e8p1, -0x1.cd4bca9cb5c63p-1, -0x1.cd4bca9cb5c62p-1}, + {-0x1.58ad76cccb8e8p1, -0x1.cd4bca9cb5c63p-1, -0x1.cd4bca9cb5c62p-1}, + {0x1.79810835a1fdap1, -0x1.f68eebfcbb5e2p-1, -0x1.f68eebfcbb5e1p-1}, + {-0x1.79810835a1fdap1, -0x1.f68eebfcbb5e2p-1, -0x1.f68eebfcbb5e1p-1}, + {0x1.9a54999e786ccp1, -0x1.fef2b2d21cf6ep-1, -0x1.fef2b2d21cf6fp-1}, + {-0x1.9a54999e786ccp1, -0x1.fef2b2d21cf6ep-1, -0x1.fef2b2d21cf6fp-1}, + {0x1.bb282b074edbep1, -0x1.e5eaa286fbbd2p-1, -0x1.e5eaa286fbbd1p-1}, + {-0x1.bb282b074edbep1, -0x1.e5eaa286fbbd2p-1, -0x1.e5eaa286fbbd1p-1}, + {0x1.dbfbbc70254bp1, -0x1.ad19e2535aaaap-1, -0x1.ad19e2535aaabp-1}, + {-0x1.dbfbbc70254bp1, -0x1.ad19e2535aaaap-1, -0x1.ad19e2535aaabp-1}, + {0x1.fccf4dd8fbba2p1, -0x1.5837d2817cf4bp-1, -0x1.5837d2817cf4ap-1}, + {-0x1.fccf4dd8fbba2p1, -0x1.5837d2817cf4bp-1, -0x1.5837d2817cf4ap-1}, + {0x1.0ed16fa0e914ap2, -0x1.d9a3a336edbb8p-2, -0x1.d9a3a336edbb7p-2}, + {-0x1.0ed16fa0e914ap2, -0x1.d9a3a336edbb8p-2, -0x1.d9a3a336edbb7p-2}, + {0x1.1f3b3855544c3p2, -0x1.c7b90e3024625p-3, -0x1.c7b90e3024624p-3}, + {-0x1.1f3b3855544c3p2, -0x1.c7b90e3024625p-3, -0x1.c7b90e3024624p-3}, + {0x1.2fa50109bf83cp2, 0x1.069107ae9302dp-5, 0x1.069107ae9302cp-5}, + {-0x1.2fa50109bf83cp2, 0x1.069107ae9302dp-5, 0x1.069107ae9302cp-5}, + {0x1.400ec9be2abb5p2, 0x1.235b331d8f6ecp-2, 0x1.235b331d8f6edp-2}, + {-0x1.400ec9be2abb5p2, 0x1.235b331d8f6ecp-2, 0x1.235b331d8f6edp-2}, + {0x1.5078927295f2ep2, 0x1.096ac02ec429fp-1, 0x1.096ac02ec42ap-1}, + {-0x1.5078927295f2ep2, 0x1.096ac02ec429fp-1, 0x1.096ac02ec42ap-1}, + {0x1.60e25b27012a7p2, 0x1.6fcb7c6b8b8f7p-1, 0x1.6fcb7c6b8b8f8p-1}, + {-0x1.60e25b27012a7p2, 0x1.6fcb7c6b8b8f7p-1, 0x1.6fcb7c6b8b8f8p-1}, + {0x1.714c23db6c62p2, 0x1.be1d7c3534c28p-1, 0x1.be1d7c3534c29p-1}, + {-0x1.714c23db6c62p2, 0x1.be1d7c3534c28p-1, 0x1.be1d7c3534c29p-1}, + {0x1.81b5ec8fd7999p2, 0x1.ef4145b4aecf3p-1, 0x1.ef4145b4aecf4p-1}, + {-0x1.81b5ec8fd7999p2, 0x1.ef4145b4aecf3p-1, 0x1.ef4145b4aecf4p-1}, + {0x1.effffffffffffp-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {-0x1.effffffffffffp-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {0x1.fp-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {-0x1.fp-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {0x1.f000000000001p-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {-0x1.f000000000001p-5, 0x1.ff0fd2c96adfcp-1, 0x1.ff0fd2c96adfbp-1}, + {0x1.f7fffffffffffp-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {-0x1.f7fffffffffffp-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {0x1.f8p-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {-0x1.f8p-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {0x1.f800000000001p-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {-0x1.f800000000001p-4, 0x1.fc210055467fep-1, 0x1.fc210055467ffp-1}, + {0x1.4bfffffffffffp-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {-0x1.4bfffffffffffp-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {0x1.4cp-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {-0x1.4cp-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {0x1.4c00000000001p-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {-0x1.4c00000000001p-3, 0x1.f94984b2552e2p-1, 0x1.f94984b2552e1p-1}, + {0x1.3333333333332p-2, 0x1.e921dd42f09bbp-1, 0x1.e921dd42f09bap-1}, + {-0x1.3333333333332p-2, 0x1.e921dd42f09bbp-1, 0x1.e921dd42f09bap-1}, + {0x1.3333333333333p-2, 0x1.e921dd42f09bap-1, 0x1.e921dd42f09bbp-1}, + {-0x1.3333333333333p-2, 0x1.e921dd42f09bap-1, 0x1.e921dd42f09bbp-1}, + {0x1.3333333333334p-2, 0x1.e921dd42f09bap-1, 0x1.e921dd42f09bbp-1}, + {-0x1.3333333333334p-2, 0x1.e921dd42f09bap-1, 0x1.e921dd42f09bbp-1}, + {0x1.594317acc4ef8p-1, 0x1.8feedb86bf0efp-1, 0x1.8feedb86bf0fp-1}, + {-0x1.594317acc4ef8p-1, 0x1.8feedb86bf0efp-1, 0x1.8feedb86bf0fp-1}, + {0x1.594317acc4ef9p-1, 0x1.8feedb86bf0efp-1, 0x1.8feedb86bf0eep-1}, + {-0x1.594317acc4ef9p-1, 0x1.8feedb86bf0efp-1, 0x1.8feedb86bf0eep-1}, + {0x1.594317acc4efap-1, 0x1.8feedb86bf0eep-1, 0x1.8feedb86bf0edp-1}, + {-0x1.594317acc4efap-1, 0x1.8feedb86bf0eep-1, 0x1.8feedb86bf0edp-1}, + {0x1.8ffffffffffffp-1, 0x1.6b898fa9efb5ep-1, 0x1.6b898fa9efb5dp-1}, + {-0x1.8ffffffffffffp-1, 0x1.6b898fa9efb5ep-1, 0x1.6b898fa9efb5dp-1}, + {0x1.9p-1, 0x1.6b898fa9efb5dp-1, 0x1.6b898fa9efb5ep-1}, + {-0x1.9p-1, 0x1.6b898fa9efb5dp-1, 0x1.6b898fa9efb5ep-1}, + {0x1.9000000000001p-1, 0x1.6b898fa9efb5cp-1, 0x1.6b898fa9efb5dp-1}, + {-0x1.9000000000001p-1, 0x1.6b898fa9efb5cp-1, 0x1.6b898fa9efb5dp-1}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0p0, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.921fb54442d17p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {-0x1.921fb54442d17p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {0x1.921fb54442d18p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {-0x1.921fb54442d18p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {0x1.921fb54442d19p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {-0x1.921fb54442d19p-5, 0x1.ff621e3796d7ep-1, 0x1.ff621e3796d7dp-1}, + {0x1.921fb54442d17p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {-0x1.921fb54442d17p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {0x1.921fb54442d18p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {-0x1.921fb54442d18p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {0x1.921fb54442d19p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {-0x1.921fb54442d19p-4, 0x1.fd88da3d12526p-1, 0x1.fd88da3d12525p-1}, + {0x1.921fb54442d17p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {-0x1.921fb54442d17p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {0x1.921fb54442d18p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {-0x1.921fb54442d18p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {0x1.921fb54442d19p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {-0x1.921fb54442d19p-3, 0x1.f6297cff75cbp-1, 0x1.f6297cff75cb1p-1}, + {0x1.921fb54442d17p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {-0x1.921fb54442d17p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {0x1.921fb54442d18p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {-0x1.921fb54442d18p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {0x1.921fb54442d19p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {-0x1.921fb54442d19p-2, 0x1.d906bcf328d46p-1, 0x1.d906bcf328d47p-1}, + {0x1.921fb54442d17p-1, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcdp-1}, + {-0x1.921fb54442d17p-1, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcdp-1}, + {0x1.921fb54442d18p-1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bccp-1}, + {-0x1.921fb54442d18p-1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bccp-1}, + {0x1.921fb54442d19p-1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcdp-1}, + {-0x1.921fb54442d19p-1, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcdp-1}, + {0x1.921fb54442d17p0, 0x1.469898cc51702p-52, 0x1.469898cc51701p-52}, + {-0x1.921fb54442d17p0, 0x1.469898cc51702p-52, 0x1.469898cc51701p-52}, + {0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {-0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {0x1.921fb54442d19p0, -0x1.72cece675d1fdp-53, -0x1.72cece675d1fcp-53}, + {-0x1.921fb54442d19p0, -0x1.72cece675d1fdp-53, -0x1.72cece675d1fcp-53}, + {0x1.921fb54442d17p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p2, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p3, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p5, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p6, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d17p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d17p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.921fb54442d19p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.921fb54442d19p7, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d1p1, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bcap-1}, + {-0x1.2d97c7f3321d1p1, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bcap-1}, + {0x1.2d97c7f3321d2p1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcbp-1}, + {-0x1.2d97c7f3321d2p1, -0x1.6a09e667f3bccp-1, -0x1.6a09e667f3bcbp-1}, + {0x1.2d97c7f3321d3p1, -0x1.6a09e667f3bcfp-1, -0x1.6a09e667f3bcep-1}, + {-0x1.2d97c7f3321d3p1, -0x1.6a09e667f3bcfp-1, -0x1.6a09e667f3bcep-1}, + {0x1.f6a7a2955385dp1, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bd1p-1}, + {-0x1.f6a7a2955385dp1, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bd1p-1}, + {0x1.f6a7a2955385ep1, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcdp-1}, + {-0x1.f6a7a2955385ep1, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcdp-1}, + {0x1.f6a7a2955385fp1, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bcap-1}, + {-0x1.f6a7a2955385fp1, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bcap-1}, + {0x1.2d97c7f3321d1p2, -0x1.34f272993d141p-50, -0x1.34f272993d142p-50}, + {-0x1.2d97c7f3321d1p2, -0x1.34f272993d141p-50, -0x1.34f272993d142p-50}, + {0x1.2d97c7f3321d2p2, -0x1.a79394c9e8a0ap-53, -0x1.a79394c9e8a0bp-53}, + {-0x1.2d97c7f3321d2p2, -0x1.a79394c9e8a0ap-53, -0x1.a79394c9e8a0bp-53}, + {0x1.2d97c7f3321d3p2, 0x1.961b1acd85d7dp-51, 0x1.961b1acd85d7ep-51}, + {-0x1.2d97c7f3321d3p2, 0x1.961b1acd85d7dp-51, 0x1.961b1acd85d7ep-51}, + {0x1.5fdbbe9bba774p2, 0x1.6a09e667f3bc6p-1, 0x1.6a09e667f3bc5p-1}, + {-0x1.5fdbbe9bba774p2, 0x1.6a09e667f3bc6p-1, 0x1.6a09e667f3bc5p-1}, + {0x1.5fdbbe9bba775p2, 0x1.6a09e667f3bcbp-1, 0x1.6a09e667f3bccp-1}, + {-0x1.5fdbbe9bba775p2, 0x1.6a09e667f3bcbp-1, 0x1.6a09e667f3bccp-1}, + {0x1.5fdbbe9bba776p2, 0x1.6a09e667f3bd1p-1, 0x1.6a09e667f3bdp-1}, + {-0x1.5fdbbe9bba776p2, 0x1.6a09e667f3bd1p-1, 0x1.6a09e667f3bdp-1}, + {0x1.c463abeccb2bap2, 0x1.6a09e667f3bd4p-1, 0x1.6a09e667f3bd3p-1}, + {-0x1.c463abeccb2bap2, 0x1.6a09e667f3bd4p-1, 0x1.6a09e667f3bd3p-1}, + {0x1.c463abeccb2bbp2, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcfp-1}, + {-0x1.c463abeccb2bbp2, 0x1.6a09e667f3bcep-1, 0x1.6a09e667f3bcfp-1}, + {0x1.c463abeccb2bcp2, 0x1.6a09e667f3bc9p-1, 0x1.6a09e667f3bc8p-1}, + {-0x1.c463abeccb2bcp2, 0x1.6a09e667f3bc9p-1, 0x1.6a09e667f3bc8p-1}, + {0x1.f6a7a2955385dp2, 0x1.583ebeff65cc2p-50, 0x1.583ebeff65cc3p-50}, + {-0x1.f6a7a2955385dp2, 0x1.583ebeff65cc2p-50, 0x1.583ebeff65cc3p-50}, + {0x1.f6a7a2955385ep2, 0x1.60fafbfd97309p-52, 0x1.60fafbfd97308p-52}, + {-0x1.f6a7a2955385ep2, 0x1.60fafbfd97309p-52, 0x1.60fafbfd97308p-52}, + {0x1.f6a7a2955385fp2, -0x1.4f8282013467cp-51, -0x1.4f8282013467bp-51}, + {-0x1.f6a7a2955385fp2, -0x1.4f8282013467cp-51, -0x1.4f8282013467bp-51}, + {0x1.1475cc9eedeffp3, -0x1.6a09e667f3bb9p-1, -0x1.6a09e667f3bbap-1}, + {-0x1.1475cc9eedeffp3, -0x1.6a09e667f3bb9p-1, -0x1.6a09e667f3bbap-1}, + {0x1.1475cc9eedfp3, -0x1.6a09e667f3bc5p-1, -0x1.6a09e667f3bc4p-1}, + {-0x1.1475cc9eedfp3, -0x1.6a09e667f3bc5p-1, -0x1.6a09e667f3bc4p-1}, + {0x1.1475cc9eedf01p3, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bd1p-1}, + {-0x1.1475cc9eedf01p3, -0x1.6a09e667f3bdp-1, -0x1.6a09e667f3bd1p-1}, + {0x1.2d97c7f3321d1p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d1p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d2p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d2p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d3p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d3p3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.46b9c347764a2p3, -0x1.6a09e667f3bep-1, -0x1.6a09e667f3be1p-1}, + {-0x1.46b9c347764a2p3, -0x1.6a09e667f3bep-1, -0x1.6a09e667f3be1p-1}, + {0x1.46b9c347764a3p3, -0x1.6a09e667f3bd5p-1, -0x1.6a09e667f3bd4p-1}, + {-0x1.46b9c347764a3p3, -0x1.6a09e667f3bd5p-1, -0x1.6a09e667f3bd4p-1}, + {0x1.46b9c347764a4p3, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bcap-1}, + {-0x1.46b9c347764a4p3, -0x1.6a09e667f3bc9p-1, -0x1.6a09e667f3bcap-1}, + {0x1.5fdbbe9bba774p3, -0x1.3dc585b2c7422p-49, -0x1.3dc585b2c7421p-49}, + {-0x1.5fdbbe9bba774p3, -0x1.3dc585b2c7422p-49, -0x1.3dc585b2c7421p-49}, + {0x1.5fdbbe9bba775p3, -0x1.ee2c2d963a10cp-52, -0x1.ee2c2d963a10dp-52}, + {-0x1.5fdbbe9bba775p3, -0x1.ee2c2d963a10cp-52, -0x1.ee2c2d963a10dp-52}, + {0x1.5fdbbe9bba776p3, 0x1.8474f49a717bdp-50, 0x1.8474f49a717bcp-50}, + {-0x1.5fdbbe9bba776p3, 0x1.8474f49a717bdp-50, 0x1.8474f49a717bcp-50}, + {0x1.78fdb9effea45p3, 0x1.6a09e667f3bb9p-1, 0x1.6a09e667f3bb8p-1}, + {-0x1.78fdb9effea45p3, 0x1.6a09e667f3bb9p-1, 0x1.6a09e667f3bb8p-1}, + {0x1.78fdb9effea46p3, 0x1.6a09e667f3bc4p-1, 0x1.6a09e667f3bc3p-1}, + {-0x1.78fdb9effea46p3, 0x1.6a09e667f3bc4p-1, 0x1.6a09e667f3bc3p-1}, + {0x1.78fdb9effea47p3, 0x1.6a09e667f3bcfp-1, 0x1.6a09e667f3bdp-1}, + {-0x1.78fdb9effea47p3, 0x1.6a09e667f3bcfp-1, 0x1.6a09e667f3bdp-1}, + {0x1.ab41b09886fe8p3, 0x1.6a09e667f3be1p-1, 0x1.6a09e667f3bep-1}, + {-0x1.ab41b09886fe8p3, 0x1.6a09e667f3be1p-1, 0x1.6a09e667f3bep-1}, + {0x1.ab41b09886fe9p3, 0x1.6a09e667f3bd6p-1, 0x1.6a09e667f3bd5p-1}, + {-0x1.ab41b09886fe9p3, 0x1.6a09e667f3bd6p-1, 0x1.6a09e667f3bd5p-1}, + {0x1.ab41b09886feap3, 0x1.6a09e667f3bcap-1, 0x1.6a09e667f3bcbp-1}, + {-0x1.ab41b09886feap3, 0x1.6a09e667f3bcap-1, 0x1.6a09e667f3bcbp-1}, + {0x1.c463abeccb2bap3, 0x1.4f6babe5db9e2p-49, 0x1.4f6babe5db9e1p-49}, + {-0x1.c463abeccb2bap3, 0x1.4f6babe5db9e2p-49, 0x1.4f6babe5db9e1p-49}, + {0x1.c463abeccb2bbp3, 0x1.3daeaf976e788p-51, 0x1.3daeaf976e787p-51}, + {-0x1.c463abeccb2bbp3, 0x1.3daeaf976e788p-51, 0x1.3daeaf976e787p-51}, + {0x1.c463abeccb2bcp3, -0x1.6128a83448c3cp-50, -0x1.6128a83448c3dp-50}, + {-0x1.c463abeccb2bcp3, -0x1.6128a83448c3cp-50, -0x1.6128a83448c3dp-50}, + {0x1.dd85a7410f58bp3, -0x1.6a09e667f3bb8p-1, -0x1.6a09e667f3bb7p-1}, + {-0x1.dd85a7410f58bp3, -0x1.6a09e667f3bb8p-1, -0x1.6a09e667f3bb7p-1}, + {0x1.dd85a7410f58cp3, -0x1.6a09e667f3bc3p-1, -0x1.6a09e667f3bc4p-1}, + {-0x1.dd85a7410f58cp3, -0x1.6a09e667f3bc3p-1, -0x1.6a09e667f3bc4p-1}, + {0x1.dd85a7410f58dp3, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcfp-1}, + {-0x1.dd85a7410f58dp3, -0x1.6a09e667f3bcep-1, -0x1.6a09e667f3bcfp-1}, + {0x1.f6a7a2955385dp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385dp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.f6a7a2955385ep3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385ep3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.f6a7a2955385fp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.f6a7a2955385fp3, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.07e4cef4cbd96p4, -0x1.6a09e667f3bf8p-1, -0x1.6a09e667f3bf9p-1}, + {-0x1.07e4cef4cbd96p4, -0x1.6a09e667f3bf8p-1, -0x1.6a09e667f3bf9p-1}, + {0x1.07e4cef4cbd97p4, -0x1.6a09e667f3be2p-1, -0x1.6a09e667f3be1p-1}, + {-0x1.07e4cef4cbd97p4, -0x1.6a09e667f3be2p-1, -0x1.6a09e667f3be1p-1}, + {0x1.07e4cef4cbd98p4, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bccp-1}, + {-0x1.07e4cef4cbd98p4, -0x1.6a09e667f3bcbp-1, -0x1.6a09e667f3bccp-1}, + {0x1.1475cc9eedeffp4, -0x1.b088e90c77fd1p-48, -0x1.b088e90c77fd2p-48}, + {-0x1.1475cc9eedeffp4, -0x1.b088e90c77fd1p-48, -0x1.b088e90c77fd2p-48}, + {0x1.1475cc9eedfp4, -0x1.6111d218effa2p-49, -0x1.6111d218effa3p-49}, + {-0x1.1475cc9eedfp4, -0x1.6111d218effa2p-49, -0x1.6111d218effa3p-49}, + {0x1.1475cc9eedf01p4, 0x1.3ddc5bce200bbp-50, 0x1.3ddc5bce200bcp-50}, + {-0x1.1475cc9eedf01p4, 0x1.3ddc5bce200bbp-50, 0x1.3ddc5bce200bcp-50}, + {0x1.2106ca4910068p4, 0x1.6a09e667f3bacp-1, 0x1.6a09e667f3babp-1}, + {-0x1.2106ca4910068p4, 0x1.6a09e667f3bacp-1, 0x1.6a09e667f3babp-1}, + {0x1.2106ca4910069p4, 0x1.6a09e667f3bc3p-1, 0x1.6a09e667f3bc2p-1}, + {-0x1.2106ca4910069p4, 0x1.6a09e667f3bc3p-1, 0x1.6a09e667f3bc2p-1}, + {0x1.2106ca491006ap4, 0x1.6a09e667f3bd9p-1, 0x1.6a09e667f3bdap-1}, + {-0x1.2106ca491006ap4, 0x1.6a09e667f3bd9p-1, 0x1.6a09e667f3bdap-1}, + {0x1.2d97c7f3321d1p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d1p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d2p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d2p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.2d97c7f3321d3p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.2d97c7f3321d3p4, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.3a28c59d54339p4, 0x1.6a09e667f3bf9p-1, 0x1.6a09e667f3bfap-1}, + {-0x1.3a28c59d54339p4, 0x1.6a09e667f3bf9p-1, 0x1.6a09e667f3bfap-1}, + {0x1.3a28c59d5433ap4, 0x1.6a09e667f3be2p-1, 0x1.6a09e667f3be3p-1}, + {-0x1.3a28c59d5433ap4, 0x1.6a09e667f3be2p-1, 0x1.6a09e667f3be3p-1}, + {0x1.3a28c59d5433bp4, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcbp-1}, + {-0x1.3a28c59d5433bp4, 0x1.6a09e667f3bccp-1, 0x1.6a09e667f3bcbp-1}, + {0x1.46b9c347764a2p4, 0x1.b95bfc26022b1p-48, 0x1.b95bfc26022b2p-48}, + {-0x1.46b9c347764a2p4, 0x1.b95bfc26022b1p-48, 0x1.b95bfc26022b2p-48}, + {0x1.46b9c347764a3p4, 0x1.72b7f84c04563p-49, 0x1.72b7f84c04562p-49}, + {-0x1.46b9c347764a3p4, 0x1.72b7f84c04563p-49, 0x1.72b7f84c04562p-49}, + {0x1.46b9c347764a4p4, -0x1.1a900f67f753ap-50, -0x1.1a900f67f753bp-50}, + {-0x1.46b9c347764a4p4, -0x1.1a900f67f753ap-50, -0x1.1a900f67f753bp-50}, + {0x1.534ac0f19860bp4, -0x1.6a09e667f3babp-1, -0x1.6a09e667f3bacp-1}, + {-0x1.534ac0f19860bp4, -0x1.6a09e667f3babp-1, -0x1.6a09e667f3bacp-1}, + {0x1.534ac0f19860cp4, -0x1.6a09e667f3bc2p-1, -0x1.6a09e667f3bc1p-1}, + {-0x1.534ac0f19860cp4, -0x1.6a09e667f3bc2p-1, -0x1.6a09e667f3bc1p-1}, + {0x1.534ac0f19860dp4, -0x1.6a09e667f3bd8p-1, -0x1.6a09e667f3bd9p-1}, + {-0x1.534ac0f19860dp4, -0x1.6a09e667f3bd8p-1, -0x1.6a09e667f3bd9p-1}, + {0x1.5fdbbe9bba774p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba774p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.5fdbbe9bba775p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba775p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.5fdbbe9bba776p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.5fdbbe9bba776p4, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.6c6cbc45dc8dcp4, -0x1.6a09e667f3bfap-1, -0x1.6a09e667f3bf9p-1}, + {-0x1.6c6cbc45dc8dcp4, -0x1.6a09e667f3bfap-1, -0x1.6a09e667f3bf9p-1}, + {0x1.6c6cbc45dc8ddp4, -0x1.6a09e667f3be3p-1, -0x1.6a09e667f3be4p-1}, + {-0x1.6c6cbc45dc8ddp4, -0x1.6a09e667f3be3p-1, -0x1.6a09e667f3be4p-1}, + {0x1.6c6cbc45dc8dep4, -0x1.6a09e667f3bcdp-1, -0x1.6a09e667f3bccp-1}, + {-0x1.6c6cbc45dc8dep4, -0x1.6a09e667f3bcdp-1, -0x1.6a09e667f3bccp-1}, + {0x1.78fdb9effea45p4, -0x1.c22f0f3f8c592p-48, -0x1.c22f0f3f8c591p-48}, + {-0x1.78fdb9effea45p4, -0x1.c22f0f3f8c592p-48, -0x1.c22f0f3f8c591p-48}, + {0x1.78fdb9effea46p4, -0x1.845e1e7f18b23p-49, -0x1.845e1e7f18b24p-49}, + {-0x1.78fdb9effea46p4, -0x1.845e1e7f18b23p-49, -0x1.845e1e7f18b24p-49}, + {0x1.78fdb9effea47p4, 0x1.ee8786039d373p-51, 0x1.ee8786039d374p-51}, + {-0x1.78fdb9effea47p4, 0x1.ee8786039d373p-51, 0x1.ee8786039d374p-51}, + {0x1.858eb79a20baep4, 0x1.6a09e667f3baap-1, 0x1.6a09e667f3babp-1}, + {-0x1.858eb79a20baep4, 0x1.6a09e667f3baap-1, 0x1.6a09e667f3babp-1}, + {0x1.858eb79a20bafp4, 0x1.6a09e667f3bc1p-1, 0x1.6a09e667f3bcp-1}, + {-0x1.858eb79a20bafp4, 0x1.6a09e667f3bc1p-1, 0x1.6a09e667f3bcp-1}, + {0x1.858eb79a20bbp4, 0x1.6a09e667f3bd8p-1, 0x1.6a09e667f3bd7p-1}, + {-0x1.858eb79a20bbp4, 0x1.6a09e667f3bd8p-1, 0x1.6a09e667f3bd7p-1}, + {0x1.fffffffffffffp62, -0x1.2ccaf641d4262p-3, -0x1.2ccaf641d4261p-3}, + {-0x1.fffffffffffffp62, -0x1.2ccaf641d4262p-3, -0x1.2ccaf641d4261p-3}, + {0x1.0p63, 0x1.82aa375b3c33ep-7, 0x1.82aa375b3c33fp-7}, + {-0x1.0p63, 0x1.82aa375b3c33ep-7, 0x1.82aa375b3c33fp-7}, + {0x1.0000000000001p63, 0x1.4c0622a6e35dep-2, 0x1.4c0622a6e35ddp-2}, + {-0x1.0000000000001p63, 0x1.4c0622a6e35dep-2, 0x1.4c0622a6e35ddp-2}, + {0x1.fffffffffffffp26, 0x1.4ab650b8c6073p-1, 0x1.4ab650b8c6074p-1}, + {-0x1.fffffffffffffp26, 0x1.4ab650b8c6073p-1, 0x1.4ab650b8c6074p-1}, + {0x1.0p27, 0x1.4ab6511a7d39bp-1, 0x1.4ab6511a7d39ap-1}, + {-0x1.0p27, 0x1.4ab6511a7d39bp-1, 0x1.4ab6511a7d39ap-1}, + {0x1.0000000000001p27, 0x1.4ab651ddeb9e6p-1, 0x1.4ab651ddeb9e7p-1}, + {-0x1.0000000000001p27, 0x1.4ab651ddeb9e6p-1, 0x1.4ab651ddeb9e7p-1}, + {0x1.fffffffffffffp23, 0x1.40ad67e777b1ep-1, 0x1.40ad67e777b1dp-1}, + {-0x1.fffffffffffffp23, 0x1.40ad67e777b1ep-1, 0x1.40ad67e777b1dp-1}, + {0x1.0p24, 0x1.40ad67f3f0c9ap-1, 0x1.40ad67f3f0c9bp-1}, + {-0x1.0p24, 0x1.40ad67f3f0c9ap-1, 0x1.40ad67f3f0c9bp-1}, + {0x1.0000000000001p24, 0x1.40ad680ce2f92p-1, 0x1.40ad680ce2f93p-1}, + {-0x1.0000000000001p24, 0x1.40ad680ce2f92p-1, 0x1.40ad680ce2f93p-1}, + {0x1.fffffffffffffp1, -0x1.4eaa606db24c4p-1, -0x1.4eaa606db24c3p-1}, + {-0x1.fffffffffffffp1, -0x1.4eaa606db24c4p-1, -0x1.4eaa606db24c3p-1}, + {0x1.0p2, -0x1.4eaa606db24c1p-1, -0x1.4eaa606db24cp-1}, + {-0x1.0p2, -0x1.4eaa606db24c1p-1, -0x1.4eaa606db24cp-1}, + {0x1.0000000000001p2, -0x1.4eaa606db24bbp-1, -0x1.4eaa606db24bap-1}, + {-0x1.0000000000001p2, -0x1.4eaa606db24bbp-1, -0x1.4eaa606db24bap-1}, + {0x1.fffffffffffffp0, -0x1.aa22657537201p-2, -0x1.aa22657537202p-2}, + {-0x1.fffffffffffffp0, -0x1.aa22657537201p-2, -0x1.aa22657537202p-2}, + {0x1.0p1, -0x1.aa22657537205p-2, -0x1.aa22657537204p-2}, + {-0x1.0p1, -0x1.aa22657537205p-2, -0x1.aa22657537204p-2}, + {0x1.0000000000001p1, -0x1.aa2265753720cp-2, -0x1.aa2265753720bp-2}, + {-0x1.0000000000001p1, -0x1.aa2265753720cp-2, -0x1.aa2265753720bp-2}, + {0x1.fffffffffffffp-1, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068dp-1}, + {-0x1.fffffffffffffp-1, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068dp-1}, + {0x1.0p0, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068bp-1}, + {-0x1.0p0, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068bp-1}, + {0x1.0000000000001p0, 0x1.14a280fb5068ap-1, 0x1.14a280fb50689p-1}, + {-0x1.0000000000001p0, 0x1.14a280fb5068ap-1, 0x1.14a280fb50689p-1}, + {0x1.fffffffffffffp-2, 0x1.c1528065b7d5p-1, 0x1.c1528065b7d4fp-1}, + {-0x1.fffffffffffffp-2, 0x1.c1528065b7d5p-1, 0x1.c1528065b7d4fp-1}, + {0x1.0p-1, 0x1.c1528065b7d5p-1, 0x1.c1528065b7d4fp-1}, + {-0x1.0p-1, 0x1.c1528065b7d5p-1, 0x1.c1528065b7d4fp-1}, + {0x1.0000000000001p-1, 0x1.c1528065b7d4fp-1, 0x1.c1528065b7d5p-1}, + {-0x1.0000000000001p-1, 0x1.c1528065b7d4fp-1, 0x1.c1528065b7d5p-1}, + {0x1.fffffffffffffp-3, 0x1.f01549f7deea2p-1, 0x1.f01549f7deea1p-1}, + {-0x1.fffffffffffffp-3, 0x1.f01549f7deea2p-1, 0x1.f01549f7deea1p-1}, + {0x1.0p-2, 0x1.f01549f7deea1p-1, 0x1.f01549f7deea2p-1}, + {-0x1.0p-2, 0x1.f01549f7deea1p-1, 0x1.f01549f7deea2p-1}, + {0x1.0000000000001p-2, 0x1.f01549f7deea1p-1, 0x1.f01549f7deea2p-1}, + {-0x1.0000000000001p-2, 0x1.f01549f7deea1p-1, 0x1.f01549f7deea2p-1}, + {0x1.fffffffffffffp-4, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {-0x1.fffffffffffffp-4, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {0x1.0p-3, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {-0x1.0p-3, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {0x1.0000000000001p-3, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {-0x1.0000000000001p-3, 0x1.fc015527d5bd3p-1, 0x1.fc015527d5bd4p-1}, + {0x1.fffffffffffffp-5, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {-0x1.fffffffffffffp-5, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {0x1.0p-4, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {-0x1.0p-4, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {0x1.0000000000001p-4, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {-0x1.0000000000001p-4, 0x1.ff0015549f4d3p-1, 0x1.ff0015549f4d4p-1}, + {0x1.fffffffffffffp-6, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {-0x1.fffffffffffffp-6, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {0x1.0p-5, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {-0x1.0p-5, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {0x1.0000000000001p-5, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {-0x1.0000000000001p-5, 0x1.ffc00155527d3p-1, 0x1.ffc00155527d2p-1}, + {0x1.fffffffffffffp-7, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {-0x1.fffffffffffffp-7, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {0x1.0p-6, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {-0x1.0p-6, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {0x1.0000000000001p-6, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {-0x1.0000000000001p-6, 0x1.fff000155549fp-1, 0x1.fff00015554ap-1}, + {0x1.fffffffffffffp-15, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {-0x1.fffffffffffffp-15, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {0x1.0p-14, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {-0x1.0p-14, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {0x1.0000000000001p-14, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {-0x1.0000000000001p-14, 0x1.fffffffp-1, 0x1.fffffff000001p-1}, + {0x1.fffffffffffffp-28, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.fffffffffffffp-28, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.0p-27, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.0p-27, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.0000000000001p-27, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.0000000000001p-27, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.fffffffffffffp-31, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.fffffffffffffp-31, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.0p-30, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.0p-30, 0x1.0p0, 0x1.fffffffffffffp-1}, + {0x1.0000000000001p-30, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.0000000000001p-30, 0x1.0p0, 0x1.fffffffffffffp-1}, + {-0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {-0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {-0x1.fffffffffffffp1023, -0x1.fffe62ecfab75p-1, -0x1.fffe62ecfab76p-1}, + {0x1.ffffffffffffep1023, 0x1.7ffdfb4c5309p-2, 0x1.7ffdfb4c5308fp-2}, + {-0x1.ffffffffffffep1023, 0x1.7ffdfb4c5309p-2, 0x1.7ffdfb4c5308fp-2}, + {0x1.921fb54442d18p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {-0x1.921fb54442d18p1, -0x1.0p0, -0x1.fffffffffffffp-1}, + {0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {-0x1.921fb54442d18p0, 0x1.1a62633145c07p-54, 0x1.1a62633145c06p-54}, + {0x1.0000000000001p0, 0x1.14a280fb5068ap-1, 0x1.14a280fb50689p-1}, + {-0x1.0000000000001p0, 0x1.14a280fb5068ap-1, 0x1.14a280fb50689p-1}, + {0x1.0p0, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068bp-1}, + {-0x1.0p0, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068bp-1}, + {0x1.fffffffffffffp-1, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068dp-1}, + {-0x1.fffffffffffffp-1, 0x1.14a280fb5068cp-1, 0x1.14a280fb5068dp-1}, + {0x1.921fb54442d18p-1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bccp-1}, + {-0x1.921fb54442d18p-1, 0x1.6a09e667f3bcdp-1, 0x1.6a09e667f3bccp-1}, + {0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {-0x1.0p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.fffffffffffffp-1022, 0x1.0p0, 0x1.0p0}, + {0x0.ffffffffffffep-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.ffffffffffffep-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000002p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0000000000002p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {-0x0.0000000000001p-1022, 0x1.0p0, 0x1.0p0}, + {0x0.0p0, 0x1.0p0, 0x1.0p0}, + {-0x0.0p0, 0x1.0p0, 0x1.0p0} + }; + + for(double[] testCase: testCases) { + failures += testCosCase(testCase[0], testCase[1], testCase[2]); + } + + return failures; + } + + private static int testCosCase(double input, double bound1, double bound2) { + int failures = 0; + failures += Tests.testBounds("Math.cos", input, Math.cos(input), bound1, bound2); + return failures; + } +} From 13e2eedb5f77ac0e1933deb0b92ada89d6d25533 Mon Sep 17 00:00:00 2001 From: Konstantin Shefov Date: Tue, 12 Jan 2016 17:03:06 +0300 Subject: [PATCH 16/17] 8141615: Add new public methods to sun.reflect.ConstantPool Reviewed-by: twisti, iignatyev, coleenp --- jdk/make/mapfiles/libjava/mapfile-vers | 4 + .../classes/sun/reflect/ConstantPool.java | 53 +++++- jdk/src/java.base/share/native/include/jvm.h | 14 +- .../share/native/libjava/ConstantPool.c | 27 ++- .../constantPool/ConstantPoolTest.java | 170 ++++++++++++++++++ .../constantPool/ConstantPoolTestDummy.jasm | 98 ++++++++++ 6 files changed, 363 insertions(+), 3 deletions(-) create mode 100644 jdk/test/sun/reflect/constantPool/ConstantPoolTest.java create mode 100644 jdk/test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers index dd7e58a6b2e..43f1a5d2885 100644 --- a/jdk/make/mapfiles/libjava/mapfile-vers +++ b/jdk/make/mapfiles/libjava/mapfile-vers @@ -251,6 +251,7 @@ SUNWprivate_1.1 { Java_sun_misc_Signal_raise0; Java_sun_reflect_ConstantPool_getClassAt0; Java_sun_reflect_ConstantPool_getClassAtIfLoaded0; + Java_sun_reflect_ConstantPool_getClassRefIndexAt0; Java_sun_reflect_ConstantPool_getDoubleAt0; Java_sun_reflect_ConstantPool_getFieldAt0; Java_sun_reflect_ConstantPool_getFieldAtIfLoaded0; @@ -260,8 +261,11 @@ SUNWprivate_1.1 { Java_sun_reflect_ConstantPool_getMemberRefInfoAt0; Java_sun_reflect_ConstantPool_getMethodAt0; Java_sun_reflect_ConstantPool_getMethodAtIfLoaded0; + Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0; + Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0; Java_sun_reflect_ConstantPool_getSize0; Java_sun_reflect_ConstantPool_getStringAt0; + Java_sun_reflect_ConstantPool_getTagAt0; Java_sun_reflect_ConstantPool_getUTF8At0; Java_java_io_Console_istty; Java_java_io_Console_encoding; diff --git a/jdk/src/java.base/share/classes/sun/reflect/ConstantPool.java b/jdk/src/java.base/share/classes/sun/reflect/ConstantPool.java index 03a5c189f7c..b813519bf2c 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/ConstantPool.java +++ b/jdk/src/java.base/share/classes/sun/reflect/ConstantPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,10 @@ public class ConstantPool { public int getSize() { return getSize0 (constantPoolOop); } public Class getClassAt (int index) { return getClassAt0 (constantPoolOop, index); } public Class getClassAtIfLoaded (int index) { return getClassAtIfLoaded0 (constantPoolOop, index); } + // Returns a class reference index for a method or a field. + public int getClassRefIndexAt(int index) { + return getClassRefIndexAt0(constantPoolOop, index); + } // Returns either a Method or Constructor. // Static initializers are returned as Method objects. public Member getMethodAt (int index) { return getMethodAt0 (constantPoolOop, index); } @@ -45,13 +49,56 @@ public class ConstantPool { // Fetches the class name, member (field, method or interface // method) name, and type descriptor as an array of three Strings public String[] getMemberRefInfoAt (int index) { return getMemberRefInfoAt0 (constantPoolOop, index); } + // Returns a name and type reference index for a method, a field or an invokedynamic. + public int getNameAndTypeRefIndexAt(int index) { + return getNameAndTypeRefIndexAt0(constantPoolOop, index); + } + // Fetches the name and type from name_and_type index as an array of two Strings + public String[] getNameAndTypeRefInfoAt(int index) { + return getNameAndTypeRefInfoAt0(constantPoolOop, index); + } public int getIntAt (int index) { return getIntAt0 (constantPoolOop, index); } public long getLongAt (int index) { return getLongAt0 (constantPoolOop, index); } public float getFloatAt (int index) { return getFloatAt0 (constantPoolOop, index); } public double getDoubleAt (int index) { return getDoubleAt0 (constantPoolOop, index); } public String getStringAt (int index) { return getStringAt0 (constantPoolOop, index); } public String getUTF8At (int index) { return getUTF8At0 (constantPoolOop, index); } + public Tag getTagAt(int index) { + return Tag.valueOf(getTagAt0(constantPoolOop, index)); + } + public static enum Tag { + UTF8(1), + INTEGER(3), + FLOAT(4), + LONG(5), + DOUBLE(6), + CLASS(7), + STRING(8), + FIELDREF(9), + METHODREF(10), + INTERFACEMETHODREF(11), + NAMEANDTYPE(12), + METHODHANDLE(15), + METHODTYPE(16), + INVOKEDYNAMIC(18), + INVALID(0); + + private final int tagCode; + + private Tag(int tagCode) { + this.tagCode = tagCode; + } + + private static Tag valueOf(byte v) { + for (Tag tag : Tag.values()) { + if (tag.tagCode == v) { + return tag; + } + } + throw new IllegalArgumentException("Unknown constant pool tag code " + v); + } + } //--------------------------------------------------------------------------- // Internals only below this point // @@ -66,15 +113,19 @@ public class ConstantPool { private native int getSize0 (Object constantPoolOop); private native Class getClassAt0 (Object constantPoolOop, int index); private native Class getClassAtIfLoaded0 (Object constantPoolOop, int index); + private native int getClassRefIndexAt0 (Object constantPoolOop, int index); private native Member getMethodAt0 (Object constantPoolOop, int index); private native Member getMethodAtIfLoaded0(Object constantPoolOop, int index); private native Field getFieldAt0 (Object constantPoolOop, int index); private native Field getFieldAtIfLoaded0 (Object constantPoolOop, int index); private native String[] getMemberRefInfoAt0 (Object constantPoolOop, int index); + private native int getNameAndTypeRefIndexAt0(Object constantPoolOop, int index); + private native String[] getNameAndTypeRefInfoAt0(Object constantPoolOop, int index); private native int getIntAt0 (Object constantPoolOop, int index); private native long getLongAt0 (Object constantPoolOop, int index); private native float getFloatAt0 (Object constantPoolOop, int index); private native double getDoubleAt0 (Object constantPoolOop, int index); private native String getStringAt0 (Object constantPoolOop, int index); private native String getUTF8At0 (Object constantPoolOop, int index); + private native byte getTagAt0 (Object constantPoolOop, int index); } diff --git a/jdk/src/java.base/share/native/include/jvm.h b/jdk/src/java.base/share/native/include/jvm.h index 2f65c1a2e97..99f7c7f8be4 100644 --- a/jdk/src/java.base/share/native/include/jvm.h +++ b/jdk/src/java.base/share/native/include/jvm.h @@ -63,7 +63,7 @@ extern "C" { * class. */ -#define JVM_INTERFACE_VERSION 4 +#define JVM_INTERFACE_VERSION 5 JNIEXPORT jint JNICALL JVM_GetInterfaceVersion(void); @@ -502,6 +502,9 @@ JNIEXPORT jclass JNICALL JVM_ConstantPoolGetClassAt JNIEXPORT jclass JNICALL JVM_ConstantPoolGetClassAtIfLoaded (JNIEnv *env, jobject unused, jobject jcpool, jint index); +JNIEXPORT jint JNICALL JVM_ConstantPoolGetClassRefIndexAt +(JNIEnv *env, jobject obj, jobject unused, jint index); + JNIEXPORT jobject JNICALL JVM_ConstantPoolGetMethodAt (JNIEnv *env, jobject unused, jobject jcpool, jint index); @@ -517,6 +520,12 @@ JNIEXPORT jobject JNICALL JVM_ConstantPoolGetFieldAtIfLoaded JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetMemberRefInfoAt (JNIEnv *env, jobject unused, jobject jcpool, jint index); +JNIEXPORT jint JNICALL JVM_ConstantPoolGetNameAndTypeRefIndexAt +(JNIEnv *env, jobject obj, jobject unused, jint index); + +JNIEXPORT jobjectArray JNICALL JVM_ConstantPoolGetNameAndTypeRefInfoAt +(JNIEnv *env, jobject obj, jobject unused, jint index); + JNIEXPORT jint JNICALL JVM_ConstantPoolGetIntAt (JNIEnv *env, jobject unused, jobject jcpool, jint index); @@ -535,6 +544,9 @@ JNIEXPORT jstring JNICALL JVM_ConstantPoolGetStringAt JNIEXPORT jstring JNICALL JVM_ConstantPoolGetUTF8At (JNIEnv *env, jobject unused, jobject jcpool, jint index); +JNIEXPORT jbyte JNICALL JVM_ConstantPoolGetTagAt +(JNIEnv *env, jobject unused, jobject jcpool, jint index); + /* * Parameter reflection */ diff --git a/jdk/src/java.base/share/native/libjava/ConstantPool.c b/jdk/src/java.base/share/native/libjava/ConstantPool.c index 1a29f003ba4..f7f744144e3 100644 --- a/jdk/src/java.base/share/native/libjava/ConstantPool.c +++ b/jdk/src/java.base/share/native/libjava/ConstantPool.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,12 @@ JNIEXPORT jclass JNICALL Java_sun_reflect_ConstantPool_getClassAtIfLoaded0 return JVM_ConstantPoolGetClassAtIfLoaded(env, unused, jcpool, index); } +JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getClassRefIndexAt0 +(JNIEnv *env, jobject unused, jobject jcpool, jint index) +{ + return JVM_ConstantPoolGetClassRefIndexAt(env, unused, jcpool, index); +} + JNIEXPORT jobject JNICALL Java_sun_reflect_ConstantPool_getMethodAt0 (JNIEnv *env, jobject unused, jobject jcpool, jint index) { @@ -74,6 +80,18 @@ JNIEXPORT jobjectArray JNICALL Java_sun_reflect_ConstantPool_getMemberRefInfoAt0 return JVM_ConstantPoolGetMemberRefInfoAt(env, unused, jcpool, index); } +JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0 +(JNIEnv *env, jobject unused, jobject jcpool, jint index) +{ + return JVM_ConstantPoolGetNameAndTypeRefIndexAt(env, unused, jcpool, index); +} + +JNIEXPORT jobjectArray JNICALL Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0 +(JNIEnv *env, jobject unused, jobject jcpool, jint index) +{ + return JVM_ConstantPoolGetNameAndTypeRefInfoAt(env, unused, jcpool, index); +} + JNIEXPORT jint JNICALL Java_sun_reflect_ConstantPool_getIntAt0 (JNIEnv *env, jobject unused, jobject jcpool, jint index) { @@ -109,3 +127,10 @@ JNIEXPORT jstring JNICALL Java_sun_reflect_ConstantPool_getUTF8At0 { return JVM_ConstantPoolGetUTF8At(env, unused, jcpool, index); } + +JNIEXPORT jbyte JNICALL Java_sun_reflect_ConstantPool_getTagAt0 +(JNIEnv *env, jobject unused, jobject jcpool, jint index) +{ + return JVM_ConstantPoolGetTagAt(env, unused, jcpool, index); +} + diff --git a/jdk/test/sun/reflect/constantPool/ConstantPoolTest.java b/jdk/test/sun/reflect/constantPool/ConstantPoolTest.java new file mode 100644 index 00000000000..3ede807577d --- /dev/null +++ b/jdk/test/sun/reflect/constantPool/ConstantPoolTest.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8141615 + * @summary Tests new public methods at sun.reflect.ConstantPool + * @modules java.base/sun.reflect + * @library /lib/testlibrary + * @compile ConstantPoolTestDummy.jasm + * @run main sun.reflect.constantPool.ConstantPoolTest + */ + +package sun.reflect.constantPool; + +import java.util.HashMap; +import java.util.Map; +import jdk.internal.misc.SharedSecrets; +import jdk.testlibrary.Asserts; +import sun.reflect.ConstantPool; + +public class ConstantPoolTest { + + private static final Class TEST_CLASS = ConstantPoolTestDummy.class; + private static final ConstantPool CP = SharedSecrets.getJavaLangAccess() + .getConstantPool(TEST_CLASS); + + public static void main(String[] s) { + for (TestCase testCase : TestCase.values()) { + testCase.test(); + } + } + + public static enum TestCase { + GET_TAG_AT { + { + referenceMap.put(1, ConstantPool.Tag.METHODREF); + referenceMap.put(2, ConstantPool.Tag.CLASS); + referenceMap.put(4, ConstantPool.Tag.UTF8); + referenceMap.put(10, ConstantPool.Tag.NAMEANDTYPE); + referenceMap.put(13, ConstantPool.Tag.LONG); + referenceMap.put(15, ConstantPool.Tag.INTEGER); + referenceMap.put(16, ConstantPool.Tag.INTERFACEMETHODREF); + referenceMap.put(21, ConstantPool.Tag.DOUBLE); + referenceMap.put(23, ConstantPool.Tag.STRING); + referenceMap.put(25, ConstantPool.Tag.INVOKEDYNAMIC); + referenceMap.put(29, ConstantPool.Tag.METHODHANDLE); + referenceMap.put(30, ConstantPool.Tag.METHODTYPE); + referenceMap.put(48, ConstantPool.Tag.FIELDREF); + referenceMap.put(52, ConstantPool.Tag.FLOAT); + } + @Override + void testIndex(int cpi, Object reference) { + ConstantPool.Tag tagToVerify = CP.getTagAt(cpi); + ConstantPool.Tag tagToRefer = (ConstantPool.Tag) reference; + String msg = String.format("Method getTagAt works not as expected" + + "at CP entry #%d: got CP tag %s, but should be %s", + cpi, tagToVerify.name(), tagToRefer.name()); + Asserts.assertEquals(tagToVerify, tagToRefer, msg); + } + }, + GET_CLASS_REF_INDEX_AT { + { + referenceMap.put(1, 3); + referenceMap.put(16, 17); + referenceMap.put(32, 35); + referenceMap.put(34, 3); + referenceMap.put(48, 2); + } + @Override + void testIndex(int cpi, Object reference) { + int indexToVerify = CP.getClassRefIndexAt(cpi); + int indexToRefer = (int) reference; + String msg = String.format("Method getClassRefIndexAt works not" + + " as expected at CP entry #%d:" + + " got index %d, but should be %d", + cpi, indexToVerify, indexToRefer); + Asserts.assertEquals(indexToVerify, indexToRefer, msg); + } + }, + GET_NAME_AND_TYPE_REF_INDEX_AT { + { + referenceMap.put(1, 10); + referenceMap.put(16, 18); + referenceMap.put(25, 26); + referenceMap.put(32, 36); + referenceMap.put(34, 37); + referenceMap.put(48, 49); + } + @Override + void testIndex(int cpi, Object reference) { + int indexToRefer = (int) reference; + int indexToVerify = CP.getNameAndTypeRefIndexAt(cpi); + String msg = String.format("Method getNameAndTypeRefIndexAt works" + + " not as expected at CP entry #%d:" + + " got index %d, but should be %d", + cpi, indexToVerify, indexToRefer); + Asserts.assertEquals(indexToVerify, indexToRefer, msg); + } + }, + GET_NAME_AND_TYPE_REF_INFO_AT { + { + referenceMap.put(10, new String[]{"", "()V"}); + referenceMap.put(18, new String[]{"run", "()V"}); + referenceMap.put(26, new String[]{"accept", "()Ljava/util/function/Consumer;"}); + referenceMap.put(36, new String[]{"metafactory", + "(Ljava/lang/invoke/MethodHandles$Lookup;" + + "Ljava/lang/String;Ljava/lang/invoke/MethodType;" + + "Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;" + + "Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"}); + referenceMap.put(37, new String[]{"toString", "()Ljava/lang/String;"}); + referenceMap.put(49, new String[]{"myField", "I"}); + } + @Override + void testIndex(int cpi, Object reference) { + String[] natInfo = CP.getNameAndTypeRefInfoAt(cpi); + String msg = String.format("Method getNameAndTypeRefInfoAt" + + " works not as expected at CP entry #%d:" + + " returned value should not be null", cpi); + Asserts.assertNotNull(natInfo, msg); + String[] castedReference = (String[]) reference; + int natInfoLength = natInfo.length; + msg = String.format("Method getNameAndTypeRefInfoAt" + + " works not as expected at CP entry #%d:" + + " length of the returned string array is %d, but should be 2", + cpi, natInfoLength); + Asserts.assertEquals(natInfoLength, 2, msg); + String[] nameOrType = new String[]{"name", "type"}; + for (int i = 0; i < 2; i++) { + String infoToVerify = natInfo[i]; + String infoToRefer = castedReference[i]; + msg = String.format("Method getNameAndTypeRefInfoAt" + + " works not as expected at CP entry #%d:" + + " got %s info %s, but should be %s", + cpi, nameOrType[i], infoToVerify, infoToRefer); + Asserts.assertEquals(infoToVerify, infoToRefer, msg); + } + } + }; + + protected final Map referenceMap; + TestCase() { + this.referenceMap = new HashMap<>(); + } + abstract void testIndex(int cpi, Object reference); + public void test() { + referenceMap.forEach(this::testIndex); + } + } +} diff --git a/jdk/test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm b/jdk/test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm new file mode 100644 index 00000000000..cb3daaff8c9 --- /dev/null +++ b/jdk/test/sun/reflect/constantPool/ConstantPoolTestDummy.jasm @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun/reflect/constantPool; + +super public #2; //class ConstantPoolTestDummy + version 52:0 +{ + +// Actually, only first 13 constant pool entries are actually used by the class +// and its methods. All the rest are added just for the testing of getTagAt method +// and getNameAndTypeRefIndexAt method. + +const #1 = Method #3.#10; // java/lang/Object."":"()V" +const #2 = class #11; // ConstantPoolTestDummy +const #3 = class #12; // java/lang/Object +const #4 = Asciz ""; +const #5 = Asciz "()V"; +const #6 = Asciz "Code"; +const #7 = Asciz "LineNumberTable"; +const #8 = Asciz "SourceFile"; +const #9 = Asciz "ConstantPoolTestDummy.java"; +const #10 = NameAndType #4:#5; // "":"()V" +const #11 = Asciz "sun/reflect/constantPool/ConstantPoolTestDummy"; +const #12 = Asciz "java/lang/Object"; +const #13 = long 6l; +const #15 = int 1; +const #16 = InterfaceMethod #17.#18; // java/lang/Runnable.run:"()V" +const #17 = class #19; // java/lang/Runnable +const #18 = NameAndType #20:#5; // run:"()V" +const #19 = Asciz "java/lang/Runnable"; +const #20 = Asciz "run"; +const #21 = double 1.45d; +const #23 = String #24; // "Hello" +const #24 = Asciz "Hello"; +const #25 = InvokeDynamic 0:#26; // REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;":accept:"()Ljava/util/function/Consumer;" MethodType "(Ljava/lang/Object;)V", MethodHandle REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;", MethodType "(Ljava/lang/Object;)V" +const #26 = NameAndType #27:#28; // accept:"()Ljava/util/function/Consumer;" +const #27 = Asciz "accept"; +const #28 = Asciz "()Ljava/util/function/Consumer;"; +const #29 = MethodHandle 6:#32; // REF_invokeStatic:java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" +const #30 = MethodType #33; // "(Ljava/lang/Object;)V" +const #31 = MethodHandle 5:#34; // REF_invokeVirtual:java/lang/Object.toString:"()Ljava/lang/String;" +const #32 = Method #35.#36; // java/lang/invoke/LambdaMetafactory.metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" +const #33 = Asciz "(Ljava/lang/Object;)V"; +const #34 = Method #3.#37; // java/lang/Object.toString:"()Ljava/lang/String;" +const #35 = class #38; // java/lang/invoke/LambdaMetafactory +const #36 = NameAndType #39:#40; // metafactory:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;" +const #37 = NameAndType #41:#42; // toString:"()Ljava/lang/String;" +const #38 = Asciz "java/lang/invoke/LambdaMetafactory"; +const #39 = Asciz "metafactory"; +const #40 = Asciz "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; +const #41 = Asciz "toString"; +const #42 = Asciz "()Ljava/lang/String;"; +const #43 = class #46; // java/lang/invoke/MethodHandles$Lookup +const #44 = Asciz "Lookup"; +const #45 = class #47; // java/lang/invoke/MethodHandles +const #46 = Asciz "java/lang/invoke/MethodHandles$Lookup"; +const #47 = Asciz "java/lang/invoke/MethodHandles"; +const #48 = Field #2.#49; // sun/reflect/constantPool/ConstantPoolTestDummy.myField:"I" +const #49 = NameAndType #50:#51; // myField:"I" +const #50 = Asciz "myField"; +const #51 = Asciz "I"; +const #52 = float 1.34f; + +public Method #4:#5 // "":"()V" + + stack 1 locals 1 +{ +3 0: aload_0; + 1: invokespecial #1; // Method java/lang/Object."":"()V"; + 4: return; +} + +public static final InnerClass #44= #43 of #45; //Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles + +BootstrapMethod #29 #30 #31 #30; + +} // end Class ConstantPoolTestDummy From 8d61cebf7a1c9a8b7ff14102962c289d1b59566a Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 28 Jan 2016 09:43:08 -0800 Subject: [PATCH 17/17] Added tag jdk-9+103 for changeset 67dcc46f8241 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index 9f1d47685fb..a0ad6c5e122 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -345,3 +345,4 @@ e1a789be1535741274c9779f4d4ca3495196b5c3 jdk-9+99 3d452840f48299a36842760d17c0c8402f0e1266 jdk-9+100 5e8370fb3ed925335164afe340d1e54beab2d4d5 jdk-9+101 6eb3c8132e489dab81adde4ce29844904ce15482 jdk-9+102 +eee1ced1d8e78293f2a004af818ca474387dbebf jdk-9+103