From: solar Date: Mon, 19 Jul 2010 09:00:16 +0000 (+0000) Subject: Disabled 'special case' tests for regression. X-Git-Tag: v0.5~55 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=cbd7fc65775365c1c63b565cc7aee1093a069205 Disabled 'special case' tests for regression. --- diff --git a/functions/stdio/fscan_sources.incl b/functions/stdio/fscan_sources.incl index 6502356..704c542 100644 --- a/functions/stdio/fscan_sources.incl +++ b/functions/stdio/fscan_sources.incl @@ -33,10 +33,12 @@ TESTCASE( fwrite( "abcdefgh-ijklmnop[qrs%uvw]xyz", 1, 29, alpha ) == 29 ); rewind( alpha ); +#ifndef REGTEST FILE * special = fopen( "scanf_testdata_special", "wb+" ); TESTCASE( special != NULL ); TESTCASE( fwrite( "-0xz\n", 1, 5, special ) == 5 ); rewind( special ); +#endif /* fscan */ diff --git a/functions/stdio/scanf_testcases.incl b/functions/stdio/scanf_testcases.incl index 3a2b543..a32d0ca 100644 --- a/functions/stdio/scanf_testcases.incl +++ b/functions/stdio/scanf_testcases.incl @@ -1118,10 +1118,8 @@ CHECK_FALSE( memcmp( buffer, "abc", 4 ) ); } +#ifndef REGTEST // special bordercase - { - // reading -0x, x - unsigned char i = 1; /* Most existing libraries disagree with this test case, so a little explanation of why PDCLib chose the implementation it did might be necessary. All references are from ISO/IEC 9899:1999 "Programming @@ -1162,30 +1160,22 @@ - The conversion should therefore result in a matching failure according to 7.19.6.2 paragraph 10. */ -#ifdef REGTEST - printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n" - " for an explanation why.\n" ); -#endif - TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hhx", &i ) ); /* May fail on regtest */ + { + // reading -0x, x + unsigned char i = 1; + TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hhx", &i ) ); CHECK_EQUAL( i, 1 ); /* FIXME */ } { // reading -0x, x unsigned short i = 1; -#ifdef REGTEST - printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n" - " for an explanation why.\n" ); -#endif - TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hx", &i ) ); /* May fail on regtest */ + TESTSCAN( 0, -1, special, 0, SCANPARMS( "%hx", &i ) ); CHECK_EQUAL( i, 1 ); /* FIXME */ } { // reading -0x, x unsigned int i = 1; -#ifdef REGTEST - printf( " The following is likely to fail. Check stdio/scanf_testcases.c\n" - " for an explanation why.\n" ); -#endif - TESTSCAN( 0, -1, special, 0, SCANPARMS( "%x", &i ) ); /* May fail on regtest */ + TESTSCAN( 0, -1, special, 0, SCANPARMS( "%x", &i ) ); CHECK_EQUAL( i, 1 ); /* FIXME */ } +#endif diff --git a/functions/stdio/sscan_sources.incl b/functions/stdio/sscan_sources.incl index 490d95d..78063a9 100644 --- a/functions/stdio/sscan_sources.incl +++ b/functions/stdio/sscan_sources.incl @@ -13,7 +13,9 @@ "+01777777777777777777777\n" "-01777777777777777777777\n"; char const * alpha = "abcdefgh-ijklmnop[qrs%uvw]xyz"; +#ifndef REGTEST char const * special = "-0xz\n"; +#endif /* sscan */