test: Source location extraction
This commit is contained in:
parent
9d2a999a4f
commit
5e61282660
|
@ -106,8 +106,8 @@ def test_symbol_location : TestT IO Unit := do
|
||||||
let .ok result ← Environment.inspect { name := "Nat.le_of_succ_le", source? := .some true } (options := {}) | fail "Inspect failed"
|
let .ok result ← Environment.inspect { name := "Nat.le_of_succ_le", source? := .some true } (options := {}) | fail "Inspect failed"
|
||||||
checkEq "module" result.module? <| .some "Init.Data.Nat.Basic"
|
checkEq "module" result.module? <| .some "Init.Data.Nat.Basic"
|
||||||
|
|
||||||
-- Doesn't work for symbols in `Init` for some reason
|
-- Extraction of source doesn't work for symbols in `Init` for some reason
|
||||||
--checkEq "file" result.sourceUri? <| .some "??"
|
checkTrue "file" result.sourceUri?.isNone
|
||||||
checkEq "pos" (result.sourceStart?.map (·.column)) <| .some 0
|
checkEq "pos" (result.sourceStart?.map (·.column)) <| .some 0
|
||||||
checkEq "pos" (result.sourceEnd?.map (·.column)) <| .some 88
|
checkEq "pos" (result.sourceEnd?.map (·.column)) <| .some 88
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue