diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2016-05-12 09:16:12 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2016-05-12 12:22:00 -0700 |
commit | 96c69f852cd4c76fd4cf1d5922db926fadb41790 (patch) | |
tree | b1ae1f8e9395eb8876378964654e4380a7096fc0 | |
parent | d55884d73e57a924a586c26a03bc691ab5c62c39 (diff) | |
download | servo-96c69f852cd4c76fd4cf1d5922db926fadb41790.tar.gz servo-96c69f852cd4c76fd4cf1d5922db926fadb41790.zip |
Fix warnings in unit tests
-rw-r--r-- | components/servo/Cargo.lock | 6 | ||||
-rw-r--r-- | tests/unit/profile/time.rs | 2 | ||||
-rw-r--r-- | tests/unit/style/Cargo.toml | 2 | ||||
-rw-r--r-- | tests/unit/style/lib.rs | 19 | ||||
-rw-r--r-- | tests/unit/util/Cargo.toml | 4 | ||||
-rw-r--r-- | tests/unit/util/lib.rs | 18 | ||||
-rw-r--r-- | tests/unit/util/str.rs | 2 |
7 files changed, 17 insertions, 36 deletions
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 8c1955227eb..f7d8bf44037 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -2146,8 +2146,6 @@ dependencies = [ "app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "msg 0.0.1", - "plugins 0.0.1", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2373,10 +2371,6 @@ dependencies = [ name = "util_tests" version = "0.0.1" dependencies = [ - "app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "plugins 0.0.1", "util 0.0.1", ] diff --git a/tests/unit/profile/time.rs b/tests/unit/profile/time.rs index 6ee24ed3416..70daaf2cb73 100644 --- a/tests/unit/profile/time.rs +++ b/tests/unit/profile/time.rs @@ -11,7 +11,7 @@ fn time_profiler_smoke_test() { let chan = time::Profiler::create(&None, None); assert!(true, "Can create the profiler thread"); - let (ipcchan, ipcport) = ipc::channel().unwrap(); + let (ipcchan, _ipcport) = ipc::channel().unwrap(); chan.send(ProfilerMsg::Exit(ipcchan)); assert!(true, "Can tell the profiler thread to exit"); } diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index 91c3d5d4f64..795bb9284ba 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -9,8 +9,6 @@ path = "lib.rs" doctest = false [dependencies] -msg = {path = "../../../components/msg"} -plugins = {path = "../../../components/plugins"} style = {path = "../../../components/style"} style_traits = {path = "../../../components/style_traits"} util = {path = "../../../components/util"} diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs index 7f6a1c11b7f..6f117388acb 100644 --- a/tests/unit/style/lib.rs +++ b/tests/unit/style/lib.rs @@ -2,14 +2,13 @@ * 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/. */ +#![cfg(test)] #![feature(plugin)] -#![cfg_attr(test, feature(core_intrinsics))] -#![plugin(plugins)] +#![feature(core_intrinsics)] extern crate app_units; extern crate cssparser; extern crate euclid; -extern crate msg; extern crate rustc_serialize; extern crate selectors; #[macro_use(atom, ns)] extern crate string_cache; @@ -18,14 +17,14 @@ extern crate style_traits; extern crate url; extern crate util; -#[cfg(test)] mod attr; -#[cfg(test)] mod logical_geometry; -#[cfg(test)] mod media_queries; -#[cfg(test)] mod properties; -#[cfg(test)] mod stylesheets; -#[cfg(test)] mod viewport; +mod attr; +mod logical_geometry; +mod media_queries; +mod properties; +mod stylesheets; +mod viewport; -#[cfg(test)] mod writing_modes { +mod writing_modes { use style::logical_geometry::WritingMode; use style::properties::{INITIAL_SERVO_VALUES, ComputedValues, get_writing_mode}; diff --git a/tests/unit/util/Cargo.toml b/tests/unit/util/Cargo.toml index 0ef11c4dc59..c61afbb1ea0 100644 --- a/tests/unit/util/Cargo.toml +++ b/tests/unit/util/Cargo.toml @@ -10,7 +10,3 @@ doctest = false [dependencies] util = {path = "../../../components/util"} -plugins = {path = "../../../components/plugins"} -app_units = {version = "0.2.3", features = ["plugins"]} -euclid = {version = "0.6.4", features = ["plugins"]} -libc = "0.2" diff --git a/tests/unit/util/lib.rs b/tests/unit/util/lib.rs index d124036bef2..c79c763eb13 100644 --- a/tests/unit/util/lib.rs +++ b/tests/unit/util/lib.rs @@ -2,18 +2,12 @@ * 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/. */ -#![cfg_attr(test, feature(plugin, custom_derive))] -#![cfg_attr(test, plugin(plugins))] -#![feature(alloc)] +#![cfg(test)] -extern crate alloc; -extern crate app_units; -extern crate euclid; -extern crate libc; extern crate util; -#[cfg(test)] mod cache; -#[cfg(test)] mod opts; -#[cfg(test)] mod str; -#[cfg(test)] mod thread; -#[cfg(test)] mod prefs; +mod cache; +mod opts; +mod prefs; +mod str; +mod thread; diff --git a/tests/unit/util/str.rs b/tests/unit/util/str.rs index 9afbc77e823..a0eb750934c 100644 --- a/tests/unit/util/str.rs +++ b/tests/unit/util/str.rs @@ -12,7 +12,7 @@ pub fn split_html_space_chars_whitespace() { #[test] pub fn test_str_join_empty() { - let slice = [] as [&str; 0]; + let slice: [&str; 0] = []; let actual = str_join(&slice, "-"); let expected = ""; assert_eq!(actual, expected); |