Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
March 28, 2011 unit testing | ||||
---|---|---|---|---|
| ||||
I see that almost all of the phobos library files have "unittests". Were these unit tests were created using some framework? If so, then what is it? Thank you...! |
March 28, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ishan Thilina | On 3/28/11 4:23 PM, Ishan Thilina wrote:
> I see that almost all of the phobos library files have "unittests". Were these
> unit tests were created using some framework? If so, then what is it?
>
> Thank you...!
No, these unit test were just written by hand while writing the corresponding pieces of code, and extended after a bug was fixed which they previously missed.
Or was your question related to actually running them?
David
|
March 28, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Mon, Mar 28, 2011 at 9:34 AM, David Nadlinger <see@klickverbot.at> wrote:
> On 3/28/11 4:23 PM, Ishan Thilina wrote:
>>
>> I see that almost all of the phobos library files have "unittests". Were
>> these
>> unit tests were created using some framework? If so, then what is it?
>>
>> Thank you...!
>
> No, these unit test were just written by hand while writing the corresponding pieces of code, and extended after a bug was fixed which they previously missed.
>
> Or was your question related to actually running them?
>
> David
>
and how does one do unit testing with GDC? It works fine with DMD, but GDC doesn't do unit testing when -unittest is supplied.
|
March 28, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Caligo | On 3/28/11 5:55 PM, Caligo wrote:
> and how does one do unit testing with GDC? It works fine with DMD,
> but GDC doesn't do unit testing when -unittest is supplied.
-funittest, IIRC.
David
|
March 28, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | @David: No, my question was not about running them,but on how that code was generated. I thought they were auto generated using a unitest framework :). Your answer clarifies everything. Thank you..! :-) |
March 28, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ishan Thilina | On 2011-03-28 11:29, Ishan Thilina wrote:
> @David:
>
> No, my question was not about running them,but on how that code was generated. I thought they were auto generated using a unitest framework :). Your answer clarifies everything. Thank you..! :-)
LOL. Goodness no. They're done by hand. I'm currently reworking std.datetime's unit tests, and it's very time consuming (since it's a large module with lots of tests). I don't know how you'd get a framework to generate what I want anyway. The fact that D has unit testing built in like it does is fantastic, but it is fairly simplistic.
- Jonathan M Davis
|
March 29, 2011 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | - Jonathan M Davis wrote:
>LOL. Goodness no. They're done by hand. I'm currently reworking std.datetime's unit tests, and it's very time consuming (since it's a large module with lots of tests). I don't know how you'd get a framework to generate what I want anyway. The fact that D has unit testing built in like it does is fantastic, but it is fairly simplistic.
I'm new to this concept of uni testing. Thanks for the help :)
|
Copyright © 1999-2021 by the D Language Foundation