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.
25 lines
621 B
Text
25 lines
621 B
Text
/-! This test is a simple sanity check for borrow inference derived from the immutable beans
|
||
counting paper -/
|
||
|
||
|
||
/--
|
||
trace: [Compiler.inferBorrow] size: 5
|
||
def isNone._redArg @&x : UInt8 :=
|
||
cases x : UInt8
|
||
| Option.none =>
|
||
let _x.1 := 1;
|
||
return _x.1
|
||
| Option.some =>
|
||
let _x.2 := 0;
|
||
return _x.2
|
||
[Compiler.inferBorrow] size: 1
|
||
def isNone α @&x : UInt8 :=
|
||
let _x.1 := isNone._redArg x;
|
||
return _x.1
|
||
-/
|
||
#guard_msgs in
|
||
set_option trace.Compiler.inferBorrow true in
|
||
def isNone (x : Option α) : Bool :=
|
||
match x with
|
||
| some .. => false
|
||
| none => true
|