|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0211 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0211.
Report 0211 Actions
Problem Report Number 0211 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0211 Raised 1995-05-18 08:00 Updated 2003-03-13 08:00 Published 1995-05-25 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.4 Test Identification XPG4.os/genuts/strfmon 17 Problem Summary TSD4.211 The function in this test that performs rounding for the expected string has an ASCII dependency which makes the test round incorrectly on implementations that are no ASCII-based. The function fval() ... Problem Text
The function in this test that performs rounding for the expected
string has an ASCII dependency which makes the test round incorrectly
on implementations that are no ASCII-based. The function fval()
has the following code:
/*
* Do rounding
*/
if(*(ibuf + i) != '\0' && (*(ibuf + i) - 48) >= 5)
obuf[j - 1] = obuf[j - 1] + 1;
The expression (*(ibuf + i) - 48) will take a character and subtract
the ASCII value for '0' (decimal 48) from it. This value is then
compared against 5 to see if the previous digit needs to be round up.
Using the decimal value for an ASCII character like this is
non-portable. A more portable statement would use the expression
(*(ibuf + i) - '0') or simply compare (*(ibuf + 1)) against the
character '5'.Test Output
/tset/XPG4.os/genuts/strfmon/T.strfmon 17 Failed
Test Description:
If strfmon() is supported:
When the i or n conversion specification is preceded by a right
precision specification of the form .p, where p is a decimal digit
string, then strfmon() formats the result with p decimal
characters after the radix character, appending additional zeros
as necessary and rounding values to the number of digits
specified.
Otherwise:
A call to strfmon() returns -1 and sets errno to ENOSYS.
Test Strategy:
SET locale for LC_MONETARY category
CALL strfmon(buf,maxsize,format,value)
VERIFY that buf[] contains the expected value
CALL strfmon(buf,maxsize,format,value)
VERIFY that buf[] contains the expected value
Test Information:
strfmon(buf, 256, "%.4n", ...) did not return expected results
%.pn specification formats with precision p
Current language is VSX4L3
Expected string : [Dm1 234^5601]
Actual string : [Dm1 234.5600]
strfmon(buf, 256, "%.4i", ...) did not return expected results
%.pi specification formats with precision p
Current language is VSX4L3
Expected string : [DDM 1 234^5601]
Actual string : [DDM 1 234.5600]Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a test suite fault and it is recommended that this be
treated as a Test Suite Deficiency.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 0211
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority