test(emacs/lean-info-test): add test cases for goal visualization

[skip ci]
This commit is contained in:
Soonho Kong 2014-10-29 17:08:12 -07:00
parent 6973d3e7aa
commit 5ad312f6ce

View file

@ -246,7 +246,120 @@
"⊢ and b c")))
'(("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ a")
("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ and b c")))))
("a : Prop," "b : Prop," "c : Prop," "H_1 : a," "H_2 : b," "H_3 : c" "⊢ and b c"))))
(should (equal (lean-info-proofstate-extract-conclusion
'("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ b ∧ c"
"..."))
'("⊢ b ∧ c" "...")))
(should (equal (lean-info-proofstate-extract-premises
'("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ b ∧ c"
"..."))
'("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c")))
(should (equal (lean-info-proofstate-states-str
(lean-info-proofstate-parse
'("-- PROOF_STATE|6|17"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a"
"--"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ and b c"))
'show-all)
(string-join '("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a"
""
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ and b c") "\n")))
(should (equal (lean-info-proofstate-states-str
(lean-info-proofstate-parse
'("-- PROOF_STATE|6|17"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a"
"--"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ and b c"))
'show-first)
(string-join '("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a") "\n")))
(should (equal (lean-info-proofstate-states-str
(lean-info-proofstate-parse
'("-- PROOF_STATE|6|17"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a"
"--"
"a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ and b c"))
'show-first-and-other-conclusions)
(string-join '("a : Prop,"
"b : Prop,"
"c : Prop,"
"H_1 : a,"
"H_2 : b,"
"H_3 : c"
"⊢ a"
""
"⊢ and b c") "\n"))))
(ert-deftest lean-test-info-pos ()
"Test lean-info-pos"