mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
This commit is contained in:
commit
30724e67d9
89 changed files with 839 additions and 839 deletions
|
@ -22,7 +22,7 @@ import std.traits;
|
|||
public import std.container.util;
|
||||
|
||||
///
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
import std.range : take;
|
||||
|
@ -403,7 +403,7 @@ leaves the heap unaffected and returns $(D false).
|
|||
}
|
||||
|
||||
/// Example from "Introduction to Algorithms" Cormen et al, p 146
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
int[] a = [ 4, 1, 3, 2, 16, 9, 10, 14, 8, 7 ];
|
||||
|
@ -416,7 +416,7 @@ unittest
|
|||
|
||||
/// $(D BinaryHeap) implements the standard input range interface, allowing
|
||||
/// lazy iteration of the underlying range in descending order.
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
import std.range : take;
|
||||
|
@ -436,7 +436,7 @@ BinaryHeap!(Store, less) heapify(alias less = "a < b", Store)(Store s,
|
|||
return BinaryHeap!(Store, less)(s, initialSize);
|
||||
}
|
||||
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.conv : to;
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ unittest
|
|||
}
|
||||
}
|
||||
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
// Test range interface.
|
||||
import std.algorithm.comparison : equal;
|
||||
|
@ -476,7 +476,7 @@ unittest
|
|||
assert(h.equal([16, 14, 10, 9, 8, 7, 4, 3, 2, 1]));
|
||||
}
|
||||
|
||||
unittest // 15675
|
||||
@system unittest // 15675
|
||||
{
|
||||
import std.container.array : Array;
|
||||
|
||||
|
@ -485,7 +485,7 @@ unittest // 15675
|
|||
assert(heap.front == 12);
|
||||
}
|
||||
|
||||
unittest // 16072
|
||||
@system unittest // 16072
|
||||
{
|
||||
auto q = heapify!"a > b"([2, 4, 5]);
|
||||
q.insert(1);
|
||||
|
@ -501,7 +501,7 @@ unittest // 16072
|
|||
assert(r.front == 99);
|
||||
}
|
||||
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
int[] a = [4, 1, 3, 2, 16, 9, 10, 14, 8, 7];
|
||||
|
@ -510,7 +510,7 @@ unittest
|
|||
assert(dup.equal([16, 14, 10, 9, 8, 7, 4, 3, 2, 1]));
|
||||
}
|
||||
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
static struct StructWithoutDup
|
||||
{
|
||||
|
@ -540,7 +540,7 @@ unittest
|
|||
}));
|
||||
}
|
||||
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
static struct StructWithDup
|
||||
{
|
||||
|
@ -562,7 +562,7 @@ unittest
|
|||
}));
|
||||
}
|
||||
|
||||
unittest
|
||||
@system unittest
|
||||
{
|
||||
import std.internal.test.dummyrange;
|
||||
import std.algorithm.comparison : equal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue