test: basic compiler tests for findJoinPoints
This commit is contained in:
parent
f912349a29
commit
576a4ec2c5
2 changed files with 24 additions and 0 deletions
19
tests/lean/CompilerFindJoinPoints.lean
Normal file
19
tests/lean/CompilerFindJoinPoints.lean
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import Lean.Compiler.Main
|
||||
import Lean.Compiler.LCNF.Testing
|
||||
import Lean.Elab.Do
|
||||
|
||||
open Lean
|
||||
open Lean.Compiler.LCNF
|
||||
|
||||
-- Run compilation twice to avoid the output caused by the inliner
|
||||
#eval Compiler.compile #[``Lean.Meta.synthInstance, ``Lean.Elab.Term.Do.elabDo]
|
||||
|
||||
@[cpass]
|
||||
def findJoinPointFixTest : PassInstaller := Testing.assertIsAtFixPoint `findJoinPoints
|
||||
|
||||
@[cpass]
|
||||
def cseSizeTest : PassInstaller :=
|
||||
Testing.assertReducesOrPreservesSize `findJoinPoints `findJoinPointsSizeLeq "findJoinPoints increased size of declaration"
|
||||
|
||||
set_option trace.Compiler.test true in
|
||||
#eval Compiler.compile #[``Lean.Meta.synthInstance, ``Lean.Elab.Term.Do.elabDo]
|
||||
5
tests/lean/CompilerFindJoinPoints.lean.expected.out
Normal file
5
tests/lean/CompilerFindJoinPoints.lean.expected.out
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
[Compiler.test] Starting condition test findJoinPointsSizeLeq for findJoinPoints
|
||||
[Compiler.test] Condition test findJoinPointsSizeLeq for findJoinPoints successful
|
||||
[Compiler.test] Running fixpoint test for findJoinPoints
|
||||
[Compiler.test] Fixpoint test for findJoinPoints successful
|
||||
Loading…
Add table
Reference in a new issue