Closed Bug 346703 Opened 18 years ago Closed 18 years ago

add brain-dead simple unit test to netwerk/protocol/http

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: davel, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch brain-dead simple unit test (obsolete) — Splinter Review
Attachment #231440 - Flags: review?(darin)
new version - don't specify path of static library.  debug build did not complete without this change.
Attachment #231440 - Attachment is obsolete: true
Attachment #231526 - Flags: review?(darin)
Attachment #231440 - Flags: review?(darin)
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?
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.
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?
I think support for writing C++ unit tests would be good - not all functionality can be tested using javascript.
Assignee: davel → nobody
Comment on attachment 231526 [details] [diff] [review]
brain-dead unit test for netwerk/protocol/http

abandoning this effort
Attachment #231526 - Flags: review?(darin.moz)
someone else will take up the unit testing efforts
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: