diff --git a/internaltesting.bat b/internaltesting.bat new file mode 100644 index 000000000..dfcd87644 --- /dev/null +++ b/internaltesting.bat @@ -0,0 +1,12 @@ + +@ECHO OFF + +cppcheck --debug internaltesting\testdecl.cpp > internaltesting\testdecl.msg +hydfc internaltesting\testdecl.out internaltesting\testdecl.msg + +cppcheck --debug internaltesting\testassign.cpp > internaltesting\testassign.msg +hydfc internaltesting\testassign.out internaltesting\testassign.msg + +cppcheck --debug internaltesting\testnew.cpp > internaltesting\testnew.msg +hydfc internaltesting\testnew.out internaltesting\testnew.msg + diff --git a/internaltesting/testassign.cpp b/internaltesting/testassign.cpp new file mode 100644 index 000000000..e4096baa5 --- /dev/null +++ b/internaltesting/testassign.cpp @@ -0,0 +1,11 @@ + + +void f() +{ + a = 1; + b[2] = 3; + c[4][5].min = 6; + d.min = 7; +} + + diff --git a/internaltesting/testassign.out b/internaltesting/testassign.out new file mode 100644 index 000000000..06c1d944f --- /dev/null +++ b/internaltesting/testassign.out @@ -0,0 +1,6 @@ +{ +assign a +assign b[2] +assign c[4][5].min +assign d.min +} diff --git a/internaltesting/testdecl.cpp b/internaltesting/testdecl.cpp new file mode 100644 index 000000000..02e7ac698 --- /dev/null +++ b/internaltesting/testdecl.cpp @@ -0,0 +1,11 @@ + + +void f() +{ + int a; + int b = 2, c, *d = NULL; + int e = g(p1,p2); + char str[10]; +} + + diff --git a/internaltesting/testdecl.out b/internaltesting/testdecl.out new file mode 100644 index 000000000..5609238a6 --- /dev/null +++ b/internaltesting/testdecl.out @@ -0,0 +1,11 @@ +{ +decl a +decl b +decl c +decl d +assign b +assign d +decl e +assign e +decl str +} diff --git a/internaltesting/testnew.cpp b/internaltesting/testnew.cpp new file mode 100644 index 000000000..2e8a8d3b6 --- /dev/null +++ b/internaltesting/testnew.cpp @@ -0,0 +1,10 @@ + + +void f() +{ + a = new char[10]; + fred = new Fred; + fred = new Fred(); +} + + diff --git a/internaltesting/testnew.out b/internaltesting/testnew.out new file mode 100644 index 000000000..06a74075c --- /dev/null +++ b/internaltesting/testnew.out @@ -0,0 +1,5 @@ +{ +new[] a +new fred +new fred +}