summaryrefslogtreecommitdiff
path: root/tests
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
parenteb22eed31b08874fbbbee68d2ae59f0d02f9e95d (diff)
Rename length-related types
`Fractional` => `Fraction` `Relative` => `Ratio` `Linear` => `Relative`
Diffstat (limited to 'tests')
-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
-rw-r--r--tests/typ/graphics/shape-aspect.typ2
-rw-r--r--tests/typ/layout/grid-4.typ2
-rw-r--r--tests/typ/text/font.typ2
-rw-r--r--tests/typ/utility/color.typ2
-rw-r--r--tests/typ/utility/math.typ2
-rw-r--r--tests/typeset.rs2
9 files changed, 11 insertions, 11 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.
diff --git a/tests/typ/graphics/shape-aspect.typ b/tests/typ/graphics/shape-aspect.typ
index 2c3e9b0c..970857b6 100644
--- a/tests/typ/graphics/shape-aspect.typ
+++ b/tests/typ/graphics/shape-aspect.typ
@@ -42,5 +42,5 @@
---
// Size cannot be relative because we wouldn't know
// relative to which axis.
-// Error: 15-18 expected length, found relative
+// Error: 15-18 expected length, found ratio
#square(size: 50%)
diff --git a/tests/typ/layout/grid-4.typ b/tests/typ/layout/grid-4.typ
index e02d98c5..fec25105 100644
--- a/tests/typ/layout/grid-4.typ
+++ b/tests/typ/layout/grid-4.typ
@@ -1,7 +1,7 @@
// Test relative sizing inside grids.
---
-// Test that auto and linear columns use the correct base.
+// Test that auto and relative columns use the correct base.
#grid(
columns: (auto, 60%),
rows: (auto, auto),
diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ
index 18469b7a..4b7d7534 100644
--- a/tests/typ/text/font.typ
+++ b/tests/typ/text/font.typ
@@ -64,7 +64,7 @@ Emoji: 🐪, 🌋, 🏞
#set text(style: "bold", weight: "thin")
---
-// Error: 21-23 expected linear or string, found array
+// Error: 21-23 expected string or relative length, found array
#set text(top-edge: ())
---
diff --git a/tests/typ/utility/color.typ b/tests/typ/utility/color.typ
index fa30a4f2..fd60982f 100644
--- a/tests/typ/utility/color.typ
+++ b/tests/typ/utility/color.typ
@@ -32,5 +32,5 @@
#rgb(0, 1)
---
-// Error: 21-26 expected integer or relative, found boolean
+// Error: 21-26 expected integer or ratio, found boolean
#rgb(10%, 20%, 30%, false)
diff --git a/tests/typ/utility/math.typ b/tests/typ/utility/math.typ
index d4ac7aa2..bb729890 100644
--- a/tests/typ/utility/math.typ
+++ b/tests/typ/utility/math.typ
@@ -62,7 +62,7 @@
#mod(3.0, 0.0)
---
-// Error: 6-16 cannot take absolute value of a linear
+// Error: 6-16 cannot take absolute value of a relative length
#abs(10pt + 50%)
---
diff --git a/tests/typeset.rs b/tests/typeset.rs
index f0e7564f..2d8af2ff 100644
--- a/tests/typeset.rs
+++ b/tests/typeset.rs
@@ -528,7 +528,7 @@ fn render_links(
}
}
-/// This is an Linear-feedback shift register using XOR as its shifting
+/// This is a Linear-feedback shift register using XOR as its shifting
/// function. It can be used as PRNG.
struct LinearShift(u64);