From 2d412d4e3af742fce0621de797f4109fe2fa8213 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Mon, 12 Jun 2017 11:29:07 -0700 Subject: [PATCH] Add a size_of test for RuleNode. MozReview-Commit-ID: Id6iedlK5tg --- tests/unit/stylo/size_of.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/stylo/size_of.rs b/tests/unit/stylo/size_of.rs index 72acb2c2d5f..d863cb816a8 100644 --- a/tests/unit/stylo/size_of.rs +++ b/tests/unit/stylo/size_of.rs @@ -10,7 +10,7 @@ use style::applicable_declarations::ApplicableDeclarationBlock; use style::data::{ComputedStyle, ElementData, ElementStyles}; use style::gecko::selector_parser as real; use style::properties::ComputedValues; -use style::rule_tree::StrongRuleNode; +use style::rule_tree::{RuleNode, StrongRuleNode}; #[test] fn size_of_selectors_dummy_types() { @@ -39,6 +39,10 @@ size_of_test!(test_size_of_property_declaration, style::properties::PropertyDecl size_of_test!(test_size_of_application_declaration_block, ApplicableDeclarationBlock, 24); +// FIXME(bholley): This can shrink with a little bit of work. +// See https://github.com/servo/servo/issues/17280 +size_of_test!(test_size_of_rule_node, RuleNode, 96); + // This is huge, but we allocate it on the stack and then never move it, // we only pass `&mut SourcePropertyDeclaration` references around. size_of_test!(test_size_of_parsed_declaration, style::properties::SourcePropertyDeclaration, 704);