Many of our tests in `tests/lean/run/` produce output from `#eval` (or `#check`) statements, that is then ignored. This PR tries to capture all the useful output using `#guard_msgs`. I've only done a cursory check that the output is still sane --- there is a chance that some "unchecked" tests have already accumulated regressions and this just cements them! In the other direction, I did identify two rotten tests: * a minor one in `setStructInstNotation.lean`, where a comment says `Set Nat`, but `#check` actually prints `?_`. Weird? * `CompilerProbe.lean` is generating empty output, apparently indicating that something is broken, but I don't know the signficance of this file. In any case, I'll ask about these elsewhere. (This started by noticing that a recent `grind` test file had an untested `trace_state`, and then got carried away.)
48 lines
850 B
Text
48 lines
850 B
Text
def fact : Nat → Nat
|
|
| 0 => 1
|
|
| (n+1) => (n+1)*fact n
|
|
|
|
#check fact 6
|
|
|
|
#guard fact 10 == 3628800
|
|
|
|
-- set_option pp.all true
|
|
theorem tst1 : 100000000000 + 200000000000 = 300000000000 :=
|
|
rfl
|
|
|
|
theorem tst2 : 100000000000 * 200000000000 = 20000000000000000000000 :=
|
|
rfl
|
|
|
|
theorem tst3 : fact 7 = 5040 :=
|
|
rfl
|
|
|
|
theorem tst4 : fact 10 = 3628800 :=
|
|
rfl
|
|
|
|
theorem tst5 : 100000000001 < 300000000000 :=
|
|
of_decide_eq_true rfl
|
|
|
|
theorem tst6 : "hello".length = 5 :=
|
|
rfl
|
|
|
|
theorem tst7 : "helloworld".length = 10 :=
|
|
rfl
|
|
|
|
theorem tst8 : "hello" ++ "world" = "helloworld" :=
|
|
rfl
|
|
|
|
theorem tst9 : "abc" ≠ "cde" :=
|
|
by decide
|
|
|
|
theorem tst10 : "helloWorld" ≠ "helloworld" :=
|
|
by decide
|
|
|
|
theorem tst11 : "helloWorld" = "helloWorld" :=
|
|
by decide
|
|
|
|
theorem tst12 : 'a' ≠ 'c' :=
|
|
by decide
|
|
|
|
/-- info: tst10 : "helloWorld" ≠ "helloworld" -/
|
|
#guard_msgs in
|
|
#check tst10
|