Unttests for nested functions

BCS BCS_member at pathlink.com
Sat May 27 19:46:24 PDT 2006


how do I unittest bar?

int foo(int i)
{
int j=0;

int bar(int k)  //////////
{
j+=k;
}
/+	cant make unit test here
unittest
{
bar(0);
}
+/

while(i);
bar(i--);

return j;
}

/+	cant access nested function here
unittest
{
bar(0);
}
+/








More information about the Digitalmars-d-learn mailing list