(capsys)
| 62 | |
| 63 | |
| 64 | def test_2_no_time_bits(capsys): |
| 65 | is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-2-no-time-bits.c.dump', quiet=True) |
| 66 | assert(is_safe is False) |
| 67 | captured = capsys.readouterr() |
| 68 | captured = captured.out.splitlines() |
| 69 | json_output = convert_json_output(captured) |
| 70 | |
| 71 | # _USE_TIME_BITS64 defined in y2038-inc.h header, but there is not |
| 72 | # _TIME_BITS definition. Here must be appropriate warning. |
| 73 | assert(len(json_output['type-bits-undef']) == 1) |
| 74 | assert(json_output.get('type-bits-not-64') is None) |
| 75 | |
| 76 | # y2038-in.h still has y2038-unsafe calls. |
| 77 | unsafe_calls = json_output['unsafe-call'] |
| 78 | assert(len([c for c in unsafe_calls if c['file'].endswith('h')]) == 3) |
| 79 | |
| 80 | |
| 81 | def test_3_no_use_time_bits(capsys): |
nothing calls this directly
no test coverage detected