Comparing slice to an Array in assert

madwebness madwebness at noreply.noreply
Tue Jun 11 08:33:15 UTC 2024


On Tuesday, 11 June 2024 at 08:29:06 UTC, madwebness wrote:
> unittest {
>   auto words = ["HELLO", "world", "hi", "ENDOFTHERUNWAY"];
>   auto resulting_arr = sliceIt(["world", "hi"]);
>   assert(resulting_arr == ["world", "hi"]);
> }


Correction here, I, of course, meant:

```
auto resulting_arr = sliceIt(words);
```


More information about the Digitalmars-d-learn mailing list