]> pd.if.org Git - pdclib/commitdiff
Activated Tyndur tests for _PDCLIB_print(). Fixed flag handling bug.
authorMartin Baute <solar@rootdirectory.de>
Thu, 7 Apr 2016 06:00:07 +0000 (08:00 +0200)
committerMartin Baute <solar@rootdirectory.de>
Thu, 7 Apr 2016 06:00:07 +0000 (08:00 +0200)
functions/_PDCLIB/print.c
testing/printf_testcases.h

index f3df0ec42b1fe316018cabd995fc21aa2768d00f..9a30ca2446b0d332784fdecebfa7d12b0b55b94f 100644 (file)
@@ -291,7 +291,7 @@ const char * _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status
             spec = endptr;
         }
         /* Having a precision cancels out any zero flag. */
             spec = endptr;
         }
         /* Having a precision cancels out any zero flag. */
-        status->flags ^= E_zero;
+        status->flags &= ~E_zero;
     }
 
     /* Optional length modifier
     }
 
     /* Optional length modifier
index d46e987ea9d324d52b533f85d490b12d92ea8f91..e0357fc72b30c7243063dc00bb0f84e59a93505f 100644 (file)
     PRINTF_TEST( 1,  "1", "%ju", (uintmax_t)  1); // uintmax_t
     PRINTF_TEST( 1,  "1", "%zd", (size_t)     1); // signed size_t
 
     PRINTF_TEST( 1,  "1", "%ju", (uintmax_t)  1); // uintmax_t
     PRINTF_TEST( 1,  "1", "%zd", (size_t)     1); // signed size_t
 
-#ifndef TEST_CONVERSION_ONLY
 /******************************************************************************
  * NOTE: The following test cases are imported from the Tyndur project. They  *
  *       are therefore under the license of said project, not CC0.            *
 /******************************************************************************
  * NOTE: The following test cases are imported from the Tyndur project. They  *
  *       are therefore under the license of said project, not CC0.            *
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
     {
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
     {
+#ifndef TEST_CONVERSION_ONLY
     /* Ein String ohne alles */
     PRINTF_TEST(12, "Hallo heimur", "Hallo heimur");
     /* Ein String ohne alles */
     PRINTF_TEST(12, "Hallo heimur", "Hallo heimur");
+#endif
     /* Einfache Konvertierungen */
     PRINTF_TEST(12, "Hallo heimur", "%s", "Hallo heimur");
     PRINTF_TEST(4, "1024", "%d", 1024);
     /* Einfache Konvertierungen */
     PRINTF_TEST(12, "Hallo heimur", "%s", "Hallo heimur");
     PRINTF_TEST(4, "1024", "%d", 1024);
     PRINTF_TEST(20, "00EDCB5433          ", "% -+0*.*X", 20, 10, -0x1234abcdu);
     }
 /******************************************************************************/
     PRINTF_TEST(20, "00EDCB5433          ", "% -+0*.*X", 20, 10, -0x1234abcdu);
     }
 /******************************************************************************/
-#endif
-