digitalmars.D.learn - unit testing
- Ishan Thilina (3/3) Mar 28 2011 I see that almost all of the phobos library files have "unittests". Were...
- David Nadlinger (6/9) Mar 28 2011 No, these unit test were just written by hand while writing the
- Caligo (3/15) Mar 28 2011 and how does one do unit testing with GDC? It works fine with DMD,
- David Nadlinger (3/5) Mar 28 2011 -funittest, IIRC.
- Ishan Thilina (4/4) Mar 28 2011 @David:
- Jonathan M Davis (7/12) Mar 28 2011 LOL. Goodness no. They're done by hand. I'm currently reworking std.date...
- Ishan Thilina (2/7) Mar 28 2011 I'm new to this concept of uni testing. Thanks for the help :)
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...!
Mar 28 2011
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
Mar 28 2011
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: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.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
Mar 28 2011
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
Mar 28 2011
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..! :-)
Mar 28 2011
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
Mar 28 2011
- 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 :)
Mar 28 2011