Skip to content

Commit

Permalink
std.string.capitalize_unittest_example
Browse files Browse the repository at this point in the history
* added unittest doc example

some attributes
  • Loading branch information
burner committed Oct 26, 2015
1 parent cf22992 commit 93511d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions std/string.d
Expand Up @@ -2224,6 +2224,13 @@ S capitalize(S)(S s) @trusted pure
return changed ? cast(S)retval : s;
}

///
pure @safe unittest
{
assert(capitalize("hello") == "Hello");
assert(capitalize("World") == "World");
}

@trusted pure unittest
{
import std.conv : to;
Expand Down

0 comments on commit 93511d5

Please sign in to comment.