| Index: test/compiled/String.cpp |
| diff --git a/test/compiled/String.cpp b/test/compiled/String.cpp |
| index e969ccde556eb61d9b3b67a6303fca1eddec8b9b..cf8409d3beffc224c2cdf3da3ffc0c0ae12dabe9 100644 |
| --- a/test/compiled/String.cpp |
| +++ b/test/compiled/String.cpp |
| @@ -21,6 +21,27 @@ |
| ABP_NS_USING |
| +void checkConstexprCorrectness() |
| +{ |
| + static constexpr DependentString s(u"Hello world!"); |
| + static constexpr DependentString s2; |
| + static constexpr DependentString s3(u"Hello again!", 12); |
| + static constexpr DependentString s4 = u"Hello again!"_str; |
| + |
| + static_assert(s.length() == 12, "Length should be 12"); |
| + static_assert(s3.equals(s4), "Strings should be equal"); |
| + static_assert(s4 == s3, "Strings should be equal"); |
| + |
| + static_assert(!s.empty(), "String should not be empty"); |
| + static_assert(!s.is_writable(), "String should not be writable"); |
| + static_assert(!s.is_deleted(), "String should not be deleted"); |
| + |
| + static_assert(s.data()[0] == 'H', "First character should be 'H'"); |
| + static_assert(s[1] == 'e', "Second character should be 'e'"); |
| + |
| + static_assert(s2.is_invalid(), "String should be invalid"); |
|
Eric
2018/03/15 18:33:54
Does calling empty(), is_writable(), etc. on inval
sergei
2018/03/16 13:43:26
Could you please create an issue for that? Since n
|
| +} |
| + |
| TEST(TestString, constructInvalidDependentString) |
| { |
| DependentString s; |