test: add tests for incomplete UTF-8 sequences in codePointAt and remove TODO comment

Add test cases for single-byte incomplete two-octet and three-octet UTF-8 sequences
in code_point_at_incomplete.wren, and remove the resolved TODO comment about testing
truncated UTF-8 buffer reads in wrenUtf8Decode.
This commit is contained in:
Bob Nystrom
2015-06-27 15:11:58 +00:00
parent ab12bc97e0
commit f481ea7fe6
2 changed files with 7 additions and 3 deletions
-1
View File
@@ -143,7 +143,6 @@ int wrenUtf8Decode(const uint8_t* bytes, uint32_t length)
}
// Don't read past the end of the buffer on truncated UTF-8.
// TODO: Test this.
if (remainingBytes > length - 1) return -1;
while (remainingBytes > 0)