test: add test files for decimal, div, sign, and truncate methods on Number
Add four new test files covering edge cases for Number methods: - decimal.wren tests fractional part extraction including negative zero - div.wren tests integer division behavior with mixed integer/float operands - sign.wren tests sign determination including zero and negative zero - truncate.wren tests truncation of positive and negative numbers
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
IO.print(123.decimal) // expect: 0
|
||||
IO.print((-123).decimal) // expect: 0
|
||||
IO.print(0.decimal) // expect: 0
|
||||
IO.print((-0).decimal) // expect: -0
|
||||
IO.print(0.123.decimal) // expect: 0.123
|
||||
IO.print(12.3.decimal) // expect: 0.3
|
||||
IO.print((-0.123).decimal) // expect: -0.123
|
||||
IO.print((-12.3).decimal) // expect: -0.3
|
||||
Reference in New Issue
Block a user