std::ascii moved into std::core::ascii. Old _m variants are deprecated, as is uint methods.

This commit is contained in:
Christoffer Lerno
2025-05-02 18:06:28 +02:00
parent bfccc303d1
commit 8a09b2e5f7
8 changed files with 196 additions and 80 deletions

View File

@@ -0,0 +1,28 @@
module std::core::ascii @test;
import std::hash;
fn void test_all()
{
long x = 0;
Crc64 check;
check.init();
for (char c = 0; c < 255; c++)
{
check.updatec(c);
if (c.is_upper()) check.updatec(1);
if (c.is_lower()) check.updatec(2);
if (c.is_alpha()) check.updatec(4);
if (c.is_bdigit()) check.updatec(8);
if (c.is_odigit()) check.updatec(16);
if (c.is_xdigit()) check.updatec(16);
if (c.is_digit()) check.updatec(32);
if (c.is_graph()) check.updatec(64);
check.updatec(128);
if (c.is_punct()) check.updatec(1);
if (c.is_cntrl()) check.updatec(2);
if (c.is_space()) check.updatec(4);
check.updatec(c.to_upper());
check.updatec(c.to_lower());
}
test::eq(check.final(), 7327699757963224526UL);
}