test: for Int.negSucc bug
This commit is contained in:
parent
a531fd881e
commit
5ba171d946
2 changed files with 30 additions and 0 deletions
16
tests/lean/intNegSucc.lean
Normal file
16
tests/lean/intNegSucc.lean
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
def Int64Min : Int := -1*(Int.ofNat ((UInt64.size / 2)))
|
||||
|
||||
#eval Int.negSucc 9223372036854775807
|
||||
#reduce Int.negSucc 9223372036854775807
|
||||
#print "---"
|
||||
#eval - Int.negSucc 9223372036854775807
|
||||
#reduce - Int.negSucc 9223372036854775807
|
||||
#print "---"
|
||||
#eval Int.negSucc 9223372036854775807 == 0
|
||||
#reduce Int.negSucc 9223372036854775807 == 0
|
||||
#print "---"
|
||||
#eval Int.negSucc 9223372036854775807 == Int64Min
|
||||
#reduce Int.negSucc 9223372036854775807 == Int64Min
|
||||
#print "---"
|
||||
#eval (Int.negSucc 9223372036854775807) + 1 == 1
|
||||
#reduce (Int.negSucc 9223372036854775807) + 1 == 1
|
||||
14
tests/lean/intNegSucc.lean.expected.out
Normal file
14
tests/lean/intNegSucc.lean.expected.out
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-9223372036854775808
|
||||
Int.negSucc 9223372036854775807
|
||||
---
|
||||
9223372036854775808
|
||||
Int.ofNat 9223372036854775808
|
||||
---
|
||||
false
|
||||
false
|
||||
---
|
||||
true
|
||||
true
|
||||
---
|
||||
false
|
||||
false
|
||||
Loading…
Add table
Reference in a new issue