diff --git a/std/ascii.d b/std/ascii.d index 07f4a6a00..847466e63 100644 --- a/std/ascii.d +++ b/std/ascii.d @@ -146,9 +146,14 @@ enum ControlChar : char /// @safe pure nothrow @nogc unittest { + import std.algorithm.comparison, std.algorithm.searching, std.range, std.traits; + // Because all ASCII characters fit in char, so do these static assert(ControlChar.ack.sizeof == 1); + // All control characters except del are in row starting from 0 + static assert(EnumMembers!ControlChar.only.until(ControlChar.del).equal(iota(32))); + static assert(ControlChar.nul == '\0'); static assert(ControlChar.bel == '\a'); static assert(ControlChar.bs == '\b');