Re: [PATCH] StatHist refactoring interim merge, proposed fix for bug 3381

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 10 Jan 2012 15:13:17 +1300

On 10.01.2012 08:45, Kinkie wrote:
>> Do we use StatHist::operator "=="? If not, I suggest not adding it
>> because the added code may return false for histograms that are
>> essentially the same for many practical purposes. In general, what
>> histograms are considered the same depends on the caller use of
>> statistics so if we do not have any callers, let's not add this
>> code.
>>
>> No need to repost the patch with this minor change, of course.
>
> It is only used in the unit tests.
> I can remove that if you feel that'd be better. I don't know how to
> meaningfully perform unit testing without adding to the class'
> interface, as it has virtually no useable accessors.

In these cases the unit test code needs to define a child class in its
.cc which provides the accessors to reach and test private fields.

Amos
Received on Tue Jan 10 2012 - 02:13:21 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 20 2012 - 12:00:11 MST