servo: Merge #11159 - Fix warnings in unit tests (from mbrubeck:test-warnings); r=emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e8ddba3e84617d2e0e01d2e7fbf8548abed518f
This commit is contained in:
Matt Brubeck 2016-05-12 13:12:44 -07:00
parent d5ea725805
commit b45c80d3dd
7 changed files with 17 additions and 36 deletions

View File

@ -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",
]

View File

@ -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");
}

View File

@ -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"}

View File

@ -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};

View File

@ -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"

View File

@ -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;

View File

@ -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);