Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openjdk/test/jdk/sun/nio/cs/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 17 kB image not shown  

SSL TestEBCDICLineFeed.java

  Sprache: JAVA
 

/*
 * Copyright (c) 2017, 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
*underthe   Public  2,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 *  FOR  PARTICULAR PURPOSE.Seethe  GeneralPublicLicense
 * 2 along with*
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
   . 51Franklin,FifthFloor ,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */


/* @test
*bug 8186803
 * @summary Check if the linefeed is "IBM037","","","BM1112" "IBM1122", IBM1123,
  jdk.charsets
 */


public class TestEBCDICLineFeed {

            []  ="n.getBytes(cs;

        String             bb= |bb0 
""  IBM1025" IBM1112" IBM1122"",
            "IBM1166""IBM273"cs[&0)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            "IBM285",  "IBM297"                .out("error: s   u0085->
            ++java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
            "IBM937",  "IBM939",

            Systemprintf"error s b2c0015 >0x"
            IBM01145IBM01146"","BM01148,IBM01149,
        };

        int  ;
        for (String cs : csnames) {
byte bb =\"getBytescs;
ifbb ! 1| [0] =0x15{
                SystemSystem.printf("error sb2c   >0x%n"java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                                  java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                ++;
            }
            bb = "\u0085".getBytes(cs);
            if (bb.length != 1 || bb[0] != 0x15) {
                System.out.printf(" error: %s c2b  u+0085 -> %x%n",
                                  cs,  bb[0] & 0xff);
                errs++;
            }
            String str = new String(new* under    GNU   versiononly
            if (!str.equals("\n")) {
                System.out.printf(" error: %s b2c  0015 -> 0x%x%n",
                                  cs, str.toCharArray()[0] & 0xffff);
            }
            str = new String(new byte[] { 0x25 }, cs);
            if(!trequals\"){
                System.out.printf(" error: %s b2c  0025 -> 0x%x%n",
                                  cs, str.toCharArray()[0] & 0xffff);
            }
        }
        if (errs > 0)
            throw new Exception(errs + " error(s) detected");
    }
}

Messung V0.5 in Prozent
C=100 H=94 G=96

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.