digitalmars.D.bugs - DMD 0.109 Linux - std.format unittest fails
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (11/23) Dec 09 2004 This is where it tests the %A format...
Running the Phobos unittest fails in .109:Error: AssertError Failure format(730)This is where it tests the %A format... Actual results are: (with extra printfs)putreal 1.67 format = '%*.*Lg', n = 4 putreal -1.28 format = '%*.*LA', n = 21 putreal nan format = '%*.*Lg', n = 3The assert doesn't output anything useful like it does in C, but I added some printf:RESULT: 1.67 -0XA.3D70A3D70A3D8P-3 nan EXPECT: 1.67 -0X1.47AE147AE147BP+0 nanThe error seems to be in the real conversion:printf("%A\n%LA\n", -1.28, cast(real) -1.28);outputs:-0X1.47AE147AE147BP+0 -0XA.3D70A3D70A3D8P-3The other unittests in the library succeeded. For some reason, "make unittest" doesn't set the -unittest flag when compiling Phobos... ? --anders
Dec 09 2004