Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/core/atomic.d
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ private
////////////////////////////////////////////////////////////////////////////////


version (unittest)
version (CoreUnittest)
{
void testXCHG(T)(T val) pure nothrow @nogc @trusted
in
Expand Down
4 changes: 2 additions & 2 deletions src/core/internal/array/operations.d
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ bool contains(T)(const scope T[] ary, const scope T[] vals...)

// tests

version (unittest) template TT(T...)
version (CoreUnittest) template TT(T...)
{
alias TT = T;
}

version (unittest) template _arrayOp(Args...)
version (CoreUnittest) template _arrayOp(Args...)
{
alias _arrayOp = arrayOp!Args;
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/internal/parseoptions.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool parseOptions(CFG)(ref CFG cfg, string opt)
static if (is(typeof(__traits(getMember, CFG, "help"))))
if (name == "help")
{
version (unittest) {} else
version (CoreUnittest) {} else
cfg.help();
opt = skip!isspace(tail);
continue;
Expand Down Expand Up @@ -135,7 +135,7 @@ private:

bool optError(const scope char[] msg, const scope char[] name, const(char)[] errName)
{
version (unittest) if (inUnittest) return false;
version (CoreUnittest) if (inUnittest) return false;

fprintf(stderr, "%.*s %.*s option '%.*s'.\n",
cast(int)msg.length, msg.ptr,
Expand Down Expand Up @@ -242,7 +242,7 @@ do

bool parseError(const scope char[] exp, const scope char[] opt, const scope char[] got, const(char)[] errName)
{
version (unittest) if (inUnittest) return false;
version (CoreUnittest) if (inUnittest) return false;

fprintf(stderr, "Expecting %.*s as argument for %.*s option '%.*s', got '%.*s' instead.\n",
cast(int)exp.length, exp.ptr,
Expand All @@ -254,7 +254,7 @@ bool parseError(const scope char[] exp, const scope char[] opt, const scope char

size_t min(size_t a, size_t b) { return a <= b ? a : b; }

version (unittest) __gshared bool inUnittest;
version (CoreUnittest) __gshared bool inUnittest;

unittest
{
Expand Down
3 changes: 2 additions & 1 deletion src/core/internal/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ template staticIota(int beg, int end)
}

private struct __InoutWorkaroundStruct {}
@property T rvalueOf(T)(T val) { return val; }
@property T rvalueOf(T)(inout __InoutWorkaroundStruct = __InoutWorkaroundStruct.init);
@property ref T lvalueOf(T)(inout __InoutWorkaroundStruct = __InoutWorkaroundStruct.init);

Expand Down Expand Up @@ -466,7 +467,7 @@ template staticMap(alias F, T...)
}

// std.exception.assertCTFEable
version (unittest) package(core)
version (CoreUnittest) package(core)
void assertCTFEable(alias dg)()
{
static assert({ cast(void) dg(); return true; }());
Expand Down
2 changes: 1 addition & 1 deletion src/core/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ T* emplace(T, Args...)(void[] chunk, auto ref Args args)
}
}

version (unittest)
version (CoreUnittest)
{
//Ambiguity
private struct __std_conv_S
Expand Down
2 changes: 1 addition & 1 deletion src/core/sys/windows/basetsd.d
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ package mixin template AlignedStr(int alignVal, string name, string memberlist,
mixin( _alignSpec ~ " struct " ~ name ~" { " ~ _alignSpec ~":"~ memberlist~" }" );
}

version (unittest) {
version (CoreUnittest) {
private mixin AlignedStr!(16, "_Test_Aligned_Str", q{char a; char b;});
private mixin AlignedStr!(0, "_Test_NoAligned_Str", q{char a; char b;});
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/thread/fiber.d
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ unittest {
assert( composed.state == Fiber.State.TERM );
}

version (unittest)
version (CoreUnittest)
{
class TestFiber : Fiber
{
Expand Down
Loading