From 94cf7005e99a9055799a641ae6f00669c5ec7a63 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 30 Dec 2022 10:01:37 +0100 Subject: Forbid division by zero --- tests/typ/compiler/ops-invalid.typ | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/typ/compiler/ops-invalid.typ b/tests/typ/compiler/ops-invalid.typ index 3e9e5478..3d41a3d1 100644 --- a/tests/typ/compiler/ops-invalid.typ +++ b/tests/typ/compiler/ops-invalid.typ @@ -33,6 +33,18 @@ // Error: 2-13 cannot apply '<=' to length and length {1em <= 10pt} +--- +// Error: 2-11 cannot divide by zero +{1.2 / 0.0} + +--- +// Error: 2-7 cannot divide by zero +{1 / 0} + +--- +// Error: 2-14 cannot divide by zero +{15deg / 0deg} + --- // Special messages for +, -, * and /. // Error: 03-10 cannot add integer and string -- cgit v1.2.3