2004-04-08 20:24:06 +00:00
|
|
|
//*****************************************************************************
|
|
|
|
//
|
|
|
|
// Copyright (C) 2004, 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 {
|
|
|
|
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"
|
|
|
|
"\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 {
|
|
|
|
{
|
2004-04-11 00:12:43 +00:00
|
|
|
"%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"
|
|
|
|
}
|
2004-04-28 17:18:58 +00:00
|
|
|
{
|
|
|
|
"%g", "12345.7", "d", "12345.6789"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%g", "123457", "d", "123456.789"
|
|
|
|
}
|
2004-04-11 00:12:43 +00:00
|
|
|
{
|
|
|
|
"%g", "1.23457e+006", "d", "1234567.89"
|
|
|
|
}
|
2004-04-28 17:18:58 +00:00
|
|
|
{
|
|
|
|
"%G", "12345.7", "d", "12345.6789"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%G", "123457", "d", "123456.789"
|
|
|
|
}
|
2004-04-11 00:12:43 +00:00
|
|
|
{
|
|
|
|
"%G", "1.23457E+006", "d", "1234567.89"
|
2004-04-08 20:24:06 +00:00
|
|
|
}
|
|
|
|
{
|
2004-04-29 05:29:04 +00:00
|
|
|
"%hx", "8ace", "2", "8ace"
|
|
|
|
}
|
2004-05-19 00:28:28 +00:00
|
|
|
{
|
|
|
|
"%lx", "8ace1234", "4", "8ace1234"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%llx", "123456789abcdef0", "8", "123456789abcdef0"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%lu", "2328760884", "4", "8ace1234"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%ld", "-1966206412", "4", "8ace1234"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%lld", "1311768467463790320", "8", "123456789abcdef0"
|
|
|
|
}
|
2004-04-29 05:29:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
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}
|
2004-04-08 20:24:06 +00:00
|
|
|
}
|
2004-05-19 00:28:28 +00:00
|
|
|
{
|
|
|
|
"%*d", "12345678", "4", "BC614E", :int{7}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%*d", "12345678", "4", "BC614E", :int{8}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%*d", " 12345678", "4", "BC614E", :int{9}
|
|
|
|
}
|
2004-04-08 20:24:06 +00:00
|
|
|
}
|
|
|
|
}
|
2004-05-05 22:02:25 +00:00
|
|
|
scanf {
|
|
|
|
Headers { "format", "argument", "argumentType", "result" }
|
|
|
|
Cases {
|
|
|
|
{
|
|
|
|
"%e", "1.200000e+000", "d", "1.2"
|
|
|
|
}
|
2004-05-10 05:49:38 +00:00
|
|
|
{
|
|
|
|
"%*e%e", "1.200000e+000 4.825000e+000", "d", "4.825"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%C", "1234", "2", "31"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%*C%C", "1234", "2", "32"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%S", "1234 5678", "S", "1234"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%*S%S", "1234 5678", "S", "5678"
|
|
|
|
}
|
2004-05-20 18:21:41 +00:00
|
|
|
{
|
|
|
|
"%hd", "1234 5678", "2", "4D2"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%*hd%hd", "1234 5678", "2", "162E"
|
|
|
|
}
|
2004-05-10 05:49:38 +00:00
|
|
|
{
|
|
|
|
"%d", "1234 5678", "4", "4D2"
|
|
|
|
}
|
|
|
|
{
|
2004-05-20 18:21:41 +00:00
|
|
|
"%ld", "1234 5678", "4", "4D2"
|
2004-05-10 05:49:38 +00:00
|
|
|
}
|
|
|
|
{
|
2004-05-20 18:21:41 +00:00
|
|
|
"%lld", "1311768467463790320", "8", "123456789abcdef0"
|
2004-05-10 05:49:38 +00:00
|
|
|
}
|
|
|
|
{
|
2004-05-20 18:21:41 +00:00
|
|
|
"%*d%d", "1234 5678", "4", "162E"
|
2004-05-10 05:49:38 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
"%x", "abcd ef01", "4", "abcd"
|
|
|
|
}
|
|
|
|
{
|
2004-05-12 21:35:21 +00:00
|
|
|
"%*hx%hx", "abcd ef01", "2", "ef01"
|
2004-05-10 05:49:38 +00:00
|
|
|
}
|
2004-05-20 18:21:41 +00:00
|
|
|
{
|
|
|
|
"%lx", "abcdef01", "4", "abcdef01"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%llx", "123456789abcdef0", "8", "123456789abcdef0"
|
|
|
|
}
|
2004-05-10 05:49:38 +00:00
|
|
|
{
|
|
|
|
"%[abce]", "abcd ef01", "S", "abc"
|
|
|
|
}
|
|
|
|
{
|
2004-05-19 00:28:28 +00:00
|
|
|
"%*[abce]%[de\\ ]", "abcd ef01", "S", "d e"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%[a\U00010000]", "a\U00010000\U00010001b", "S", "a\U00010000"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"%S", "a\U00010000b", "S", "a\U00010000b"
|
2004-05-10 05:49:38 +00:00
|
|
|
}
|
2004-05-05 22:02:25 +00:00
|
|
|
}
|
|
|
|
}
|
2004-04-08 20:24:06 +00:00
|
|
|
}
|
|
|
|
}
|