| 80 | } |
| 81 | |
| 82 | char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ) |
| 83 | { |
| 84 | bool truncate = (numBytes > maxBytes); |
| 85 | if ( truncate ) |
| 86 | numBytes = maxBytes; |
| 87 | |
| 88 | s = copyString( s, "{ " ); |
| 89 | for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes ) |
| 90 | s = copyString( copyString( s, byteToHex( *bytes ) ), " " ); |
| 91 | if ( truncate ) |
| 92 | s = copyString( s, "..." ); |
| 93 | return copyString( s, " }" ); |
| 94 | } |
| 95 | |
| 96 | #ifndef CXXTEST_USER_VALUE_TRAITS |
| 97 | unsigned ValueTraits<const double>::requiredDigitsOnLeft( double t ) |
no test coverage detected