some tests

This commit is contained in:
Alessandro Mauri 2024-11-21 00:50:42 +01:00
parent f8e2c0b70c
commit 574a1f23dc
3 changed files with 250 additions and 0 deletions

14
test/test_custom_hash.c3 Normal file
View file

@ -0,0 +1,14 @@
import std::collections::map;
def Codepoint = uint;
fn uint Codepoint.hash(Codepoint code) => code < 128 ? code : ((uint)code).hash();
def CodeMap = map::HashMap(<Codepoint, Codepoint>);
fn int main()
{
CodeMap m;
m.new_init();
m.free();
return 0;
}