/* strtoul( const char *, char * *, int )
This file is part of the Public Domain C Library (PDCLib).
/* strtoul( const char *, char * *, int )
This file is part of the Public Domain C Library (PDCLib).
/* for one-complement and signed magnitude just as well. Anyone having */
/* a platform to test this on? */
errno = 0;
/* for one-complement and signed magnitude just as well. Anyone having */
/* a platform to test this on? */
errno = 0;
/* testing "even" overflow, i.e. base is power of two */
TESTCASE( strtoul( "4294967295", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == 0 );
/* testing "even" overflow, i.e. base is power of two */
TESTCASE( strtoul( "4294967295", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == 0 );
TESTCASE( strtoul( "4294967296", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == ERANGE );
/* TODO: test "odd" overflow, i.e. base is not power of two */
TESTCASE( strtoul( "4294967296", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == ERANGE );
/* TODO: test "odd" overflow, i.e. base is not power of two */
/* testing "even" overflow, i.e. base is power of two */
TESTCASE( strtoul( "18446744073709551615", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == 0 );
/* testing "even" overflow, i.e. base is power of two */
TESTCASE( strtoul( "18446744073709551615", NULL, 0 ) == ULONG_MAX );
TESTCASE( errno == 0 );