diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-02-28 17:09:29 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-02-28 17:09:29 +0000 |
| commit | 092dcd174f76bc31a43e03eb4caef4d99cae3aa6 (patch) | |
| tree | d043b6027d4ce03858c4266c18a0cb6a18a06eea /src/unit_tests.cc | |
| parent | f88e873f55362bdc85b1461cf573e8cd3fc087fa (diff) | |
Add StaticStringStorage for storing string literals
Diffstat (limited to 'src/unit_tests.cc')
| -rw-r--r-- | src/unit_tests.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/unit_tests.cc b/src/unit_tests.cc index ec9bb64c..f7ec5eab 100644 --- a/src/unit_tests.cc +++ b/src/unit_tests.cc @@ -105,6 +105,8 @@ void test_utf8() kak_assert(utf8::codepoint(str.begin() + 2, str.end()) == 0x00EF); } +constexpr auto ss_static_str = static_storage("yeehaa"); + void test_string() { kak_assert(String("youpi ") + "matin" == "youpi matin"); @@ -137,6 +139,8 @@ void test_string() kak_assert(subsequence_match("tchou kanaky", "knk")); kak_assert(subsequence_match("tchou kanaky", "tchou kanaky")); kak_assert(not subsequence_match("tchou kanaky", "tchou kanaky")); + + kak_assert(ss_static_str.refcount == -1); } void test_keys() |
