mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 15:40:36 +03:00
endsWith and skipOver should be @safe
This commit is contained in:
parent
fb5f80faac
commit
838c28f198
1 changed files with 5 additions and 5 deletions
|
@ -6739,7 +6739,7 @@ if (is(typeof(binaryFun!pred(r1.front, r2.front))))
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
auto s1 = "Hello world";
|
auto s1 = "Hello world";
|
||||||
assert(!skipOver(s1, "Ha"));
|
assert(!skipOver(s1, "Ha"));
|
||||||
|
@ -6769,7 +6769,7 @@ if (is(typeof(binaryFun!pred(r.front, e))))
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
unittest {
|
@safe unittest {
|
||||||
auto s1 = "Hello world";
|
auto s1 = "Hello world";
|
||||||
assert(!skipOver(s1, 'a'));
|
assert(!skipOver(s1, 'a'));
|
||||||
assert(s1 == "Hello world");
|
assert(s1 == "Hello world");
|
||||||
|
@ -6807,7 +6807,7 @@ void skipAll(alias pred = "a == b", R, Es...)(ref R r, Es es)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
|
//scope(success) writeln("unittest @", __FILE__, ":", __LINE__, " done.");
|
||||||
auto s1 = "Hello world";
|
auto s1 = "Hello world";
|
||||||
|
@ -6922,7 +6922,7 @@ if (isBidirectionalRange!R &&
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
assert(endsWith("abc", ""));
|
assert(endsWith("abc", ""));
|
||||||
assert(!endsWith("abc", "b"));
|
assert(!endsWith("abc", "b"));
|
||||||
|
@ -6936,7 +6936,7 @@ unittest
|
||||||
assert(endsWith("abc", "x", "aaa", 'c', "sab") == 3);
|
assert(endsWith("abc", "x", "aaa", 'c', "sab") == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest
|
@safe unittest
|
||||||
{
|
{
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue