From e1348479d6b841f367d7a395835e31deee0a337d Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sat, 26 Apr 2025 05:59:18 +0200 Subject: Cleanup --- runtime.c | 12 ++++++------ 1 file 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") { -- cgit v1.2.3