mirror of https://github.com/deavmi/niknaks
View
- Fixed range-based `opSlice(...)` View (unittests) - Added unittest
This commit is contained in:
parent
2ecb371d9a
commit
bfa7c6020f
|
@ -758,7 +758,7 @@ if(isSector!(SectorType)())
|
||||||
{
|
{
|
||||||
// FIXME: This is lazy, do a check for up to where
|
// FIXME: This is lazy, do a check for up to where
|
||||||
// and actually make THIS the real implementation
|
// and actually make THIS the real implementation
|
||||||
return this.opSlice()[start, end];
|
return this.opSlice()[start..end];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool isArrayAppend(P)()
|
private static bool isArrayAppend(P)()
|
||||||
|
@ -894,6 +894,7 @@ unittest
|
||||||
assert(view[1] == 3);
|
assert(view[1] == 3);
|
||||||
assert(view[2] == 45);
|
assert(view[2] == 45);
|
||||||
assert(view[3] == 2);
|
assert(view[3] == 2);
|
||||||
|
assert(view[0..2] == [1,3]);
|
||||||
|
|
||||||
// Update elements
|
// Update elements
|
||||||
view[0] = 71;
|
view[0] = 71;
|
||||||
|
|
Loading…
Reference in New Issue