MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test_4_good

Function test_4_good

addons/test/y2038_test.py:93–104  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

91
92
93def test_4_good(capsys):
94 # pylint: disable-next=unused-variable - FIXME
95 is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-4-good.c.dump', quiet=True)
96 # assert(is_safe is True) # FIXME: This should be a "good" example returning "True" instead of "False"
97 captured = capsys.readouterr()
98 captured = captured.out.splitlines()
99 json_output = convert_json_output(captured)
100
101 # Defined _TIME_BITS equal to 64 so that glibc knows we want Y2038 support.
102 # There are no warnings from C sources.
103 unsafe_calls = json_output['unsafe-call']
104 assert(len([c for c in unsafe_calls if c['file'].endswith('.c')]) == 0)
105
106
107def test_5_good(capsys):

Callers

nothing calls this directly

Calls 2

check_y2038_safeFunction · 0.90
convert_json_outputFunction · 0.85

Tested by

no test coverage detected