This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
52 lines
1.6 KiB
Text
52 lines
1.6 KiB
Text
set_option linter.indexVariables true
|
|
|
|
#guard_msgs in
|
|
example (xs : List Nat) (i : Nat) (h) : xs[i] = xs[i] := rfl
|
|
|
|
/--
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
---
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
-/
|
|
#guard_msgs in
|
|
example (xs : List Nat) (m : Nat) (h) : xs[m] = xs[m] := rfl
|
|
|
|
#guard_msgs in
|
|
example (xs : List Nat) (i j : Nat) (h) : xs[i + j] = xs[i + j] := rfl
|
|
|
|
#guard_msgs in
|
|
example (xs : List Nat) (m n : Nat) (h) : xs[m + n] = xs[m + n] := rfl
|
|
|
|
#guard_msgs in
|
|
example (xs : List Nat) (i : Nat) : xs[i]? = xs[i]? := rfl
|
|
|
|
/--
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
---
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
-/
|
|
#guard_msgs in
|
|
example (xs : List Nat) (m : Nat) : xs[m]? = xs[m]? := rfl
|
|
|
|
#guard_msgs in
|
|
example (xs : List Nat) (i : Nat) : xs.take i = xs.take i := rfl
|
|
|
|
/--
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
---
|
|
warning: Forbidden variable appearing as an index: use `i`, `j`, or `k`: m
|
|
|
|
Note: This linter can be disabled with `set_option linter.indexVariables false`
|
|
-/
|
|
#guard_msgs in
|
|
example (xs : List Nat) (m : Nat) : xs.drop m = xs.drop m := rfl
|