forked from cerc-io/assemblyscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhash.ts
More file actions
31 lines (27 loc) · 702 Bytes
/
hash.ts
File metadata and controls
31 lines (27 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { HASH } from "util/hash";
function check(hash: u32): bool {
return true;
}
check(HASH<string | null>(null));
check(HASH<string>(""));
check(HASH<string>("a"));
check(HASH<string>("ab"));
check(HASH<string>("abc"));
check(HASH<string>("abcd"));
check(HASH<string>("abcde"));
check(HASH<string>("abcdef"));
check(HASH<string>("abcdefg"));
check(HASH<string>("abcdefgh"));
check(HASH<string>("abcdefghi"));
check(HASH<f32>(0.0));
check(HASH<f32>(1.0));
check(HASH<f32>(1.1));
check(HASH<f32>(-0));
check(HASH<f32>(Infinity));
check(HASH<f32>(NaN));
check(HASH<f64>(0.0));
check(HASH<f64>(1.0));
check(HASH<f64>(1.1));
check(HASH<f64>(-0));
check(HASH<f64>(Infinity));
check(HASH<f64>(NaN));