mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
Update test to reflect that strtol now sets errno to EINVAL for invalid input.
This commit is contained in:
parent
c514c109ab
commit
58630dedc1
@ -39,20 +39,24 @@ void main (void)
|
|||||||
if (strPtr != &string [36])
|
if (strPtr != &string [36])
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
L1 = strtol (strPtr, &strPtr, 16);
|
L1 = strtol (strPtr, &strPtr, 16);
|
||||||
if (errno != ERANGE)
|
if (errno != ERANGE)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
UL1 = strtoul (strPtr, &strPtr, 16);
|
UL1 = strtoul (strPtr, &strPtr, 16);
|
||||||
if (errno != ERANGE)
|
if (errno != EINVAL)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
L1 = strtol ("zz", &strPtr, 0);
|
L1 = strtol ("zz", &strPtr, 0);
|
||||||
if (errno != ERANGE)
|
if (errno != EINVAL)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
UL1 = strtoul ("xx", &strPtr, 0);
|
UL1 = strtoul ("xx", &strPtr, 0);
|
||||||
if (errno != ERANGE)
|
if (errno != EINVAL)
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
||||||
printf ("Passed Conformance Test 15.8.0.2\n");
|
printf ("Passed Conformance Test 15.8.0.2\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user