June 18, 2014 Re: When is a slice not a slice? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alix Pexton | On Thursday, 5 June 2014 at 19:45:59 UTC, Alix Pexton wrote:
> unittest
> {
> auto a = DataAndView(1);
> assert (sameTail(a.data, a.view));
> enum b = DataAndView(1);
> assert (!sameTail(b.data, b.view));
> }
Just a request of presentation. Please make expected assertions:
enum b = DataAndView(1);
assert (sameTail(b.data, b.view)); // fails
Where the comment could be "fails" "compile error" "ice" "baby"
It documents expectations, documents what went wrong, and provides a program which demonstrates the issue.
|
Copyright © 1999-2021 by the D Language Foundation