public void CodePointIsControl() { for (uint i = 0; i <= 0x10FFFFu; i++) { var cp = new CodePoint(i); if (cp.IsBmp) { Assert.Equal(CodePoint.IsControl(new CodePoint(i)), char.IsControl((char)i)); } else { // Per the Unicode stability policy, the set of control characters // is forever fixed at [ U+0000..U+001F ], [ U+007F..U+009F ]. No // characters will ever be added to or removed from the "control characters" // group. See https://www.unicode.org/policies/stability_policy.html. Assert.False(CodePoint.IsControl(cp)); } } }