[phobos] phobos commit, revision 1678
Brad Roberts
braddr at puremagic.com
Tue Jun 22 10:24:09 PDT 2010
Should all the ranges have that sort of static assert to make sure they satisfy
the intended set of attributes?
On 6/22/2010 8:03 AM, Andrei Alexandrescu wrote:
> I think just issuing an assert(isForwardRange!(typeof(repeat(1))) should
> suffice.
>
> Andrei
>
> On 06/22/2010 09:58 AM, David Simcha wrote:
>> Realistically, how would you recommend testing something like this? I
>> checked to make sure that there was something instantiating each version
>> of the structs to make sure that they compile (i.e. no silly syntax
>> errors), and as for the logical correctness, it seemed like the code was
>> so trivial that it would be silly to write an explicit test for it.
>> Furthermore, the precedent in the rest of Phobos seems to be that such
>> trivial code does not require testing.
>>
>> On Tue, Jun 22, 2010 at 10:30 AM, Brad Roberts <braddr at puremagic.com
>> <mailto:braddr at puremagic.com>> wrote:
>>
>> On 6/22/2010 5:31 AM, dsource.org <http://dsource.org> wrote:
>> > phobos commit, revision 1678
>> >
>> >
>> > user: dsimcha
>> >
>> > msg:
>> > Bug 4362: std.range.repeat and cycle do not have a .save() method
>> >
>> > http://www.dsource.org/projects/phobos/changeset/1678
>>
>> Don't forget to add unit tests. :)
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com <mailto:phobos at puremagic.com>
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>>
>>
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list