mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add size_of tests for geckolib selectors
This commit is contained in:
parent
cf2ae86373
commit
fd357f08cf
8 changed files with 124 additions and 2 deletions
|
@ -22,7 +22,7 @@ euclid = "0.11"
|
|||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
parking_lot = "0.3"
|
||||
selectors = {path = "../../../components/selectors"}
|
||||
selectors = {path = "../../../components/selectors", features = ["gecko_like_types"]}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
geckoservo = {path = "../../../ports/geckolib"}
|
||||
style = {path = "../../../components/style", features = ["gecko"]}
|
||||
|
|
|
@ -2,6 +2,23 @@
|
|||
* 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::gecko_like_types as dummies;
|
||||
use std::mem::{size_of, align_of};
|
||||
use style;
|
||||
use style::gecko::selector_parser as real;
|
||||
|
||||
#[test]
|
||||
fn size_of_selectors_dummy_types() {
|
||||
assert_eq!(size_of::<dummies::PseudoClass>(), size_of::<real::NonTSPseudoClass>());
|
||||
assert_eq!(align_of::<dummies::PseudoClass>(), align_of::<real::NonTSPseudoClass>());
|
||||
|
||||
assert_eq!(size_of::<dummies::PseudoElementSelector>(), size_of::<real::PseudoElementSelector>());
|
||||
assert_eq!(align_of::<dummies::PseudoElementSelector>(), align_of::<real::PseudoElementSelector>());
|
||||
|
||||
assert_eq!(size_of::<dummies::Atom>(), size_of::<style::Atom>());
|
||||
assert_eq!(align_of::<dummies::Atom>(), align_of::<style::Atom>());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn size_of_property_declaration() {
|
||||
::style::properties::test_size_of_property_declaration();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue