Add size_of tests for CSS parsing error types

This commit is contained in:
Simon Sapin 2017-10-09 13:52:57 +02:00
parent 55a7fd75b4
commit fa3ce34afe

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use selectors::parser::SelectorParseError;
use style::invalidation::element::invalidation_map::Dependency;
use style::properties;
@ -12,3 +13,9 @@ size_of_test!(test_size_of_property_declaration, properties::PropertyDeclaration
// 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, properties::SourcePropertyDeclaration, 576);
size_of_test!(test_size_of_selector_parse_error_with_unit, SelectorParseError<()>, 40);
size_of_test!(test_size_of_style_parse_error, ::style_traits::StyleParseError, 80);
size_of_test!(test_size_of_value_parse_error, ::style_traits::ValueParseError, 40);
size_of_test!(test_size_of_declaration_parse_error, ::style_traits::PropertyDeclarationParseError, 72);
size_of_test!(test_size_of_style_traits_parse_error, ::style_traits::ParseError, 96);