add workaround for https://issues.dlang.org/show_bug.cgi?id=2396 to reduce compile time of unittests

This commit is contained in:
Rainer Schuetze 2019-03-29 09:37:43 +01:00
parent 2f030ebbd9
commit 2e13c10025
5 changed files with 20 additions and 20 deletions

View file

@ -1194,7 +1194,7 @@ if (isInputRange!R &&
import std.meta : AliasSeq;
static foreach (S; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
{
(){ // workaround slow optimizations for large functions @@@BUG@@@ 2396
assert(!endsWith(to!S("abc"), 'a'));
assert(endsWith(to!S("abc"), 'a', 'c') == 2);
assert(!endsWith(to!S("abc"), 'x', 'n', 'b'));
@ -1233,7 +1233,7 @@ if (isInputRange!R &&
assert(endsWith(to!S("a"), T.init, 'a') == 1);
assert(endsWith(to!S("a"), 'a', T.init) == 2);
}
}
}();
static foreach (T; AliasSeq!(int, short))
{{
@ -4775,7 +4775,7 @@ if (isInputRange!R &&
import std.range;
static foreach (S; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
{
(){ // workaround slow optimizations for large functions @@@BUG@@@ 2396
assert(!startsWith(to!S("abc"), 'c'));
assert(startsWith(to!S("abc"), 'a', 'c') == 1);
assert(!startsWith(to!S("abc"), 'x', 'n', 'b'));
@ -4817,7 +4817,7 @@ if (isInputRange!R &&
assert(startsWith(to!S("a"), T.init, 'a') == 1);
assert(startsWith(to!S("a"), 'a', T.init) == 2);
}
}
}();
//Length but no RA
assert(!startsWith("abc".takeExactly(3), "abcd".takeExactly(4)));