Skip to content

Commit

Permalink
chore: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake committed Jan 2, 2024
1 parent 504dabf commit f2b49c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/test/stdlib/hash.test.gr
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ let chars = String.explode(
)
let charList = Array.toList(chars)

assert uniq(List.map(Hash.hash, charList))
assert uniq(List.map(a => Hash.hash(a), charList))
Array.forEach(c => assert Hash.hash(c) == Hash.hash(c), chars)

enum rec Variants {
Expand Down Expand Up @@ -172,3 +172,6 @@ assert Hash.hash({ num: 0, var: A, str: "" }) ==

assert Hash.hash(Bytes.fromString("foo")) == Hash.hash(Bytes.fromString("foo"))
assert Hash.hash(Bytes.fromString("foo")) != Hash.hash(Bytes.fromString("bar"))

assert Hash.hash("test", seed=1) == -1015171190
assert Hash.hash("test", seed=2) == 805482466

0 comments on commit f2b49c4

Please sign in to comment.