]> Kevux Git Server - fll/commit
Update: Add some unit tests for f_utf.
authorKevin Day <thekevinday@gmail.com>
Tue, 14 Jun 2022 00:02:51 +0000 (19:02 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 14 Jun 2022 00:02:51 +0000 (19:02 -0500)
commit294565e457f1a9756fb7e5902fec751cbe6d9691
tree72e94f957ab8fbd72d694ce7f435bd92dbffb6bc
parent2894bf88597b44d5f8ffd1ab36a53e6455facf4b
Update: Add some unit tests for f_utf.

Add the structure for the remaining tests.
The (currently) unused tests are just copy and pastes and may need changes.

With the exception of the "valid" tests, these unit tests use statically generated data files containing bytesequences (unsigned 32-bit) in base-10 format.
The base-10 format representation of the bytesequence is used for easy reading using standard libc functions.

These static data files are generated using a combination of the Unicode database codepoints, a script I wrote, and the "unicode" program.
The Unicode codepoints used for each generated bytesequence set are also provided.

This implements the following tests:
- control
- digit
- emoji
- symbol
- valid

The intent of this is to test the entire spectrum of valid codepoints (except for the "valid" tests which tests every single possible value).
Due to every single value being tested by "valid" tests for both f_utf_is_valid() and f_utf_character_is_valid() results in a long running test.
75 files changed:
level_0/f_utf/data/build/settings-tests
level_0/f_utf/data/tests/bytesequences/control-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/bytesequences/digit-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/bytesequences/emoji-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/bytesequences/symbol-all.txt [moved from level_0/f_utf/data/tests/bytesequences/symbols-all.txt with 100% similarity]
level_0/f_utf/data/tests/codepoints/control-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/codepoints/digit-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/codepoints/emoji-all.txt [new file with mode: 0644]
level_0/f_utf/data/tests/codepoints/symbol-all.txt [moved from level_0/f_utf/data/tests/codepoints/symbols-all.txt with 100% similarity]
level_0/f_utf/tests/unit/c/data-utf.c
level_0/f_utf/tests/unit/c/data-utf.h
level_0/f_utf/tests/unit/c/test-utf-character_is_alphabetic.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_alphabetic.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_combining.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_combining.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_control.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_control.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_digit.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_digit.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_emoji.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_emoji.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_numeric.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_numeric.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_phonetic.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_phonetic.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_subscript.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_subscript.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_superscript.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_superscript.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_surrogate.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_surrogate.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_symbol.c
level_0/f_utf/tests/unit/c/test-utf-character_is_valid.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_valid.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_whitespace.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_whitespace.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_wide.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_wide.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_word.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_word.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_zero_width.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-character_is_zero_width.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_alphabetic.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_alphabetic.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_combining.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_combining.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_control.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_control.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_digit.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_digit.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_emoji.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_emoji.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_numeric.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_numeric.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_phonetic.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_phonetic.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_subscript.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_subscript.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_superscript.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_superscript.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_surrogate.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_surrogate.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_symbol.c
level_0/f_utf/tests/unit/c/test-utf-is_valid.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_valid.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_whitespace.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_whitespace.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_wide.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_wide.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_word.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_word.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_zero_width.c [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf-is_zero_width.h [new file with mode: 0644]
level_0/f_utf/tests/unit/c/test-utf.c
level_0/f_utf/tests/unit/c/test-utf.h