Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 20, 2005 unittest for nested functions? | ||||
---|---|---|---|---|
| ||||
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Should unittest in functions be allowed in future, so that static inner functions can be tested? # void outer(){ # static int inner(){ # return 0; # } # # unittest{ # assert(inner()==0); # } # } Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCZe4h3w+/yD4P9tIRAsZiAKCqXhIB4zSoe5ctT4ALasyXGOZWbwCgqgyP 2FoEwP8wvVW7+OmDwJLUXP0= =Tgr9 -----END PGP SIGNATURE----- |
April 21, 2005 Re: unittest for nested functions? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Hmmm... Won't this work?... unittest { function.test(); assert(foo); //etc. } TZ "Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:1a7hj2-uf6.ln1@lnews.kuehne.cn... > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Should unittest in functions be allowed in future, so that static inner functions can be tested? > > # void outer(){ > # static int inner(){ > # return 0; > # } > # > # unittest{ > # assert(inner()==0); > # } > # } > > Thomas > > > -----BEGIN PGP SIGNATURE----- > > iD8DBQFCZe4h3w+/yD4P9tIRAsZiAKCqXhIB4zSoe5ctT4ALasyXGOZWbwCgqgyP > 2FoEwP8wvVW7+OmDwJLUXP0= > =Tgr9 > -----END PGP SIGNATURE----- |
April 21, 2005 Re: unittest for nested functions? | ||||
---|---|---|---|---|
| ||||
Posted in reply to TechnoZeus | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 TechnoZeus schrieb am Wed, 20 Apr 2005 19:17:18 -0500: > Hmmm... Won't this work?... > > unittest > { > function.test(); > assert(foo); > //etc. > } > > TZ > > > "Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:1a7hj2-uf6.ln1@lnews.kuehne.cn... >> >> Should unittest in functions be allowed in future, so that static inner functions can be tested? >> >> # void outer(){ >> # static int inner(){ >> # return 0; >> # } >> # >> # unittest{ >> # assert(inner()==0); >> # } >> # } >> >> Thomas Nice catch. BTW where is this documented? Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCZzUH3w+/yD4P9tIRAmtJAKDLEsvU5Kn6H+lE5ieti12ayULyOgCfVizx HVz4XAbnmB91AIwBYQGhmwY= =v0i6 -----END PGP SIGNATURE----- |
April 21, 2005 Re: unittest for nested functions? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Don't know if it is documented. It just seemed to make sense. TZ "Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:71pjj2-b54.ln1@lnews.kuehne.cn... > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > TechnoZeus schrieb am Wed, 20 Apr 2005 19:17:18 -0500: > > Hmmm... Won't this work?... > > > > unittest > > { > > function.test(); > > assert(foo); > > //etc. > > } > > > > TZ > > > > > > "Thomas Kuehne" <thomas-dloop@kuehne.thisisspam.cn> wrote in message news:1a7hj2-uf6.ln1@lnews.kuehne.cn... > >> > >> Should unittest in functions be allowed in future, so that static inner functions can be tested? > >> > >> # void outer(){ > >> # static int inner(){ > >> # return 0; > >> # } > >> # > >> # unittest{ > >> # assert(inner()==0); > >> # } > >> # } > >> > >> Thomas > > Nice catch. > BTW where is this documented? > > Thomas > > > -----BEGIN PGP SIGNATURE----- > > iD8DBQFCZzUH3w+/yD4P9tIRAmtJAKDLEsvU5Kn6H+lE5ieti12ayULyOgCfVizx > HVz4XAbnmB91AIwBYQGhmwY= > =v0i6 > -----END PGP SIGNATURE----- |
Copyright © 1999-2021 by the D Language Foundation