From 4635f76fa5d356bc259cbe3d0b6696c4cf890bf3 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Fri, 21 Aug 2020 07:00:42 -0400 Subject: [PATCH] add test for integer overflow in division --- tests/number.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/number.rs b/tests/number.rs index 716f8c8..a0a5c81 100644 --- a/tests/number.rs +++ b/tests/number.rs @@ -154,6 +154,11 @@ test!( "a {\n color: 999999999999999999 * 10;\n}\n", "a {\n color: 9999999999999999990;\n}\n" ); +test!( + number_overflow_from_division, + "a {\n color: (999999999999999999 / .1);\n}\n", + "a {\n color: 9999999999999999990;\n}\n" +); // we use arbitrary precision, so it is necessary to limit the size of exponents // in order to prevent hangs error!(