mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Unittest loop over first 32 control chars to ensure they are lined up.
This commit is contained in:
parent
778e307816
commit
c36d609f01
1 changed files with 5 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue