Test: Internal testing

This commit is contained in:
Daniel Marjamäki 2007-05-15 16:50:22 +00:00
parent fd726d710f
commit 0b0aa636af
7 changed files with 66 additions and 0 deletions

12
internaltesting.bat Normal file
View File

@ -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

View File

@ -0,0 +1,11 @@
void f()
{
a = 1;
b[2] = 3;
c[4][5].min = 6;
d.min = 7;
}

View File

@ -0,0 +1,6 @@
{
assign a
assign b[2]
assign c[4][5].min
assign d.min
}

View File

@ -0,0 +1,11 @@
void f()
{
int a;
int b = 2, c, *d = NULL;
int e = g(p1,p2);
char str[10];
}

View File

@ -0,0 +1,11 @@
{
decl a
decl b
decl c
decl d
assign b
assign d
decl e
assign e
decl str
}

View File

@ -0,0 +1,10 @@
void f()
{
a = new char[10];
fred = new Fred;
fred = new Fred();
}

View File

@ -0,0 +1,5 @@
{
new[] a
new fred
new fred
}