We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b06156 commit 22547beCopy full SHA for 22547be
1 file changed
test/cli/test-other.py
@@ -143,6 +143,19 @@ def test_progress_j(tmpdir):
143
assert stderr == ""
144
145
146
+@pytest.mark.timeout(10)
147
+def test_slow_array_many_floats(tmpdir):
148
+ # 11649
149
+ # cppcheck valueflow takes a long time when an array has many floats
150
+ filename = os.path.join(tmpdir, 'hang.c')
151
+ with open(filename, 'wt') as f:
152
+ f.write("const float f[] = {\n")
153
+ for i in range(20000):
154
+ f.write(' 13.6f,\n')
155
+ f.write("};\n")
156
+ cppcheck([filename]) # should not take more than ~1 second
157
+
158
159
@pytest.mark.timeout(10)
160
def test_slow_array_many_strings(tmpdir):
161
# 11901
0 commit comments