Re: About Automated Unit Test for Wget

2008-04-06 Thread Yoshihiro Tanaka
2008/4/5, Micah Cowan [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Stenberg wrote: This system allows us to write unit-tests if we'd like to, but mostly so far we've focused to test it system-wide. It is hard enough for us! Yeah, I thought I'd seen

Re: About Automated Unit Test for Wget

2008-04-06 Thread Yoshihiro Tanaka
2008/4/5, Micah Cowan [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Stenberg wrote: This system allows us to write unit-tests if we'd like to, but mostly so far we've focused to test it system-wide. It is hard enough for us! Yeah, I thought I'd seen

Re: About Automated Unit Test for Wget

2008-04-06 Thread Hrvoje Niksic
Micah Cowan [EMAIL PROTECTED] writes: I don't see what you see wrt making the code harder to follow and reason about (true abstraction rarely does, AFAICT, I was referring to the fact that adding an abstraction layer requires learning about the abstraction layer, both its concepts and its

Re: About Automated Unit Test for Wget

2008-04-06 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Micah Cowan wrote: Yeah. But we're not doing streaming. And you still haven't given much explanation for _why_ it's as hard and time-consuming as you say. Making a claim and demonstrating it are different things, I think. To be clear, I'm not

Re: About Automated Unit Test for Wget

2008-04-05 Thread Yoshihiro Tanaka
2008/4/4, Micah Cowan [EMAIL PROTECTED]: IMO, if it's worth testing, it's probably better to have external linkage anyway. I got it. 1) Select functions which can be tested in unit test. But How can I select them? is difficult. Basically the less dependency the function

Re: About Automated Unit Test for Wget

2008-04-05 Thread Yoshihiro Tanaka
2008/4/5, Yoshihiro Tanaka [EMAIL PROTECTED]: 2008/4/4, Micah Cowan [EMAIL PROTECTED]: IMO, if it's worth testing, it's probably better to have external linkage anyway. I got it. 1) Select functions which can be tested in unit test. But How can I select them? is

Re: About Automated Unit Test for Wget

2008-04-05 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshihiro Tanaka wrote: 2008/4/5, Yoshihiro Tanaka [EMAIL PROTECTED]: Yes, since I want to write proposal for Unit testing, I can't skip this problem. But considering GSoC program is only 2 month, I'd rather narrow down the target - to gethttp

Re: About Automated Unit Test for Wget

2008-04-05 Thread Daniel Stenberg
On Sat, 5 Apr 2008, Micah Cowan wrote: Or did you mean to write wget version of socket interface? i.e. to write our version of socket, connect,write,read,close,bind, listen,accept,,,? sorry I'm confused. Yes! That's what I meant. (Except, we don't need listen, accept; and we only need bind

Re: About Automated Unit Test for Wget

2008-04-05 Thread Hrvoje Niksic
Micah Cowan [EMAIL PROTECTED] writes: Or did you mean to write wget version of socket interface? i.e. to write our version of socket, connect,write,read,close,bind, listen,accept,,,? sorry I'm confused. Yes! That's what I meant. (Except, we don't need listen, accept; and we only need bind

Re: About Automated Unit Test for Wget

2008-04-05 Thread Daniel Stenberg
On Sat, 5 Apr 2008, Hrvoje Niksic wrote: This would mean we'd need to separate uses of read() and write() on normal files (which should continue to use the real calls, until we replace them with the file I/O abstractions), from uses of read(), write(), etc on sockets, which would be using our

Re: About Automated Unit Test for Wget

2008-04-05 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Stenberg wrote: On Sat, 5 Apr 2008, Micah Cowan wrote: Or did you mean to write wget version of socket interface? i.e. to write our version of socket, connect,write,read,close,bind, listen,accept,,,? sorry I'm confused. Yes! That's what

Re: About Automated Unit Test for Wget

2008-04-05 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Stenberg wrote: In the curl project we took a simpler route: we have our own dumb test servers in the test suite to run tests against and we have single files that describe each test case: what the server should respond, what the protocol

Re: About Automated Unit Test for Wget

2008-04-05 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hrvoje Niksic wrote: Micah Cowan [EMAIL PROTECTED] writes: Or did you mean to write wget version of socket interface? i.e. to write our version of socket, connect,write,read,close,bind, listen,accept,,,? sorry I'm confused. Yes! That's what I

Re: About Automated Unit Test for Wget

2008-04-04 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yoshihiro Tanaka wrote: Hello, I want to ask about Unit test of Wget in the future. I want to ask about unit test. Now unit test of Wget is written only for following .c files. -- http.c init.c main.c res.c url.c utils.c (test.c) So as