mirror of
https://github.com/dlang/phobos.git
synced 2025-05-05 01:20:40 +03:00
Added CTFE-ability tests to some stuff in std.conv and std.string.
These tests are for the functionality that std.metastrings provides, and we need to ensure that the normal functions which are replacing those in std.metastrings continue to work in CTFE.
This commit is contained in:
parent
20e6064ea8
commit
9bd4044536
2 changed files with 17 additions and 0 deletions
|
@ -2554,6 +2554,10 @@ unittest
|
|||
|
||||
assertThrown!FormatException(format("foo %s"));
|
||||
assertThrown!FormatException(format("foo %s", 123, 456));
|
||||
|
||||
//Test CTFE-ability of format.
|
||||
static assert(format("hel%slo%s%s%s", "world", -138, 'c', true) ==
|
||||
"helworldlo-138ctrue", "[" ~ s ~ "]");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue