lean4-htt/tests/lean/test_extern.lean
Kim Morrison 41697dcf6c
feat: improvements to test_extern command (#3075)
Two improvements
[suggested](https://github.com/leanprover/lean4/pull/2970#issuecomment-1853436906)
by @digama0 after the initial PR was merged.

* Allow testing `implemented_by` attributes as well.
* Use `DecidableEq` rather than `BEq` for stricter testing.
2024-04-24 03:56:16 +00:00

15 lines
273 B
Text

import Lean.Util.TestExtern
deriving instance DecidableEq for ByteArray
test_extern Nat.add 12 37
test_extern 4 + 5
test_extern ByteArray.copySlice ⟨#[1,2,3]⟩ 1 ⟨#[4, 5, 6, 7, 8, 9, 10, 11, 12, 13]⟩ 0 6
def f := 3
@[implemented_by f]
def g := 4
test_extern g