Thread overview | ||||||
---|---|---|---|---|---|---|
|
June 15, 2006 Unit tests for functions | ||||
---|---|---|---|---|
| ||||
Are unit tests bound to classes? I have a module with some functions and I want to make a unit test for them. The problem is that I have to get the unit test inside a class (from what I can see in the D documentation). What should I do? Should I make a class with all static methods? Thanks, Ary |
June 15, 2006 Re: Unit tests for functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig wrote: > Are unit tests bound to classes? > > I have a module with some functions and I want to make a unit test for them. The problem is that I have to get the unit test inside a class (from what I can see in the D documentation). What should I do? Should I make a class with all static methods? > > Thanks, > Ary You can have module-level unit tests. -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/ |
June 16, 2006 Re: Unit tests for functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Keep | In article <e6rm44$1hqv$2@digitaldaemon.com>, Daniel Keep says... > > > >Ary Borenszweig wrote: >> Are unit tests bound to classes? >> >> I have a module with some functions and I want to make a unit test for them. The problem is that I have to get the unit test inside a class (from what I can see in the D documentation). What should I do? Should I make a class with all static methods? >> >> Thanks, >> Ary > >You can have module-level unit tests. > > -- Daniel > >-- >Unlike Knuth, I have neither proven or tried the above; it may not even make sense. > >v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/ Thanks!! Is that documented anywhere? I've only seen it in the Classes section: http://www.digitalmars.com/d/class.html |
June 16, 2006 Re: Unit tests for functions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Manzana | In article <e6uvlu$6pp$1@digitaldaemon.com>, Ary Manzana says... > >In article <e6rm44$1hqv$2@digitaldaemon.com>, Daniel Keep says... >> >> >> >>Ary Borenszweig wrote: >>> Are unit tests bound to classes? >>> >>> I have a module with some functions and I want to make a unit test for them. The problem is that I have to get the unit test inside a class (from what I can see in the D documentation). What should I do? Should I make a class with all static methods? >>> >>> Thanks, >>> Ary >> >>You can have module-level unit tests. >> >> -- Daniel >> >>-- >>Unlike Knuth, I have neither proven or tried the above; it may not even make sense. >> >>v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/ > >Thanks!! > >Is that documented anywhere? I've only seen it in the Classes section: http://www.digitalmars.com/d/class.html It's mentioned in the grammar at the top of http://www.digitalmars.com/d/module.html jcc7 |
Copyright © 1999-2021 by the D Language Foundation