diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/src/CharacterSetTests.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/CharacterSetTests.cpp b/test/src/CharacterSetTests.cpp index 7013127..3663ee6 100644 --- a/test/src/CharacterSetTests.cpp +++ b/test/src/CharacterSetTests.cpp @@ -43,6 +43,20 @@ TEST(CharacterSetTests, RangeConstructor) { } } +TEST(CharacterSetTests, Range_Constructor_Reversed) { + Uri::CharacterSet cs('G', 'A'); + for (char c = 0; c < 0x7F; ++c) { + if ( + (c >= 'A') + && (c <= 'G') + ) { + ASSERT_TRUE(cs.Contains(c)); + } else { + ASSERT_FALSE(cs.Contains(c)); + } + } +} + TEST(CharacterSetTests, InitializerListConstructor) { Uri::CharacterSet cs1{'X'}; for (char c = 0; c < 0x7F; ++c) { |