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

Class TestLeakAutoVar

test/testleakautovar.cpp:27–3250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include <string>
26
27class TestLeakAutoVar : public TestFixture {
28public:
29 TestLeakAutoVar() : TestFixture("TestLeakAutoVar") {}
30
31private:
32 const Settings settings = settingsBuilder().library("std.cfg").checkLibrary().build();
33
34 void run() override {
35 mNewTemplate = true;
36 // Assign
37 TEST_CASE(assign1);
38 TEST_CASE(assign2);
39 TEST_CASE(assign3);
40 TEST_CASE(assign4);
41 TEST_CASE(assign5);
42 TEST_CASE(assign6);
43 TEST_CASE(assign7);
44 TEST_CASE(assign8);
45 TEST_CASE(assign9);
46 TEST_CASE(assign10);
47 TEST_CASE(assign11); // #3942: x = a(b(p));
48 TEST_CASE(assign12); // #4236: FP. bar(&x);
49 TEST_CASE(assign13); // #4237: FP. char*&ref=p; p=malloc(10); free(ref);
50 TEST_CASE(assign14);
51 TEST_CASE(assign15);
52 TEST_CASE(assign16);
53 TEST_CASE(assign17); // #9047
54 TEST_CASE(assign18);
55 TEST_CASE(assign19);
56 TEST_CASE(assign20); // #9187
57 TEST_CASE(assign21); // #10186
58 TEST_CASE(assign22); // #9139
59 TEST_CASE(assign23);
60 TEST_CASE(assign24); // #7440
61 TEST_CASE(assign25);
62 TEST_CASE(assign26);
63
64 TEST_CASE(memcpy1); // #11542
65 TEST_CASE(memcpy2);
66
67 TEST_CASE(isAutoDealloc);
68
69 TEST_CASE(realloc1);
70 TEST_CASE(realloc2);
71 TEST_CASE(realloc3);
72 TEST_CASE(realloc4);
73 TEST_CASE(realloc5); // #9292, #9990
74 TEST_CASE(freopen1);
75 TEST_CASE(freopen2);
76
77 TEST_CASE(deallocuse1);
78 TEST_CASE(deallocuse3);
79 TEST_CASE(deallocuse4);
80 TEST_CASE(deallocuse5); // #4018: FP. free(p), p = 0;
81 TEST_CASE(deallocuse6); // #4034: FP. x = p = f();
82 TEST_CASE(deallocuse7); // #6467, #6469, #6473
83 TEST_CASE(deallocuse8); // #1765
84 TEST_CASE(deallocuse9); // #9781

Callers

nothing calls this directly

Calls 3

buildMethod · 0.80
checkLibraryMethod · 0.80
libraryMethod · 0.80

Tested by

no test coverage detected