Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Templated TypeInfo #3174

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 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
7 changes: 4 additions & 3 deletions posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,10 @@ endif
.PHONY : unittest
ifeq (1,$(BUILD_WAS_SPECIFIED))
unittest : $(UT_MODULES) $(addsuffix /.run,$(ADDITIONAL_TESTS))
@echo done
else
unittest : unittest-debug unittest-release
unittest-%: target
$(MAKE) -f $(MAKEFILE) unittest OS=$(OS) MODEL=$(MODEL) DMD=$(DMD) BUILD=$*
$(MAKE) -s -f $(MAKEFILE) unittest OS=$(OS) MODEL=$(MODEL) DMD=$(DMD) BUILD=$*
andralex marked this conversation as resolved.
Show resolved Hide resolved
endif

ifeq ($(OS),linux)
Expand Down Expand Up @@ -328,7 +327,9 @@ $(ROOT)/unittest/% : $(ROOT)/unittest/test_runner
# make the file very old so it builds and runs again if it fails
@touch -t 197001230123 $@
# run unittest in its own directory
$(QUIET)$(TIMELIMIT)$< $(call moduleName,$*)
# output PASS info on the same line if running in the console to cut noise
$(QUIET)$(TIMELIMIT)$< $(call moduleName,$*) \
| ([ -t 1 ] && while read line; do printf '%-80s\r' "$$line"; done || cat)
# succeeded, render the file new again
@touch $@

Expand Down
1 change: 0 additions & 1 deletion src/core/internal/array/operations.d
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ else

version (X86_64) unittest
{
pragma(msg, vectorizeable!(double[], const(double)[], double[], "+", "="));
static assert(vectorizeable!(double[], const(double)[], double[], "+", "="));
static assert(!vectorizeable!(double[], const(ulong)[], double[], "+", "="));
// Vector type are (atm.) not implicitly convertible and would require
Expand Down
7 changes: 6 additions & 1 deletion src/core/internal/dassert.d
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ private string miniFormat(V)(const scope ref V v)
import core.stdc.stdio : sprintf;
import core.stdc.string : strlen;

static if (is(V == shared T, T))
static if (is(V E == enum))
{
const E base = v;
return miniFormat(base);
}
else static if (is(V == shared T, T))
{
// Use atomics to avoid race conditions whenever possible
static if (__traits(compiles, atomicLoad(v)))
Expand Down
Loading