test/test_printf.cpp

changeset 648
4e115b610b37
parent 636
cfcc8cf0168c
--- a/test/test_printf.cpp	Thu Feb 02 20:25:34 2023 +0100
+++ b/test/test_printf.cpp	Tue Feb 07 20:06:33 2023 +0100
@@ -115,26 +115,10 @@
     EXPECT_EQ(r, 9);
     EXPECT_EQ(buf, "12 012 04");
 
-    r = cx_fprintf(&buf, PrintfFixture::write_func, "%f %.0f %.32f", 1.5, 1.5, 1.3);
-    EXPECT_EQ(r, 45);
-    EXPECT_EQ(buf, "1.500000 2 1.30000000000000004440892098500626");
-
     r = cx_fprintf(&buf, PrintfFixture::write_func, "%05.2f %.2f %5.2f", 1.5, 1.5, 1.5);
     EXPECT_EQ(r, 16);
     EXPECT_EQ(buf, "01.50 1.50  1.50");
 
-    r = cx_fprintf(&buf, PrintfFixture::write_func, "%E %e", 1.5, 1.5);
-    EXPECT_EQ(r, 25);
-    EXPECT_EQ(buf, "1.500000E+00 1.500000e+00");
-
-    r = cx_fprintf(&buf, PrintfFixture::write_func, "%a %A", 1.5, 1.5);
-    EXPECT_EQ(r, 17);
-    EXPECT_EQ(buf, "0x1.8p+0 0X1.8P+0");
-
-    r = cx_fprintf(&buf, PrintfFixture::write_func, "0/0=%g 1/0=%g", 0.0 / 0.0, 1.0 / 0.0);
-    EXPECT_EQ(r, 16);
-    EXPECT_EQ(buf, "0/0=-nan 1/0=inf");
-
     r = cx_fprintf(&buf, PrintfFixture::write_func, "'%*c'", 5, 'x');
     EXPECT_EQ(r, 7);
     EXPECT_EQ(buf, "'    x'");
@@ -230,31 +214,11 @@
     EXPECT_STREQ(r.ptr, "12 012 04");
     fl.push_back(r.ptr);
 
-    r = cx_asprintf_a(&alloc, "%f %.0f %.32f", 1.5, 1.5, 1.3);
-    EXPECT_EQ(r.length, 45);
-    EXPECT_STREQ(r.ptr, "1.500000 2 1.30000000000000004440892098500626");
-    fl.push_back(r.ptr);
-
     r = cx_asprintf_a(&alloc, "%05.2f %.2f %5.2f", 1.5, 1.5, 1.5);
     EXPECT_EQ(r.length, 16);
     EXPECT_STREQ(r.ptr, "01.50 1.50  1.50");
     fl.push_back(r.ptr);
 
-    r = cx_asprintf_a(&alloc, "%E %e", 1.5, 1.5);
-    EXPECT_EQ(r.length, 25);
-    EXPECT_STREQ(r.ptr, "1.500000E+00 1.500000e+00");
-    fl.push_back(r.ptr);
-
-    r = cx_asprintf_a(&alloc, "%a %A", 1.5, 1.5);
-    EXPECT_EQ(r.length, 17);
-    EXPECT_STREQ(r.ptr, "0x1.8p+0 0X1.8P+0");
-    fl.push_back(r.ptr);
-
-    r = cx_asprintf_a(&alloc, "0/0=%g 1/0=%g", 0.0 / 0.0, 1.0 / 0.0);
-    EXPECT_EQ(r.length, 16);
-    EXPECT_STREQ(r.ptr, "0/0=-nan 1/0=inf");
-    fl.push_back(r.ptr);
-
     r = cx_asprintf_a(&alloc, "'%*c'", 5, 'x');
     EXPECT_EQ(r.length, 7);
     EXPECT_STREQ(r.ptr, "'    x'");

mercurial