Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed Jul 31, 2024
1 parent cc1f9f4 commit 613654f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions InternalTests.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ theorem test (n : Nat) : n * 1 = n := by

open Lean Elab Command in
elab "#evalString" s:str e:term : command => do
let msgs ← MonadMessageState.getMessages
let msgs := (← get).messages
try
MonadMessageState.setMessages {}
modify ({· with messages := {}})
elabCommand <| ← `(#eval $e)
let msgs' ← MonadMessageState.getMessages
let msgs' := (← get).messages
let [msg] := msgs'.toList
| throwError "Too many messages"
if (← msg.toString) != s.getString then
throwErrorAt e "Expected {String.quote s.getString}, got {String.quote (← msg.toString)}"
finally
MonadMessageState.setMessages msgs
modify ({· with messages := msgs})

#evalString "[[\"n * 1 = n\"]]\n"
(proofEx.highlighted[0].proofStates.data.filter (·.fst == "by") |>.map (·.snd.data.map (·.conclusion)))
Expand Down

0 comments on commit 613654f

Please sign in to comment.