From 89b3116eb8d3373464a9c86d35e72c5728611658 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Wed, 14 Apr 2004 19:12:58 +0000 Subject: [PATCH] ICU-3499 Add some tests X-SVN-Rev: 14961 --- icu4c/source/test/iotest/filetst.c | 5 +++++ icu4c/source/test/iotest/strtst.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/icu4c/source/test/iotest/filetst.c b/icu4c/source/test/iotest/filetst.c index b97fea481b1..0b2ed77ffbc 100644 --- a/icu4c/source/test/iotest/filetst.c +++ b/icu4c/source/test/iotest/filetst.c @@ -887,6 +887,9 @@ static void TestFprintfFormat(void) { TestFPrintFormat("%-8C", (UChar)0x65, "%-8c", (char)0x65); TestFPrintFormat("%f", 1.23456789, "%f", 1.23456789); + TestFPrintFormat("%f", 12345.6789, "%f", 12345.6789); + TestFPrintFormat("%f", 123456.789, "%f", 123456.789); + TestFPrintFormat("%f", 1234567.89, "%f", 1234567.89); TestFPrintFormat("%10f", 1.23456789, "%10f", 1.23456789); TestFPrintFormat("%-10f", 1.23456789, "%-10f", 1.23456789); TestFPrintFormat("%10f", 123.456789, "%10f", 123.456789); @@ -901,8 +904,10 @@ static void TestFprintfFormat(void) { TestFPrintFormat("%10e", 1234.56789, "%10e", 1234.56789); TestFPrintFormat("%-10e", 1234.56789, "%-10e", 1234.56789); + TestFPrintFormat("%g", 12345.6789, "%g", 12345.6789); TestFPrintFormat("%g", 123456.789, "%g", 123456.789); TestFPrintFormat("%g", 1234567.89, "%g", 1234567.89); + TestFPrintFormat("%G", 123456.789, "%G", 123456.789); TestFPrintFormat("%G", 1234567.89, "%G", 1234567.89); TestFPrintFormat("%10g", 1.23456789, "%10g", 1.23456789); TestFPrintFormat("%10.4g", 1.23456789, "%10.4g", 1.23456789); diff --git a/icu4c/source/test/iotest/strtst.c b/icu4c/source/test/iotest/strtst.c index e2b4e91e4d4..a347396bd0e 100644 --- a/icu4c/source/test/iotest/strtst.c +++ b/icu4c/source/test/iotest/strtst.c @@ -345,14 +345,20 @@ static void TestSprintfFormat(void) { TestSPrintFormat("%-8C", (UChar)0x65, "%-8c", (char)0x65); TestSPrintFormat("%f", 1.23456789, "%f", 1.23456789); + TestSPrintFormat("%f", 12345.6789, "%f", 12345.6789); + TestSPrintFormat("%f", 123456.789, "%f", 123456.789); + TestSPrintFormat("%f", 1234567.89, "%f", 1234567.89); TestSPrintFormat("%10f", 1.23456789, "%10f", 1.23456789); TestSPrintFormat("%-10f", 1.23456789, "%-10f", 1.23456789); TestSPrintFormat("%10f", 123.456789, "%10f", 123.456789); TestSPrintFormat("%10.4f", 123.456789, "%10.4f", 123.456789); TestSPrintFormat("%-10f", 123.456789, "%-10f", 123.456789); + TestSPrintFormat("%g", 12345.6789, "%g", 12345.6789); TestSPrintFormat("%g", 123456.789, "%g", 123456.789); + TestSPrintFormat("%g", 1234567.89, "%g", 1234567.89); TestSPrintFormat("%G", 123456.789, "%G", 123456.789); + TestSPrintFormat("%G", 1234567.89, "%G", 1234567.89); TestSPrintFormat("%10g", 1.23456789, "%10g", 1.23456789); TestSPrintFormat("%10.4g", 1.23456789, "%10.4g", 1.23456789); TestSPrintFormat("%-10g", 1.23456789, "%-10g", 1.23456789);