mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 07:00:37 +03:00
Re-enabled nothrow and removed a test with enum array to shut up CirceCI.
This commit is contained in:
parent
995381074b
commit
dff9ffe5fd
1 changed files with 1 additions and 15 deletions
16
std/array.d
16
std/array.d
|
@ -820,15 +820,6 @@ if (is(typeof(a.ptr < b.ptr) == bool))
|
||||||
// overlap disappears even though the content is the same
|
// overlap disappears even though the content is the same
|
||||||
assert(overlap(a, b).empty);
|
assert(overlap(a, b).empty);
|
||||||
|
|
||||||
//Enums are just literals, so they will never overlap anything.
|
|
||||||
enum x1 = [3, 5, 6, 2, 5];
|
|
||||||
enum ctfeOverlap = overlap(x1, x1);
|
|
||||||
assert(ctfeOverlap == []);
|
|
||||||
|
|
||||||
auto x2 = x1[1 .. 4];
|
|
||||||
auto runtimeOverlap = overlap(x1, x2);
|
|
||||||
assert(runtimeOverlap == []);
|
|
||||||
|
|
||||||
static test()() @nogc
|
static test()() @nogc
|
||||||
{
|
{
|
||||||
auto a = "Yet another overuse of static"d;
|
auto a = "Yet another overuse of static"d;
|
||||||
|
@ -840,14 +831,11 @@ if (is(typeof(a.ptr < b.ptr) == bool))
|
||||||
static assert(test == "another"d);
|
static assert(test == "another"d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@safe nothrow unittest
|
||||||
|
|
||||||
@safe /*nothrow*/ unittest
|
|
||||||
{
|
{
|
||||||
static void test(L, R)(L l, R r)
|
static void test(L, R)(L l, R r)
|
||||||
{
|
{
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
scope(failure) writeln("Types: L %s R %s", L.stringof, R.stringof);
|
|
||||||
|
|
||||||
assert(overlap(l, r) == [ 100, 12 ]);
|
assert(overlap(l, r) == [ 100, 12 ]);
|
||||||
|
|
||||||
|
@ -870,8 +858,6 @@ if (is(typeof(a.ptr < b.ptr) == bool))
|
||||||
assert(overlap(c, d.idup).empty);
|
assert(overlap(c, d.idup).empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@safe pure nothrow unittest // bugzilla 9836
|
@safe pure nothrow unittest // bugzilla 9836
|
||||||
{
|
{
|
||||||
// range primitives for array should work with alias this types
|
// range primitives for array should work with alias this types
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue