Skip to content

Commit ade3a03

Browse files
committed
test: adjust tests
1 parent d3792d1 commit ade3a03

File tree

5 files changed

+48
-48
lines changed

5 files changed

+48
-48
lines changed

BatteriesTest/lemma_cmd.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Batteries.Tactic.Lemma
33
-- lemma disabled by default
44
/--
55
info: Try this:
6-
theorem
6+
[apply] theorem
77
---
88
error: `lemma` is not supported by default, please use `theorem` instead.
99
Use `set_option lang.lemmaCmd true` to enable the use of the `lemma` command in a file.
@@ -19,7 +19,7 @@ lemma test2 : 3 < 7 := by decide
1919
-- lemma disabled again
2020
/--
2121
info: Try this:
22-
theorem
22+
[apply] theorem
2323
---
2424
error: `lemma` is not supported by default, please use `theorem` instead.
2525
Use `set_option lang.lemmaCmd true` to enable the use of the `lemma` command in a file.

BatteriesTest/show_term.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors: Kim Morrison
66

77
/--
88
info: Try this:
9-
exact (n, 37)
9+
[apply] exact (n, 37)
1010
-/
1111
#guard_msgs in example (n : Nat) : Nat × Nat := by
1212
show_term
@@ -16,15 +16,15 @@ info: Try this:
1616

1717
/--
1818
info: Try this:
19-
refine (?_, ?_)
19+
[apply] refine (?_, ?_)
2020
-/
2121
#guard_msgs in example : Nat × Nat := by
2222
show_term constructor
2323
repeat exact 42
2424

2525
/--
2626
info: Try this:
27-
fun {X} => X
27+
[apply] fun {X} => X
2828
-/
2929
#guard_msgs in example : {_a : Nat} → Nat :=
3030
show_term by

BatteriesTest/simp_trace.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ set_option linter.missingDocs false
77

88
/--
99
info: Try this:
10-
simp only [Nat.add_comm]
10+
[apply] simp only [Nat.add_comm]
1111
-/
1212
#guard_msgs in
1313
example : x + 1 = 1 + x := by simp? [Nat.add_comm, Nat.mul_comm]
1414
/--
1515
info: Try this:
16-
dsimp only [Nat.reduceAdd]
16+
[apply] dsimp only [Nat.reduceAdd]
1717
-/
1818
#guard_msgs in
1919
example : 1 + 1 = 2 := by dsimp?
@@ -27,10 +27,10 @@ example : 1 + 1 = 2 := by dsimp?
2727

2828
/--
2929
info: Try this:
30-
simp only [foo, bar]
30+
[apply] simp only [foo, bar]
3131
---
3232
info: Try this:
33-
simp only [foo, baz]
33+
[apply] simp only [foo, baz]
3434
-/
3535
#guard_msgs in
3636
example : foo x y = 1 + y := by
@@ -40,7 +40,7 @@ example : foo x y = 1 + y := by
4040

4141
/--
4242
info: Try this:
43-
simp only [foo, bar, baz]
43+
[apply] simp only [foo, bar, baz]
4444
-/
4545
#guard_msgs in
4646
example : foo x y = 1 + y := by

BatteriesTest/simpa.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ example (P : Bool) (h : ¬ ¬ P) : P := by
9696

9797
/--
9898
info: Try this:
99-
simpa only using h
99+
[apply] simpa only using h
100100
-/
101101
#guard_msgs in
102102
example (p : Prop) (h : p) : p := by simpa? using h
103103

104104
/--
105105
info: Try this:
106-
simpa only [and_true] using h
106+
[apply] simpa only [and_true] using h
107107
-/
108108
#guard_msgs in
109109
example (p : Prop) (h : p ∧ True) : p := by simpa? using h

BatteriesTest/tryThis.lean

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ private def s : Suggestion := Unhygienic.run `(tactic| rfl)
6262

6363
/--
6464
info: Try this:
65-
rfl
65+
[apply] rfl
6666
-/
6767
#guard_msgs in
6868
-- `Try this: rfl` with `rfl` in text-link color.
6969
#demo1 s
7070

7171
/--
7272
info: Try these:
73-
rfl
74-
rfl
75-
rfl
76-
rfl
73+
[apply] rfl
74+
[apply] rfl
75+
[apply] rfl
76+
[apply] rfl
7777
-/
7878
#guard_msgs in
7979
/-
@@ -94,13 +94,13 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.value` has been deprecated: `
9494
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.value` has been deprecated: `SuggestionStyle` is not used anymore.
9595
---
9696
info: Try these:
97-
rfl
98-
rfl
99-
rfl
100-
rfl
101-
rfl
102-
rfl
103-
rfl
97+
[apply] rfl
98+
[apply] rfl
99+
[apply] rfl
100+
[apply] rfl
101+
[apply] rfl
102+
[apply] rfl
103+
[apply] rfl
104104
-/
105105
#guard_msgs in
106106
/-
@@ -123,7 +123,7 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.error` has been deprecated: `
123123
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.error` has been deprecated: `SuggestionStyle` is not used anymore.
124124
---
125125
info: Try this:
126-
rfl
126+
[apply] rfl
127127
-/
128128
#guard_msgs in
129129
-- `Try this: rfl` -- error color, no squiggle
@@ -135,7 +135,7 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.warning` has been deprecated:
135135
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.warning` has been deprecated: `SuggestionStyle` is not used anymore.
136136
---
137137
info: Try this:
138-
rfl
138+
[apply] rfl
139139
-/
140140
#guard_msgs in
141141
-- `Try this: rfl` -- gold color with warning squiggle
@@ -147,7 +147,7 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.warning` has been deprecated:
147147
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.warning` has been deprecated: `SuggestionStyle` is not used anymore.
148148
---
149149
info: Try this:
150-
rfl
150+
[apply] rfl
151151
-/
152152
#guard_msgs in
153153
-- `Try this: rfl` -- gold color with no squiggle
@@ -159,7 +159,7 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.success` has been deprecated:
159159
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.success` has been deprecated: `SuggestionStyle` is not used anymore.
160160
---
161161
info: Try this:
162-
rfl
162+
[apply] rfl
163163
-/
164164
#guard_msgs in
165165
-- `Try this: rfl` -- Lean green
@@ -171,7 +171,7 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.asHypothesis` has been deprec
171171
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.asHypothesis` has been deprecated: `SuggestionStyle` is not used anymore.
172172
---
173173
info: Try this:
174-
rfl
174+
[apply] rfl
175175
-/
176176
#guard_msgs in
177177
-- `Try this: rfl` -- styled like a goal hypothesis
@@ -183,32 +183,32 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.asInaccessible` has been depr
183183
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.asInaccessible` has been deprecated: `SuggestionStyle` is not used anymore.
184184
---
185185
info: Try this:
186-
rfl
186+
[apply] rfl
187187
-/
188188
#guard_msgs in
189189
-- `Try this: rfl` -- styled like an inaccessible goal hypothesis
190190
#demo1 {s with style? := some .asInaccessible}
191191

192192
/--
193193
info: Try this:
194-
Starfleet
194+
[apply] Starfleet
195195
-/
196196
#guard_msgs in
197197
-- `Try this: Starfleet`
198198
#demo1 {s with preInfo? := "Sta", postInfo? := "eet"}
199199

200200
/--
201201
info: Try this:
202-
a secret message
202+
[apply] a secret message
203203
-/
204204
#guard_msgs in
205205
-- `Try this: a secret message`
206206
#demo1 {s with messageData? := m!"a secret message"}
207207

208208
/--
209209
info: Try these:
210-
a secret message
211-
another secret message
210+
[apply] a secret message
211+
[apply] another secret message
212212
-/
213213
#guard_msgs in
214214
/-
@@ -225,17 +225,17 @@ Try these:
225225

226226
/--
227227
info: Our only hope is ⏎
228-
rfl
228+
[apply] rfl
229229
-/
230230
#guard_msgs in
231231
#demo1 s with_header "Our only hope is "
232232

233233
/--
234234
info: We've got everything here! Such as:
235-
rfl
236-
rfl
237-
rfl
238-
rfl
235+
[apply] rfl
236+
[apply] rfl
237+
[apply] rfl
238+
[apply] rfl
239239
-/
240240
#guard_msgs in
241241
#demo #[s,s,s,s] with_header "We've got everything here! Such as:"
@@ -258,11 +258,11 @@ warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.value` has been deprecated: `
258258
warning: `Lean.Meta.Tactic.TryThis.SuggestionStyle.value` has been deprecated: `SuggestionStyle` is not used anymore.
259259
---
260260
info: Grab bag:
261-
This is not a tactic.
262-
This could be a tactic--but watch out!
263-
rfl. Finally, a tactic that just works.
264-
I'm just link-styled.
265-
On a scale of 0 to 1, I'd put this at 0.166667.
261+
[apply] This is not a tactic.
262+
[apply] This could be a tactic--but watch out!
263+
[apply] rfl. Finally, a tactic that just works.
264+
[apply] I'm just link-styled.
265+
[apply] On a scale of 0 to 1, I'd put this at 0.166667.
266266
-/
267267
#guard_msgs in
268268
#demo #[
@@ -297,7 +297,7 @@ info: Grab bag:
297297
menu should read "Consider rfl, please" -/
298298
/--
299299
info: Try this:
300-
rfl
300+
[apply] rfl
301301
-/
302302
#guard_msgs in
303303
#demo1 { s with toCodeActionTitle? := fun text => "Consider " ++ text ++ ", please" }
@@ -315,9 +315,9 @@ macro "#demo" s:term "with_code_action_prefix" h:str : command => `(example : Tr
315315
menu should read "Maybe use: rfl"; "Maybe use: rfl"; "Also consider rfl, please!" -/
316316
/--
317317
info: Try these:
318-
rfl
319-
rfl
320-
rfl
318+
[apply] rfl
319+
[apply] rfl
320+
[apply] rfl
321321
-/
322322
#guard_msgs in
323323
#demo #[

0 commit comments

Comments
 (0)