UnicodeTests.cpp 458 B

123456789101112131415
  1. #include "../Tests.hpp"
  2. #include "core/Test.hpp"
  3. #include "core/Unicode.hpp"
  4. void testUnicode(void) {
  5. for(u32 c = 0; c < 0x10FFFF; c += 50) {
  6. Core::UTF8 u = Core::convertUnicodeToUTF8(c);
  7. for(u32 k = 1; k < u.length; k++) {
  8. TEST_TRUE(Core::isUTF8Remainder(u.data[k]));
  9. }
  10. TEST_TRUE(u.length >= 1);
  11. TEST(u.length, Core::getUTF8Length(u.data[0]));
  12. TEST(c, Core::convertUTF8toUnicode(u));
  13. }
  14. }