summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-09-30 04:55:34 -0300
committerGitHub <noreply@github.com>2024-09-30 07:55:34 +0000
commit0b151b866ad5b8c94196404ceb42f730d6761247 (patch)
treea94ea87d2f32d6efd9cbcd1c17b8279e76f53da8 /tests
parent1494373fafad24f05afb9ec45903952a789e6731 (diff)
Revert return type change in floor, ceil, trunc, quo (#5064)
Diffstat (limited to 'tests')
-rw-r--r--tests/suite/foundations/calc.typ46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/suite/foundations/calc.typ b/tests/suite/foundations/calc.typ
index 18cfa484..4cf7ab2a 100644
--- a/tests/suite/foundations/calc.typ
+++ b/tests/suite/foundations/calc.typ
@@ -122,10 +122,10 @@
#test(calc.quo(1, 1), 1)
#test(calc.quo(5, 3), 1)
#test(calc.quo(5, -3), -1)
-#test(calc.quo(22.5, 10), 2.0)
-#test(calc.quo(9, 4.5), 2.0)
-#test(calc.quo(decimal("22.5"), 10), decimal("2"))
-#test(calc.quo(decimal("9"), decimal("4.5")), decimal("2"))
+#test(calc.quo(22.5, 10), 2)
+#test(calc.quo(9, 4.5), 2)
+#test(calc.quo(decimal("22.5"), 10), 2)
+#test(calc.quo(decimal("9"), decimal("4.5")), 2)
--- calc-quo-divisor-zero-1 ---
// Error: 14-15 divisor must not be zero
@@ -307,29 +307,29 @@
// Error: 2-41 the result is too large
#calc.lcm(15486487489457, 4874879896543)
---- calc-rounding-larger-than-max-int ---
+--- calc-round-larger-than-max-int ---
#test(calc.round(decimal("9223372036854775809.5")), decimal("9223372036854775810"))
#test(calc.round(9223372036854775809.5), 9223372036854775810.0)
-#test(calc.floor(decimal("9223372036854775809.5")), decimal("9223372036854775809"))
-#test(calc.floor(9223372036854775809.5), 9223372036854775809.0)
-#test(calc.ceil(decimal("9223372036854775809.5")), decimal("9223372036854775810"))
-#test(calc.ceil(9223372036854775809.5), 9223372036854775810.0)
-#test(calc.trunc(decimal("9223372036854775809.5")), decimal("9223372036854775809"))
-#test(calc.trunc(9223372036854775809.5), 9223372036854775809.0)
-#test(calc.quo(decimal("9223372036854775809.5"), 1), decimal("9223372036854775809"))
-#test(calc.quo(9223372036854775809.5, 1), 9223372036854775809.0)
-
---- calc-rounding-smaller-than-min-int ---
+
+--- calc-floor-float-larger-than-max-int ---
+// Error: 2-35 the result is too large
+#calc.floor(9223372036854775809.5)
+
+--- calc-floor-decimal-larger-than-max-int ---
+// Error: 2-46 the result is too large
+#calc.floor(decimal("9223372036854775809.5"))
+
+--- calc-round-smaller-than-min-int ---
#test(calc.round(decimal("-9223372036854775809.5")), decimal("-9223372036854775810"))
#test(calc.round(-9223372036854775809.5), -9223372036854775810.0)
-#test(calc.floor(decimal("-9223372036854775809.5")), decimal("-9223372036854775810"))
-#test(calc.floor(-9223372036854775809.5), -9223372036854775810.0)
-#test(calc.ceil(decimal("-9223372036854775809.5")), decimal("-9223372036854775809"))
-#test(calc.ceil(-9223372036854775809.5), -9223372036854775809.0)
-#test(calc.trunc(decimal("-9223372036854775809.5")), decimal("-9223372036854775809"))
-#test(calc.trunc(-9223372036854775809.5), -9223372036854775809.0)
-#test(calc.quo(decimal("-9223372036854775809.5"), 1), decimal("-9223372036854775810"))
-#test(calc.quo(-9223372036854775809.5, 1), -9223372036854775810.0)
+
+--- calc-floor-float-smaller-than-min-int ---
+// Error: 2-36 the result is too large
+#calc.floor(-9223372036854775809.5)
+
+--- calc-floor-decimal-smaller-than-min-int ---
+// Error: 2-47 the result is too large
+#calc.floor(decimal("-9223372036854775809.5"))
--- calc-min-nothing ---
// Error: 2-12 expected at least one value