This PR significantly improves the test coverage of the language server, providing at least a single basic test for every request that is used by the client. It also implements infrastructure for testing all of these requests, e.g. the ability to run interactive tests in a project context and refactors the interactive test runner to be more maintainable. Finally, it also fixes a small bug with the recently implemented unknown identifier code actions for auto-implicits (#10442) that was discovered in testing, where the "import all unambiguous unknown identifiers" code action didn't work correctly on auto-implicit identifiers.
37 lines
838 B
Text
37 lines
838 B
Text
--
|
|
example : 0 < 2 :=
|
|
Nat.lt_trans Nat.zero_lt_one (Nat.lt_succ_self _)
|
|
--^ termGoal
|
|
--^ termGoal
|
|
--^ termGoal
|
|
--^ termGoal
|
|
--^ termGoal
|
|
|
|
example : Option Unit := do
|
|
let y : Int ← none
|
|
let x := Nat.zero
|
|
--^ termGoal
|
|
return ()
|
|
|
|
example (m n : Nat) : m < n :=
|
|
Nat.lt_trans _ _
|
|
--^ termGoal
|
|
--^ termGoal
|
|
|
|
example : True := sorry
|
|
--^ termGoal
|
|
|
|
example : ∀ n, n < n + 42 :=
|
|
fun n => Nat.lt_of_le_of_lt (Nat.le_add_right n 41) (Nat.lt_succ_self _)
|
|
--^ termGoal
|
|
--^ termGoal
|
|
|
|
example : ∀ n, n < 1 + n := by
|
|
intro n
|
|
rw [Nat.add_comm]
|
|
--^ termGoal
|
|
exact Nat.lt_succ_self _
|
|
--^ termGoal
|
|
|
|
#check fun (n m : Nat) => m
|
|
--^ termGoal
|