Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
yj-qin authored and bobzhang committed Nov 16, 2024
1 parent 148b7c5 commit 7013fb8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
6 changes: 2 additions & 4 deletions immut/array/array_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@ test "hash" {
let l1 = @array.of([1, 2, 3, 4, 5])
let l2 = @array.of([1, 2, 3, 4, 5])
inspect!(Hash::hash(l1) == Hash::hash(l2), content="true")

let l3 = @array.of([5, 4, 3, 2, 1])
inspect!(Hash::hash(l1) == Hash::hash(l3), content="false")

let l4: @array.T[Int] = @array.of([])
let l4 : @array.T[Int] = @array.of([])
inspect!(Hash::hash(l1) == Hash::hash(l4), content="false")
inspect!(Hash::hash(l4) == Hash::hash(l4), content="true")
}
}
6 changes: 2 additions & 4 deletions immut/list/list_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,9 @@ test "hash" {
let l1 = @list.of([1, 2, 3, 4, 5])
let l2 = @list.of([1, 2, 3, 4, 5])
inspect!(Hash::hash(l1) == Hash::hash(l2), content="true")

let l3 = @list.of([5, 4, 3, 2, 1])
inspect!(Hash::hash(l1) == Hash::hash(l3), content="false")

let l4: @list.T[Int] = @list.of([])
let l4 : @list.T[Int] = @list.of([])
inspect!(Hash::hash(l1) == Hash::hash(l4), content="false")
inspect!(Hash::hash(l4) == Hash::hash(l4), content="true")
}
}
9 changes: 3 additions & 6 deletions immut/priority_queue/priority_queue_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,11 @@ test "hash" {
let pq1 = @priority_queue.of([1, 2, 3, 4, 5])
let pq2 = @priority_queue.of([1, 2, 3, 4, 5])
inspect!(Hash::hash(pq1) == Hash::hash(pq2), content="true")

let pq3 = @priority_queue.of([5, 4, 3, 2, 1])
inspect!(Hash::hash(pq1) == Hash::hash(pq3), content="true")

let pq4: @priority_queue.T[Int] = @priority_queue.new()
let pq4 : @priority_queue.T[Int] = @priority_queue.new()
inspect!(Hash::hash(pq1) == Hash::hash(pq4), content="false")
inspect!(Hash::hash(pq4) == Hash::hash(pq4), content="true")

let pq5 = @priority_queue.of([1, 2, 3, 4, 6])
inspect!(Hash::hash(pq1) == Hash::hash(pq5), content="false")
}
Expand All @@ -146,8 +143,8 @@ test "equal" {
inspect!(pq1 == pq2, content="true")
let pq3 = @priority_queue.of([5, 4, 3, 2, 1])
inspect!(pq1 == pq3, content="true")
let pq4: @priority_queue.T[Int] = @priority_queue.new()
let pq4 : @priority_queue.T[Int] = @priority_queue.new()
inspect!(pq1 == pq4, content="false")
let pq5 = @priority_queue.of([1, 2, 3])
inspect!(pq1 == pq5, content="false")
}
}
2 changes: 1 addition & 1 deletion immut/sorted_map/map_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ test "hash" {
inspect!(Hash::hash(map1) == Hash::hash(map3), content="true")
let map4 = @sorted_map.T::of([("one", 1), ("two", 2), ("three", 3)])
inspect!(Hash::hash(map1) == Hash::hash(map4), content="false")
}
}

0 comments on commit 7013fb8

Please sign in to comment.