KFilePlacesModelTest
Michael Pyne
mpyne at kde.org
Sat May 7 23:50:36 UTC 2016
On Sat, May 7, 2016 14:33:53 David Faure wrote:
> The thing I wonder is... does it really make sense to have a model with
> random ordering? Isn't it a problem for users if their visible list of
> places is different between every run? Or am I missing something and the
> different order in the test isn't actually user visible?
Is it trying to test that the entries are present in a *specific* order, or
simply that the entries will be maintained in a constant order between
serialization/deserialization? If it's the latter then we could instead use
whatever the existing order is in one call as the expected order for the
second call.
Also, if we're just trying to show that a specific set of entries would be
present, couldn't we sort the expected and the actual lists before doing the
comparison, to make it independent of order? In other words we could break the
test into two: 1) ensure order is properly saved and loaded, and 2) ensure
right items are present independent of their order.
Regards,
- Michael Pyne
More information about the Kde-frameworks-devel
mailing list