some tests
This commit is contained in:
parent
f8e2c0b70c
commit
574a1f23dc
3 changed files with 250 additions and 0 deletions
14
test/test_custom_hash.c3
Normal file
14
test/test_custom_hash.c3
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue