Skip to content

Commit

Permalink
Merge pull request #5 from leanprover-community/determ-tests
Browse files Browse the repository at this point in the history
chore: make tests deterministic
  • Loading branch information
hargoniX authored Nov 4, 2024
2 parents 0f1430e + 64a9e5b commit 42dc02b
Showing 1 changed file with 9 additions and 28 deletions.
37 changes: 9 additions & 28 deletions Test/Tactic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -150,31 +150,12 @@ theorem testBit_pred :
(Bool.xor ((List.range i).all fun j => ! testBit x j) (testBit x i))) := by
plausible

-- FIXME: the following two tests have become non-deterministic.

-- /--
-- error:
-- ===================
-- Found a counter-example!
-- f := 1
-- issue: ULift.up 1 = ULift.up 0 does not hold
-- (1 shrinks)
-- -------------------
-- -/
-- #guard_msgs in
-- theorem ulift_nat (f : ULift.{1} Nat) : f = ⟨0⟩ := by
-- plausible

-- /--
-- error:
-- ===================
-- Found a counter-example!
-- α := "ULift Int"
-- l := [0]
-- issue: [ULift.up 0] = [ULift.up 0, ULift.up 0] does not hold
-- (1 shrinks)
-- -------------------
-- -/
-- #guard_msgs in
-- theorem type_u (α : Type u) (l : List α) : l = l ++ l := by
-- plausible
/-- error: Found a counter-example! -/
#guard_msgs in
theorem ulift_nat (f : ULift.{1} Nat) : f = ⟨0⟩ := by
plausible (config := {quiet := true})

/-- error: Found a counter-example! -/
#guard_msgs in
theorem type_u (α : Type u) (l : List α) : l = l ++ l := by
plausible (config := {quiet := true})

0 comments on commit 42dc02b

Please sign in to comment.