Re: [RFC PATCH v3 1/1] unit tests: Add a project plan document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Glen Choo <chooglen@xxxxxxxxxx> writes:
>
>> - Inline tests are, by nature, non-production 'noise' in the source
>>   file, and can hamper readability of the file. This will probably be
>>   exaggerated in Git because our interfaces weren't designed with unit
>>   tests in mind, so tests may be extremley noisy to set up.
>
> I do agree with the first sentence, but I am not sure what you mean
> by "our interfaces weren't designed with unit tests in mind".

[...]

> Do
> you mean that in the longer term it would be good to tweak the
> interfaces with "unit tests in mind" (and add new interfaces that
> way?

Ah. I agree, but this isn't what I meant.

> Or do you mean interfaces that are written with "unit tests
> in mind" inherently becomes noisy when inline non-production tests
> are mixed in?

I meant the opposite of this actually. Interfaces with "unit tests" in
mind result in simpler tests, so they will be less complicated to setup
and thus be less noisy. Testing the existing, pre-unit test interfaces
will be very noisy, so I don't think they will lend themselves well to
inline tests.

But of course, (per the prior point) we are trying to make the
interfaces cleaner, which should naturally make them more unit
test-friendly, so this will become less important over time. I think the
other objection - that we want unit tests to enforce cleanliness of our
build dependencies - is the more important one.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux