diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs index 7321adf2d06..9b48d16e07e 100644 --- a/tests/unit/style/viewport.rs +++ b/tests/unit/style/viewport.rs @@ -11,7 +11,7 @@ use servo_config::prefs::{PREFS, PrefValue}; use servo_url::ServoUrl; use style::context::QuirksMode; use style::media_queries::{Device, MediaList, MediaType}; -use style::parser::{Parse, ParserContext, ParserErrorContext}; +use style::parser::{ParserContext, ParserErrorContext}; use style::shared_lock::SharedRwLock; use style::stylesheets::{CssRuleType, Stylesheet, StylesheetInDocument, Origin}; use style::stylesheets::viewport_rule::*; diff --git a/tests/unit/stylo/lib.rs b/tests/unit/stylo/lib.rs index 0b7da6ad03c..85ac29c09e5 100644 --- a/tests/unit/stylo/lib.rs +++ b/tests/unit/stylo/lib.rs @@ -12,7 +12,6 @@ extern crate selectors; #[macro_use] extern crate style; extern crate style_traits; -mod sanity_checks; #[cfg(target_pointer_width = "64")] mod size_of; mod specified_values; diff --git a/tests/unit/stylo/sanity_checks.rs b/tests/unit/stylo/sanity_checks.rs deleted file mode 100644 index c7558d3055c..00000000000 --- a/tests/unit/stylo/sanity_checks.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -//! Different static asserts that ensure the build does what it's expected to. -//! -//! TODO: maybe cfg(test) this? - -#![allow(unused_imports)] - -use std::mem; - -macro_rules! check_enum_value { - ($a:expr, $b:expr) => { - unsafe { - mem::transmute::<[u32; $a as usize], - [u32; $b as usize]>([0; $a as usize]); - } - } -} - -// NB: It's a shame we can't do this statically with bitflags, but no -// const-fn and no other way to access the numerical value :-( -macro_rules! check_enum_value_non_static { - ($a:expr, $b:expr) => { - assert_eq!($a.0 as usize, $b as usize); - } -} diff --git a/tests/unit/stylo/specified_values.rs b/tests/unit/stylo/specified_values.rs index d373966c41f..6bc01a97a46 100644 --- a/tests/unit/stylo/specified_values.rs +++ b/tests/unit/stylo/specified_values.rs @@ -5,6 +5,7 @@ use style; #[cfg(all(test, target_pointer_width = "64"))] +#[test] fn size_of_specified_values() { use std::mem::size_of; let threshold = 24;