This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
25 lines
824 B
Text
25 lines
824 B
Text
module
|
|
|
|
import Lean.Elab.Tactic.Doc
|
|
|
|
/-!
|
|
This test checks that the first tokens are found for the tactics that ship with Lean when in a
|
|
module.
|
|
|
|
In the past, the first token detection code attempted to process the descriptor in the environment;
|
|
this failed in modules because the parser was not loaded. This test, along with tacticDocAllNonmod,
|
|
check that the code works correctly both in and out of modules.
|
|
-/
|
|
|
|
open Lean.Elab.Tactic.Doc
|
|
|
|
#guard_msgs in
|
|
open Lean in
|
|
#eval do
|
|
let docs ← allTacticDocs
|
|
let userNames := docs.map TacticDoc.userName
|
|
if userNames.size < 50 then
|
|
throwError "Implausibly few user names found: {userNames}"
|
|
for n in userNames do
|
|
if n.startsWith "Lean.Parser.Tactic" && n ≠ "Lean.Parser.Tactic.nestedTactic" then
|
|
logError "Didn't find a first token for tactic parser {n}"
|