summaryrefslogtreecommitdiff
path: root/tests/typ/code/ops.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-30 18:37:04 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-30 18:49:20 +0200
commite35fca54a0c5b3cd5251a58837e9c1ef2b6c3c6d (patch)
tree21afd717101000209cd35d07df8034864f29c41f /tests/typ/code/ops.typ
parent1ee1d078e2480ddd08d40915bc7a74a8352acff0 (diff)
Change indent from 4 to 2 spaces
Diffstat (limited to 'tests/typ/code/ops.typ')
-rw-r--r--tests/typ/code/ops.typ68
1 files changed, 34 insertions, 34 deletions
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ
index d8e87308..ca328e75 100644
--- a/tests/typ/code/ops.typ
+++ b/tests/typ/code/ops.typ
@@ -11,15 +11,15 @@
// Test plus and minus.
#for v in (1, 3.14, 12pt, 45deg, 90%, 13% + 10pt, 6.3fr) {
- // Test plus.
- test(+v, v)
+ // Test plus.
+ test(+v, v)
- // Test minus.
- test(-v, -1 * v)
- test(--v, v)
+ // Test minus.
+ test(-v, -1 * v)
+ test(--v, v)
- // Test combination.
- test(-++ --v, -v)
+ // Test combination.
+ test(-++ --v, -v)
}
#test(-(4 + 2), 6-12)
@@ -50,24 +50,24 @@
// Mathematical identities.
#let nums = (1, 3.14, 12pt, 45deg, 90%, 13% + 10pt)
#for v in nums {
- // Test plus and minus.
- test(v + v - v, v)
- test(v - v - v, -v)
-
- // Test plus/minus and multiplication.
- test(v - v, 0 * v)
- test(v + v, 2 * v)
-
- // Integer addition does not give a float.
- if type(v) != "integer" {
- test(v + v, 2.0 * v)
- }
-
- // Linears cannot be divided by themselves.
- if type(v) != "linear" {
- test(v / v, 1.0)
- test(v / v == 1, true)
- }
+ // Test plus and minus.
+ test(v + v - v, v)
+ test(v - v - v, -v)
+
+ // Test plus/minus and multiplication.
+ test(v - v, 0 * v)
+ test(v + v, 2 * v)
+
+ // Integer addition does not give a float.
+ if type(v) != "integer" {
+ test(v + v, 2.0 * v)
+ }
+
+ // Linears cannot be divided by themselves.
+ if type(v) != "linear" {
+ test(v / v, 1.0)
+ test(v / v == 1, true)
+ }
}
// Make sure length, relative and linear
@@ -76,15 +76,15 @@
// - divided by floats.
#let dims = (10pt, 30%, 50% + 3cm)
#for a in dims {
- for b in dims {
- test(type(a + b), type(a - b))
- }
-
- for b in (7, 3.14) {
- test(type(a * b), type(a))
- test(type(b * a), type(a))
- test(type(a / b), type(a))
- }
+ for b in dims {
+ test(type(a + b), type(a - b))
+ }
+
+ for b in (7, 3.14) {
+ test(type(a * b), type(a))
+ test(type(b * a), type(a))
+ test(type(a / b), type(a))
+ }
}
---