Add FloatInst method implementations and tests

FloatInst should be fully implemented now and have a suite of tests to
make sure those methods are doing what they should be.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-09-26 09:03:13 -07:00
parent f020155453
commit 0d126b8ba3
6 changed files with 379 additions and 11 deletions

View File

@@ -14,6 +14,8 @@ println(1 + 2 + 3)
println(1938 + 481)
println(a + b)
println(b + a)
println(a + -b)
println(-a + b)
# __sub__
println("__sub__")
@@ -47,6 +49,25 @@ println(3 / 363)
println(a / b)
println(b / a)
# __ne__
println("__ne__")
println(1 != 1)
println(1 != 2)
println(1 != 1.0)
println(1 != 2.0)
println(2 != 3839)
println(3284 != 922)
println(2 * 3 != 4 * 5)
# __eq__
println("__eq__")
println(1 == 1)
println(1 == 2)
println(1 == 1.0)
println(1 == 2.0)
println(6139 == 130)
println(1000 == 1001)
# __gt__
println("__gt__")
println(1 > 2)