| 652 | }; |
| 653 | |
| 654 | void PreDecTestUint8() |
| 655 | { |
| 656 | size_t i; |
| 657 | |
| 658 | for( i = 0; i < COUNTOF(dec_uint8); ++i ) |
| 659 | { |
| 660 | bool fSuccess = true; |
| 661 | try |
| 662 | { |
| 663 | SafeInt<std::uint8_t> si(dec_uint8[i].x); |
| 664 | SafeInt<std::uint8_t> vv = --si; |
| 665 | |
| 666 | if(vv != dec_uint8[i].y) |
| 667 | { |
| 668 | fSuccess = false; |
| 669 | } |
| 670 | } |
| 671 | catch(SafeIntException&) |
| 672 | { |
| 673 | fSuccess = false; |
| 674 | } |
| 675 | |
| 676 | if( fSuccess != dec_uint8[i].fExpected ) |
| 677 | { |
| 678 | cerr << "Error in case dec_uint8 throw (1): "; |
| 679 | cerr << HEX(2) << (0xFF & (int)dec_uint8[i].x) << ", "; |
| 680 | cerr << "expected = " << dec_uint8[i].fExpected << endl; |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | void PostDecTestUint8() |
| 686 | { |
nothing calls this directly
no outgoing calls
no test coverage detected