Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 16:49:42 UTC, BicMedium wrote: But there could be a templated-unittest for those kind of things...Ranges are relatively straightforward in to use, but when you want to implement one, it's another thing...So it's just about indexes ? And a kind of State machine for ind

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread BicMedium via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 14:05:56 UTC, monarch_dodra wrote: On Tuesday, 27 May 2014 at 12:18:15 UTC, BicMedium wrote: I mean that those tests are just like testing an interface...). If your interface isn't complete, than it is irrelevant what your implementations are, since the algorithms c

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 12:18:15 UTC, BicMedium wrote: I mean that those tests are just like testing an interface...). If your interface isn't complete, than it is irrelevant what your implementations are, since the algorithms can't use your ranges anyways. BTW the 2nd and the 3rd assert

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread BicMedium via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 11:43:12 UTC, monarch_dodra wrote: On Tuesday, 27 May 2014 at 10:50:54 UTC, BicMedium wrote: Let's say I have a set of containers, using a D-unfriendly-semantic. They rather use a kind of ADA vocabulary (according to https://en.wikipedia.org/wiki/Deque). I want to ma

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 10:50:54 UTC, BicMedium wrote: Let's say I have a set of containers, using a D-unfriendly-semantic. They rather use a kind of ADA vocabulary (according to https://en.wikipedia.org/wiki/Deque). I want to make them "range-aware". If the input/output ranges are easy to

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 10:50:54 UTC, BicMedium wrote: Let's say I have a set of containers, using a D-unfriendly-semantic. They rather use a kind of ADA vocabulary (according to https://en.wikipedia.org/wiki/Deque). I want to make them "range-aware". If the input/output ranges are easy to

Re: What are the best std algo for testing a range implementation ?

2014-05-27 Thread Chris via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 10:50:54 UTC, BicMedium wrote: Let's say I have a set of containers, using a D-unfriendly-semantic. They rather use a kind of ADA vocabulary (according to https://en.wikipedia.org/wiki/Deque). I want to make them "range-aware". If the input/output ranges are easy to

What are the best std algo for testing a range implementation ?

2014-05-27 Thread BicMedium via Digitalmars-d-learn
Let's say I have a set of containers, using a D-unfriendly-semantic. They rather use a kind of ADA vocabulary (according to https://en.wikipedia.org/wiki/Deque). I want to make them "range-aware". If the input/output ranges are easy to implement(so it's just reading/writing an element, keepin