summaryrefslogtreecommitdiff
path: root/test/test_common.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-29 23:16:46 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-29 23:16:46 -0500
commit8dcb1de91e15ff7fc66279cd9cd9ad8a70f624e0 (patch)
treec73840b15a074cf37f59bc3b2eff56cde982d74f /test/test_common.hpp
parent8ce397e8c0a83e49e390de9deb73d588e4931ecf (diff)
u8 string literals
Diffstat (limited to 'test/test_common.hpp')
-rw-r--r--test/test_common.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_common.hpp b/test/test_common.hpp
index 3d7ecba..fd16364 100644
--- a/test/test_common.hpp
+++ b/test/test_common.hpp
@@ -30,31 +30,31 @@ int unlink_cb(const char* fpath, const struct stat* sb_unused, int typeflag, str
namespace fud {
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
-#define MULTI_BYTE_LITERAL "test今日素敵はですねƩ®😀z"
+#define MULTI_BYTE_LITERAL u8"test今日素敵はですねƩ®😀z"
static_assert(sizeof(MULTI_BYTE_LITERAL) == 38); // NOLINT(readability-magic-numbers)
-#define TWO_BYTE "Ʃ"
+#define TWO_BYTE u8"Ʃ"
static_assert(sizeof(TWO_BYTE) == 2 + 1);
-#define THREE_BYTE "今"
+#define THREE_BYTE u8"今"
static_assert(sizeof(THREE_BYTE) == 3 + 1);
-#define FOUR_BYTE "😀"
+#define FOUR_BYTE u8"😀"
static_assert(sizeof(FOUR_BYTE) == 4 + 1);
-#define CHQUOTE "why waste time learning, when ignorance is instantaneous?"
+#define CHQUOTE u8"why waste time learning, when ignorance is instantaneous?"
-#define LOWERCASE_CHARS "abcdefghijklmnopqrstuvwxyz"
-#define UPPERCASE_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-#define DECIMAL_CHARS "0123456789"
-#define HEX_LOWER "abcdef"
-#define HEX_UPPER "ABCDEF"
+#define LOWERCASE_CHARS u8"abcdefghijklmnopqrstuvwxyz"
+#define UPPERCASE_CHARS u8"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+#define DECIMAL_CHARS u8"0123456789"
+#define HEX_LOWER u8"abcdef"
+#define HEX_UPPER u8"ABCDEF"
#define HEX_CHARS HEX_LOWER HEX_UPPER DECIMAL_CHARS
#define ALPHA_CHARS LOWERCASE_CHARS UPPERCASE_CHARS
#define ALPHA_NUMERIC_CHARS ALPHA_CHARS DECIMAL_CHARS
-#define PUNCTUATION_CHARS "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+#define PUNCTUATION_CHARS u8"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
#define GRAPHICAL_CHARS ALPHA_NUMERIC_CHARS PUNCTUATION_CHARS
-#define BLANK_CHARS " \t"
-#define SPACE_CHARS BLANK_CHARS "\v\r\n"
-#define PRINTABLE_CHARS " " LOWERCASE_CHARS UPPERCASE_CHARS DECIMAL_CHARS PUNCTUATION_CHARS
-#define CHARACTER_SET LOWERCASE_CHARS " " UPPERCASE_CHARS
+#define BLANK_CHARS u8" \t"
+#define SPACE_CHARS BLANK_CHARS u8"\v\r\n"
+#define PRINTABLE_CHARS u8" " LOWERCASE_CHARS UPPERCASE_CHARS DECIMAL_CHARS PUNCTUATION_CHARS
+#define CHARACTER_SET LOWERCASE_CHARS u8" " UPPERCASE_CHARS
// NOLINTEND(cppcoreguidelines-macro-usage)
constexpr size_t charSetSize = sizeof(CHARACTER_SET) - 1;