Last Comment Bug 346703 - add brain-dead simple unit test to netwerk/protocol/http
: add brain-dead simple unit test to netwerk/protocol/http
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: Networking: HTTP (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: test-harness
  Show dependency treegraph
 
Reported: 2006-07-31 11:16 PDT by Dave Liebreich [:davel]
Modified: 2006-11-13 11:54 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
brain-dead simple unit test (2.12 KB, patch)
2006-07-31 11:18 PDT, Dave Liebreich [:davel]
no flags Details | Diff | Review
brain-dead unit test for netwerk/protocol/http (2.11 KB, patch)
2006-07-31 17:08 PDT, Dave Liebreich [:davel]
no flags Details | Diff | Review

Description Dave Liebreich [:davel] 2006-07-31 11:16:15 PDT
While at the agile2006 conference, I worked with some attendees and we wrote one very basic unit test for nsHttpConnectionInfo::SetOriginServer()

I'd like to land the test on trunk.
Comment 1 Dave Liebreich [:davel] 2006-07-31 11:18:38 PDT
Created attachment 231440 [details] [diff] [review]
brain-dead simple unit test
Comment 2 Dave Liebreich [:davel] 2006-07-31 17:08:33 PDT
Created attachment 231526 [details] [diff] [review]
brain-dead unit test for netwerk/protocol/http

new version - don't specify path of static library.  debug build did not complete without this change.
Comment 3 Dave Liebreich [:davel] 2006-07-31 17:33:39 PDT
ok - I need some help with this patch.

1) it does not run on windows.  I suspect I need to add the ".exe" to the SIMPLE_PROGRAMS target, and run from $(DIST)/bin so it finds the libraries.  Anything else?

2) the executable is copied to $(DIST)/bin.  Do I need to make sure it is not included in the release bits?  If so, how?
Comment 4 Darin Fisher 2006-07-31 17:58:19 PDT
dave: what does this unit test buy us?  we don't really have good support from the build system for creating executables that link to internal functions like this.
Comment 5 Dave Liebreich [:davel] 2006-07-31 20:14:18 PDT
I believe unit-style tests written in c++ are one type of test that should be supported by some sort of harness in our build system, so that creating new unit tests is easy.

I intended this unit test to serve as an mechanism to discover how to add such support.

I have the feeling that there are lots of philosophical and abstract technical discussions that may need to happen regarding unit tests, and that comments in this bug are not the right forum for such discussions.  But I don't want to abandon this attempt completely until those discussions are complete.

I'm willing to put in another day or two of effort to get this test to work.  Do you think that is a reasonable time period, and if so, where should I look to figure out what the next set of changes should be?
Comment 6 Christian :Biesinger (don't email me, ping me on IRC) 2006-07-31 23:02:28 PDT
I think support for writing C++ unit tests would be good - not all functionality can be tested using javascript.
Comment 7 Dave Liebreich [:davel] 2006-11-13 11:52:38 PST
Comment on attachment 231526 [details] [diff] [review]
brain-dead unit test for netwerk/protocol/http

abandoning this effort
Comment 8 Dave Liebreich [:davel] 2006-11-13 11:54:13 PST
someone else will take up the unit testing efforts

Note You need to log in before you can comment on or make changes to this bug.