test: for Int.negSucc bug

This commit is contained in:
Leonardo de Moura 2021-03-07 13:09:23 -08:00
parent a531fd881e
commit 5ba171d946
2 changed files with 30 additions and 0 deletions

View 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

View file

@ -0,0 +1,14 @@
-9223372036854775808
Int.negSucc 9223372036854775807
---
9223372036854775808
Int.ofNat 9223372036854775808
---
false
false
---
true
true
---
false
false