Skip to content

Commit 75ab6cb

Browse files
committed
add gc option tests
1 parent 4ab23f9 commit 75ab6cb

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed

test/gc.expected.in

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{"env": 0}
2+
3+
{"messages":
4+
[{"severity": "info",
5+
"pos": {"line": 1, "column": 0},
6+
"endPos": {"line": 1, "column": 5},
7+
"data": "true"}]}
8+
9+
{"message": "Unknown environment."}
10+
11+
{"messages":
12+
[{"severity": "info",
13+
"pos": {"line": 1, "column": 0},
14+
"endPos": {"line": 1, "column": 5},
15+
"data": "37"}],
16+
"env": 1}
17+

test/gc.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{"cmd": "def f := 37"}
2+
3+
{"cmd": "#eval true", "gc": true}
4+
5+
{"cmd": "#eval false", "env":1}
6+
7+
{"cmd": "#eval f", "env":0}

test/gc_tactic.expected.in

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{"messages":
2+
[{"severity": "error",
3+
"pos": {"line": 1, "column": 20},
4+
"endPos": null,
5+
"data": "unexpected end of input; expected '{'"},
6+
{"severity": "error",
7+
"pos": {"line": 1, "column": 18},
8+
"endPos": {"line": 1, "column": 20},
9+
"data": "unsolved goals\n⊢ 2 = 2"}],
10+
"env": 0}
11+
12+
{"messages":
13+
[{"severity": "info",
14+
"pos": {"line": 1, "column": 0},
15+
"endPos": {"line": 2, "column": 3},
16+
"data": "Goals accomplished!"}],
17+
"env": 1}
18+
19+
{"messages":
20+
[{"severity": "error",
21+
"pos": {"line": 1, "column": 66},
22+
"endPos": null,
23+
"data": "unexpected end of input; expected '{'"},
24+
{"severity": "error",
25+
"pos": {"line": 1, "column": 64},
26+
"endPos": {"line": 1, "column": 66},
27+
"data": "unsolved goals\nP Q R : Prop\n⊢ (P → Q) → (Q → R) → P → R"}]}
28+
29+
{"messages":
30+
[{"severity": "error",
31+
"pos": {"line": 1, "column": 64},
32+
"endPos": {"line": 2, "column": 13},
33+
"data": "unsolved goals\nP Q R : Prop\nh1 : P → Q\nh2 : Q → R\np : P\n⊢ R"}]}
34+
35+
{"messages":
36+
[{"severity": "info",
37+
"pos": {"line": 3, "column": 0},
38+
"endPos": {"line": 3, "column": 6},
39+
"data": "Try this: exact h2 (h1 p)"},
40+
{"severity": "info",
41+
"pos": {"line": 1, "column": 0},
42+
"endPos": {"line": 3, "column": 6},
43+
"data": "Goals accomplished!"}]}
44+

test/gc_tactic.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{"cmd": "example : 2=2 := by"}
2+
3+
{"cmd": "example : 2=2 := by\nrfl"}
4+
5+
{"cmd": "theorem gc_demo (P Q R : Prop) : (P → Q) → (Q → R) → (P → R) := by", "gc": true}
6+
7+
{"cmd": "theorem gc_demo (P Q R : Prop) : (P → Q) → (Q → R) → (P → R) := by\nintro h1 h2 p", "gc": true}
8+
9+
{"cmd": "theorem gc_demo (P Q R : Prop) : (P → Q) → (Q → R) → (P → R) := by\nintro h1 h2 p\napply?", "gc": true}

0 commit comments

Comments
 (0)