summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2025-04-26 05:59:18 +0200
committerMitya Selivanov <automainint@guattari.tech>2025-04-26 05:59:18 +0200
commite1348479d6b841f367d7a395835e31deee0a337d (patch)
tree6ad6cdb9fc7a2338bf64b811663b190082f15095
parentba9fa367c824b515a66e28368ccf24757f02db93 (diff)
downloadreduced_system_layer-e1348479d6b841f367d7a395835e31deee0a337d.zip
Cleanup
-rw-r--r--runtime.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime.c b/runtime.c
index 620e6ef..4549782 100644
--- a/runtime.c
+++ b/runtime.c
@@ -1354,8 +1354,6 @@ i8 utf8_write(c32 c, c8 *buffer) {
}
i8 utf16_len(c32 c) {
- // TODO: Testing.
-
if (c >= 0x000000 && c <= 0x00d7ff) return 1;
if (c >= 0x00e000 && c <= 0x00ffff) return 1;
if (c >= 0x010000 && c <= 0x10ffff) return 2;
@@ -1363,8 +1361,6 @@ i8 utf16_len(c32 c) {
}
UTF16_Char utf16_read(i64 len, c16 *s) {
- // TODO: Testing.
-
if ( len >= 1 &&
(s[0] & 0x8000) == 0)
return (UTF16_Char) {
@@ -1384,8 +1380,6 @@ UTF16_Char utf16_read(i64 len, c16 *s) {
}
i8 utf16_write(c32 c, c16 *buffer) {
- // TODO: Testing.
-
if ((c >= 0x0000 && c <= 0xd7ff)
|| (c >= 0xe000 && c <= 0xffff)) {
buffer[0] = (c16) c;
@@ -5183,6 +5177,12 @@ TEST("utf8") {
REQUIRE_EQ(utf8_len((1 << 11)), 3);
REQUIRE_EQ(utf8_len((1 << 16) - 1), 3);
REQUIRE_EQ(utf8_len((1 << 16)), 4);
+
+ // TODO
+}
+
+TEST("utf16") {
+ // TODO
}
TEST("time sanity") {