From 418f8291830f26b752c5fb73ef2bfbf6b4abe6c4 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 14 Mar 2017 21:55:47 -0700 Subject: [PATCH] Tweak thresholds. MozReview-Commit-ID: GMd1Huv8N5s --- tests/unit/style/size_of.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/style/size_of.rs b/tests/unit/style/size_of.rs index f50b853e827..64eb28adef8 100644 --- a/tests/unit/style/size_of.rs +++ b/tests/unit/style/size_of.rs @@ -16,7 +16,7 @@ fn size_of_property_declaration() { } else if new > old { panic!("Your changes have increased the stack size of PropertyDeclaration enum from {} to {}. \ These enum is present in large quantities in the style, and increasing the size \ - may dramatically affect our memory footprint. Please consider using `boxed=\"True\"` in \ + may negatively affect style system performance. Please consider using `boxed=\"True\"` in \ the longhand If you feel that the increase is necessary, update to the new size in \ tests/unit/style/size_of.rs.", old, new) @@ -25,20 +25,20 @@ fn size_of_property_declaration() { #[test] fn size_of_specified_values() { - let threshold = 40; + let threshold = 32; let longhands = specified_value_sizes(); let mut failing_messages = vec![]; for specified_value in longhands { - if specified_value.1 >= threshold && !specified_value.2 { + if specified_value.1 > threshold && !specified_value.2 { failing_messages.push( format!("Your changes have increased the size of {} SpecifiedValue to {}. The threshold is \ - currently {}. SpecifiedValues are affect size of PropertyDeclaration enum and \ - increasing the size may dramatically affect our memory footprint. Please consider \ + currently {}. SpecifiedValues affect size of PropertyDeclaration enum and \ + increasing the size may negative affect style system performance. Please consider \ using `boxed=\"True\"` in this longhand.", specified_value.0, specified_value.1, threshold)); - } else if specified_value.1 < threshold && specified_value.2 { + } else if specified_value.1 <= threshold && specified_value.2 { failing_messages.push( format!("Your changes have decreased the size of {} SpecifiedValue to {}. Good work! \ The threshold is currently {}. Please consider removing `boxed=\"True\"` from this longhand.",