]> pd.if.org Git - pdclib.old/blobdiff - functions/_PDCLIB/atomax.c
* Test cleanups: surround the code for all functions by #ifndef REGTEST
[pdclib.old] / functions / _PDCLIB / atomax.c
index 45095e77256767070b35008dcc2119413b161a22..58a8e58e438c207f44870656beef9883f6e9b70c 100644 (file)
@@ -6,6 +6,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#ifndef REGTEST
 #include <_PDCLIB_int.h>
 #include <string.h>
 #include <ctype.h>
@@ -26,16 +27,19 @@ _PDCLIB_intmax_t _PDCLIB_atomax( const char * s )
     }
     return ( sign == '+' ) ? rc : -rc;
 }
+#endif
 
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
 int main( void )
 {
+#ifndef REGTEST
     /* basic functionality */
     TESTCASE( _PDCLIB_atomax( "123" ) == 123 );
     /* testing skipping of leading whitespace and trailing garbage */
     TESTCASE( _PDCLIB_atomax( " \n\v\t\f123xyz" ) == 123 );
+#endif
     return TEST_RESULTS;
 }