Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/icu/source/test/testdata/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 8 kB image not shown  

Quelle  icuio.txt   Sprache: Text

 
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
//*****************************************************************************
//
//  Copyright (C) 2004-2006, International Business Machines
//  Corporation and others.  All Rights Reserved.
//
//  file name:  icuio.txt
//  encoding:   US-ASCII
//  tab size:   4 (not used)
//  indentation:4
//
//  created on: 2004Apr06
//  created by: George Rhoten
//
//  ICU resource bundle source file with test data for data-driven ICU I/O tests.
//
//*****************************************************************************

icuio:table(nofallback) {
    Info {
        Description { "Test data for ICU I/O" }
        LongDescription {
            "Test data for data-driven conversion tests in icu/source/test/iotest/iotest.cpp\n"
            "Run iotest printf\n"

            "argumentType:\n"
            "\td: double\n"
            "\tf: float\n"
            "\t1: int8_t (hexadecimal)\n"
            "\t2: int16_t (hexadecimal)\n"
            "\t4: int32_t (hexadecimal)\n"
            "\t8: int64_t (hexadecimal)\n"
            "\ts: char * string\n"
            "\tS: UChar * string\n"
        }
    }
    TestData {
        printf {
            Headers { "format", "result", "argumentType", "argument" }
            Cases {
                { "%5.3S", "  abc", "S", "abcde" }
                { "%-5.3S", "abc  ", "S", "abcde" }
                { "%5.3S", "  abc", "S", "abcdef" }
                { "%-5.3S", "abc  ", "S", "abcdef" }
                { "%5.3S", "    a", "S", "a" }
                { "%-5.3S", "a    ", "S", "a" }
                { "%5.3s", "  abc", "s", "abcde" }
                { "%-5.3s", "abc  ", "s", "abcde" }
                { "%5.3s", "  abc", "s", "abcdef" }
                { "%-5.3s", "abc  ", "s", "abcdef" }
                { "%5.3s", "    a", "s", "a" }
                { "%-5.3s", "a    ", "s", "a" }
                { "%5.3C", "    a", "2", "61" }
                { "%-5.3C", "a    ", "2", "61" }
                { "%-5.0C", "a    ", "2", "61" } // Make sure that the precision is ignored.
                { "%.3P", "120.000%", "d", "1.2" }
                { "%.0P", "120%", "d", "1.2" }
                { "%.3P", "1.200%", "d", "0.012" }
                { "%.0P", "1%", "d", "0.012" }
                { "%04.0P", "001%", "d", "0.012" }
                { "%+4.0P", " +1%", "d", "0.012" }
                { "%e", "1.200000e+000", "d", "1.2" }
                { "%e", "1.234568e+006", "d", "1234567.89" }
                { "%E", "1.234568E+006", "d", "1234567.89" }
                { "%10e", "1.234568e+000", "d", "1.23456789" }
                { "%10.4e", "1.2346e+000", "d", "1.23456789" }
                { "%-10e", "1.234568e+000", "d", "1.23456789" }
                { "%10e", "1.234568e+002", "d", "123.456789" }
                { "%-10e", "1.234568e+002", "d", "123.456789" }
                { "%-+12.1e", "+1.2e+000   ", "d", "1.234" }
                { "%-+12.1e", "-1.2e+000   ", "d", "-1.234" }
                { "%- 12.10e", " 1.2340000000e+000", "d", "1.234" }
                { "%- 12.1e", "-1.2e+000   ", "d", "-1.234" }
                { "%+12.1e", "   +1.2e+000", "d", "1.234" }
                { "%+12.1e", "   -1.2e+000", "d", "-1.234" }
                { "% 12.1e", "    1.2e+000", "d", "1.234" }
                { "% 12.1e", "   -1.2e+000", "d", "-1.234" }
                { "%12.1e", "    1.2e+000", "d", "1.234" }
                { "%12.1e", "   -1.2e+000", "d", "-1.234" }
                { "%.2e", "1.23e+000", "d", "1.234" }
                { "%.2e", "-1.23e+000", "d", "-1.234" }
                { "%3e", "1.234000e+000", "d", "1.234" }
                { "%3e", "-1.234000e+000", "d", "-1.234" }
                { "%g", "12345.7", "d", "12345.6789" }
                { "%g", "123457", "d", "123456.789" }
                { "%g", "1.23457e+006", "d", "1234567.89" }
                { "%G", "12345.7", "d", "12345.6789" }
                { "%G", "123457", "d", "123456.789" }
                { "%G", "1.23457E+006", "d", "1234567.89" }
                { "%.14G", "1.7E+064", "d", "1.7E+64" }
                { "%.0f", "-12", "d", "-12.34" }
                { "%.0e", "-1e+001", "d", "-12.34" }
                { "%.0g", "-1e+001", "d", "-12.34" }
                { "%hd", "-30002", "2", "8ace" }
                { "%hu", "35534", "2", "8ace" }
                { "%ho", "105316", "2", "8ace" }
                { "%hx", "8ace", "2", "8ace" }
                { "%lx", "8ace1234", "4", "8ace1234" }
                { "%llx", "123456789abcdef0", "8", "123456789abcdef0" }
                { "%lu", "2328760884", "4", "8ace1234" }
                // %llu doesn't work yet.
                { "%ld", "-1966206412", "4", "8ace1234" }
                { "%lld", "1311768467463790320", "8", "123456789abcdef0" }
                { "%+u", "2328760884", "4", "8ace1234" } // Ignore the + sign argument
            }
        }
        printfPrecision {
            Headers { "format", "result", "argumentType", "argument", "precision" }
            Cases {
                { "%+1.*e", "+1.2346e+000", "d", "1.2345678", :int{4} }
                { "%+2.*e", "+1.234568e+000", "d", "1.2345678", :int{6} }
                { "%*d", "12345678", "4", "BC614E", :int{7} }
                { "%*d", "12345678", "4", "BC614E", :int{8} }
                { "%*d", " 12345678", "4", "BC614E", :int{9} }
                { "%*d", "12345678 ", "4", "BC614E", :int{-9} }
                { "%*d", "1", "4", "1", :int{-1} }
                { "%*d", "1 ", "4", "1", :int{-2} }
            }
        }
        scanf {
            Headers { "format", "argument", "argumentType", "result" }
            Cases {
                { "%e", "1.200000e+000", "f", "1.2" }
                { "%*e%e", "1.200000e+000 4.825000e+000", "f", "4.825" }
                { "%C", "1234", "2", "31" }
                { "%*C%C", "1234", "2", "32" }
                { "%S", "1234 5678", "S", "1234" }
                { "%*S%S", "1234 5678", "S", "5678" }
                { "%hd", "1234 5678", "2", "4D2" }
                { "%*hd%hd", "1234 5678", "2", "162E" }
                { "%d", "1234 5678", "4", "4D2" }
                { "%ld", "1234 5678", "4", "4D2" }
                { "%lld", "1311768467463790320", "8", "123456789abcdef0" }
                { "%3d", "1234 5678", "4", "7B" }
                { "%4d", "123", "4", "7B" }
                { "%2d", "123", "4", "C" }
                { "%40d", "123", "4", "7B" }
                { "%2e", "1.25", "f", "1" }
                { "%2f", "1.25", "f", "1" }
                { "%2g", "1.25", "f", "1" }
                { "%2le", "1.25", "d", "1" }
                { "%2lf", "1.25", "d", "1" }
                { "%2lg", "1.25", "d", "1" }
                { "%*2e%2e", "1.25", "f", "25" }
                { "%*2f%2f", "1.25", "f", "25" }
                { "%*2g%2g", "1.25", "f", "25" }
                { "%*d%d", "1234 5678", "4", "162E" }
                { "%x", "abcd ef01", "4", "abcd" }
                { "%3x", "abcd ef01", "4", "abc" }
                { "%*hx%hx", "abcd ef01", "2", "ef01" }
                { "%ho", "1046539", "2", "89AB" } // Extra 9 on the end
                { "%3ho", "7700", "2", "1F8" } // Don't read the 0 at the end
                { "%llo", "1777777777777777777777", "8", "FFFFFFFFFFFFFFFF" }
                { "%lx", "abcdef01", "4", "abcdef01" }
                { "%x", "0x7abcdef0", "4", "7abcdef0" }
                { "%llx", "123456789abcdef0", "8", "123456789abcdef0" }
                { "%S", "a\U00010000b", "S", "a\U00010000b" }
                { "%[abce]", "abcd ef01", "S", "abc" }
                { "%*[abce]%[de\\ ]", "abcd ef01", "S", "d e" }
                { "%[a\U00010000]", "a\U00010000\U00010001b", "S", "a\U00010000" }
                { "%[a-f]", "abccdefg", "S", "abccdef" }
                { "%[a-c]", "abccdefg", "S", "abcc" }
                { "%[^e-f]", "abccdefg", "S", "abccd" }
                { "%3[^e-f]", "abccdefg", "S", "abc" }
                { "%*3[abc]%[cde]", "abccdefg", "S", "cde" }
                { "%*3S%S", "a bc efg", "S", "bc" }
                { "%*3S%S", "abcd efg", "S", "d" }
                { "%*3s%s", "abcd efg", "s", "d" }
                { "%*3d%d", "1234", "4", "4" }
                { "%d", " 1234", "4", "4D2" }
                { "%e", " 1234", "f", "1234" }
                { "%f", " 1234", "f", "1234" }
                { "%d", "+1234", "4", "4D2" }
                { "%e", "+1234", "f", "1234" }
                { "%f", "+1234", "f", "1234" }
            }
        }
    }
}

Messung V0.5
C=72 H=100 G=86

¤ 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.