[Issue 16985] New: Enable runnable unittest on dlang.org after 2.073 release
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Dec 19 09:09:21 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16985
Issue ID: 16985
Summary: Enable runnable unittest on dlang.org after 2.073
release
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: greeenify at gmail.com
With https://github.com/dlang/dlang.org/pull/1297 running unittest directly on
dlang.org is supported.
However, to have a smooth start it has only been enabled for /phobos-prerelease
Moreover, the added imports to the unittest blocks need to propagate to stable,
so on the next release (2.073) enabling the runnable unittest option for all
supported modules could be attempted.
1) At the moment the js/run_examples script is injected via the navbar:
https://github.com/dlang/dlang.org/blob/master/std_navbar-prerelease.ddoc#L15
After 2.073 it can be moved to a more general place
2) It seems that the simple regex to rewrite assert's into writeln isn't good
enough for more non-trivial cases, e.g. it has problems with the following:
assert(!find!("toLower(a) == b")(s, "hello").empty);
-> writeln(!find!("toLower(a)); // b")(s, "hello").empty
https://dlang.org/phobos-prerelease/std_algorithm_searching.html#find
https://github.com/dlang/phobos/blob/master/std/algorithm/searching.d#L1498
3) Related: Extend the list of runnable modules:
https://issues.dlang.org/show_bug.cgi?id=16984
--
More information about the Digitalmars-d-bugs
mailing list