Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions std/uni/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ if (is(Unqual!T == T))
return SliceOverIndexed!T(a, b, x);
}

@system unittest
@safe unittest
{
int[] idxArray = [2, 3, 5, 8, 13];
auto sliced = sliceOverIndexed(0, idxArray.length, &idxArray);
Expand Down Expand Up @@ -3116,7 +3116,7 @@ private:
CowArray!SP data;
}

pure @system unittest
pure @safe unittest
{
import std.conv : to;
assert(unicode.ASCII.to!string() == "[0..128)");
Expand Down Expand Up @@ -5410,7 +5410,7 @@ pure @safe unittest
}

// cover decode fail cases of Matcher
pure @system unittest
pure @safe unittest
{
import std.algorithm.iteration : map;
import std.exception : collectException;
Expand All @@ -5427,7 +5427,7 @@ pure @system unittest
auto s = msg;
size_t idx = 0;
utf8.test(s);
}()), format("%( %2x %)", cast(ubyte[]) msg));
}()), format("%( %2x %)", cast(immutable(ubyte)[]) msg));
}
//decode failure cases UTF-16
alias fails16 = AliasSeq!([0xD811], [0xDC02]);
Expand Down Expand Up @@ -7150,7 +7150,7 @@ if (isInputRange!Input && is(immutable ElementType!Input == immutable dchar))
return genericDecodeGrapheme!true(inp);
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;

Expand Down Expand Up @@ -7233,7 +7233,7 @@ if (isInputRange!Range && is(immutable ElementType!Range == immutable dchar))

// For testing non-forward-range input ranges
version (StdUnittest)
private static struct InputRangeString
private static @safe struct InputRangeString
{
private string s;

Expand All @@ -7242,7 +7242,7 @@ private static struct InputRangeString
void popFront() { s.popFront(); }
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.array : array;
Expand Down Expand Up @@ -7366,7 +7366,7 @@ if (isInputRange!Range && is(immutable ElementType!Range == immutable dchar))
assert(reverse == "le\u0308on"); // lëon
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.range.primitives : walkLength;
Expand Down Expand Up @@ -7523,7 +7523,7 @@ public:
}

///
@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
auto g = Grapheme("A");
Expand Down Expand Up @@ -7650,15 +7650,15 @@ private:
static assert(Grapheme.sizeof == size_t.sizeof*4);


@system pure /*nothrow @nogc*/ unittest // TODO: string .front is GC and throw
@safe pure /*nothrow @nogc*/ unittest // TODO: string .front is GC and throw
{
import std.algorithm.comparison : equal;
Grapheme[3] data = [Grapheme("Ю"), Grapheme("У"), Grapheme("З")];
assert(byGrapheme("ЮУЗ").equal(data[]));
}

///
@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.algorithm.iteration : filter;
Expand Down Expand Up @@ -7704,7 +7704,7 @@ static assert(Grapheme.sizeof == size_t.sizeof*4);
assert(!g.valid);
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.algorithm.iteration : map;
Expand Down Expand Up @@ -8205,7 +8205,7 @@ package(std) auto simpleCaseFoldings(dchar ch) @safe
return Range(start, entry.size);
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.algorithm.searching : canFind;
Expand Down Expand Up @@ -8356,7 +8356,7 @@ public Grapheme decompose(UnicodeDecomposition decompType=Canonical)(dchar ch) @
}

///
@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;

Expand Down Expand Up @@ -8464,7 +8464,7 @@ Grapheme decomposeHangul(dchar ch) @safe
}

///
@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
assert(decomposeHangul('\uD4DB')[].equal("\u1111\u1171\u11B6"));
Expand Down Expand Up @@ -8504,7 +8504,7 @@ dchar composeJamo(dchar lead, dchar vowel, dchar trailing=dchar.init) pure nothr
assert(composeJamo('A', '\u1171') == dchar.init);
}

@system unittest
@safe unittest
{
import std.algorithm.comparison : equal;
import std.conv : text;
Expand Down Expand Up @@ -10105,7 +10105,7 @@ if (isSomeString!S || (isRandomAccessRange!S && hasLength!S && hasSlicing!S && i
assert(s2 !is s1);
}

@system unittest
@safe unittest
{
static void doTest(C)(const(C)[] s, const(C)[] trueUp, const(C)[] trueLow)
{
Expand All @@ -10118,9 +10118,9 @@ if (isSomeString!S || (isRandomAccessRange!S && hasLength!S && hasSlicing!S && i
assert(low == trueLow, format(diff, low, trueLow));
assert(up == trueUp, format(diff, up, trueUp));
assert(lowInp == trueLow,
format(diff, cast(ubyte[]) s, cast(ubyte[]) lowInp, cast(ubyte[]) trueLow));
format(diff, cast(const(ubyte)[]) s, cast(const(ubyte)[]) lowInp, cast(const(ubyte)[]) trueLow));
assert(upInp == trueUp,
format(diff, cast(ubyte[]) s, cast(ubyte[]) upInp, cast(ubyte[]) trueUp));
format(diff, cast(const(ubyte)[]) s, cast(const(ubyte)[]) upInp, cast(const(ubyte)[]) trueUp));
}
static foreach (S; AliasSeq!(dstring, wstring, string))
{{
Expand Down