summaryrefslogtreecommitdiff
path: root/tests/typ/code
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-07 14:32:35 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-07 16:19:51 +0200
commit1192132dc0a9e991953fd29e93f87c8437a53ea0 (patch)
tree67061e75a5a15c7997a3ac2de349b5e9ce234434 /tests/typ/code
parenteb22eed31b08874fbbbee68d2ae59f0d02f9e95d (diff)
Rename length-related types
`Fractional` => `Fraction` `Relative` => `Ratio` `Linear` => `Relative`
Diffstat (limited to 'tests/typ/code')
-rw-r--r--tests/typ/code/closure.typ2
-rw-r--r--tests/typ/code/ops-invalid.typ4
-rw-r--r--tests/typ/code/ops.typ4
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/typ/code/closure.typ b/tests/typ/code/closure.typ
index a6006035..5524ba99 100644
--- a/tests/typ/code/closure.typ
+++ b/tests/typ/code/closure.typ
@@ -116,7 +116,7 @@
// Too few arguments.
{
let types(x, y) = "[" + type(x) + ", " + type(y) + "]"
- test(types(14%, 12pt), "[relative, length]")
+ test(types(14%, 12pt), "[ratio, length]")
// Error: 13-21 missing argument: y
test(types("nope"), "[string, none]")
diff --git a/tests/typ/code/ops-invalid.typ b/tests/typ/code/ops-invalid.typ
index 68bce4af..1506d9c4 100644
--- a/tests/typ/code/ops-invalid.typ
+++ b/tests/typ/code/ops-invalid.typ
@@ -26,7 +26,7 @@
{not ()}
---
-// Error: 2-18 cannot apply '<=' to relative length and relative
+// Error: 2-18 cannot apply '<=' to relative length and ratio
{30% + 1pt <= 40%}
---
@@ -35,7 +35,7 @@
{(1 + "2", 40% - 1)}
---
-// Error: 12-19 cannot subtract integer from relative
+// Error: 12-19 cannot subtract integer from ratio
{(1234567, 40% - 1)}
---
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ
index 79743f5d..b5a4d8d4 100644
--- a/tests/typ/code/ops.typ
+++ b/tests/typ/code/ops.typ
@@ -63,14 +63,14 @@
test(v + v, 2.0 * v)
}
- // Linears cannot be divided by themselves.
+ // Relative lengths cannot be divided by themselves.
if type(v) != "relative length" {
test(v / v, 1.0)
test(v / v == 1, true)
}
}
-// Make sure length, relative and linear
+// Make sure length, ratio and relative length
// - can all be added to / subtracted from each other,
// - multiplied with integers and floats,
// - divided by floats.