mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 15:40:36 +03:00
findAdjacent and findAmong should be @safe
This commit is contained in:
parent
13791bf29c
commit
8bcf058c99
1 changed files with 4 additions and 4 deletions
|
@ -7210,7 +7210,7 @@ Range findAdjacent(alias pred = "a == b", Range)(Range r)
|
|||
}
|
||||
|
||||
///
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
int[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ];
|
||||
auto r = findAdjacent(a);
|
||||
|
@ -7220,7 +7220,7 @@ unittest
|
|||
|
||||
}
|
||||
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
|
||||
int[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ];
|
||||
|
@ -7266,14 +7266,14 @@ Range1 findAmong(alias pred = "a == b", Range1, Range2)(
|
|||
}
|
||||
|
||||
///
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
int[] a = [ -1, 0, 1, 2, 3, 4, 5 ];
|
||||
int[] b = [ 3, 1, 2 ];
|
||||
assert(findAmong(a, b) == a[2 .. $]);
|
||||
}
|
||||
|
||||
unittest
|
||||
@safe unittest
|
||||
{
|
||||
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
|
||||
int[] a = [ -1, 0, 2, 1, 2, 3, 4, 5 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue