summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2021-05-26 10:29:03 +0200
committerEugen Wissner <belka@caraus.de>2021-05-26 10:29:55 +0200
commit4f4854429704624280a70c698dbc03724e55d988 (patch)
treef45381cdcd1310535df4f40503beaac527de2743 /test
parent938a1bb5b400c39c34f9659da4945c299467d3f0 (diff)
downloadtanya-4f4854429704624280a70c698dbc03724e55d988.tar.gz
Allow building with GDC 10.3
Diffstat (limited to 'test')
-rw-r--r--test/tanya/test/stub.d36
1 files changed, 30 insertions, 6 deletions
diff --git a/test/tanya/test/stub.d b/test/tanya/test/stub.d
index 07f65c1..99630e6 100644
--- a/test/tanya/test/stub.d
+++ b/test/tanya/test/stub.d
@@ -146,7 +146,11 @@ mixin template InputRangeStub(E = int)
}
void popFront() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
static if (!infinite)
{
@@ -157,7 +161,11 @@ mixin template InputRangeStub(E = int)
static if (withLvalueElements)
{
ref E front() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
return *this.element;
}
@@ -165,7 +173,11 @@ mixin template InputRangeStub(E = int)
else
{
E front() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
return E.init;
}
@@ -216,7 +228,11 @@ mixin template BidirectionalRangeStub(E = int)
mixin ForwardRangeStub!E;
void popBack() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
static if (!infinite)
{
@@ -227,7 +243,11 @@ mixin template BidirectionalRangeStub(E = int)
static if (withLvalueElements)
{
ref E back() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
return *this.element;
}
@@ -235,7 +255,11 @@ mixin template BidirectionalRangeStub(E = int)
else
{
E back() @nogc nothrow pure @safe
- in (!empty)
+ in
+ {
+ assert(!empty);
+ }
+ do
{
return E.init;
}