;; This test ensure check test fails for wrong assertion
(function f (i64) i64 :merge (min old new))
(set (f 1) 4)
(set (f 1) 5)
(check (= (f 1) 4))
(fail (check (= (f 1) 2)))
(delete (f 1))
(fail (check (= (f 1) 4)))
(function g (i64 i64) i64 :merge (min old new))
(set (g 1 2) 3)
(set (g 2 3) 3)
(check (= (g 1 2) (g 2 3)))
(fail (check (!= (g 1 2) (g 2 3))))
(fail (check (= (g 0 2) (g 2 3))))
(check (= x (g 1 2)))
(fail (check (= x (g 1 3))))
(check (= x (g 1 2)) (= y (g 2 3)) (= x y))
(fail (check (= x (g 0 0)) (= y (g 1 1)) (= x y)))