mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Tweak thresholds.
MozReview-Commit-ID: GMd1Huv8N5s
This commit is contained in:
parent
6a2a5be764
commit
418f829183
1 changed files with 6 additions and 6 deletions
|
@ -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.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue