mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Auto merge of #11159 - mbrubeck:test-warnings, r=emilio
Fix warnings in unit tests <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11159) <!-- Reviewable:end -->
This commit is contained in:
commit
1e8ddba3e8
7 changed files with 17 additions and 36 deletions
6
components/servo/Cargo.lock
generated
6
components/servo/Cargo.lock
generated
|
@ -2146,8 +2146,6 @@ dependencies = [
|
||||||
"app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"string_cache 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2373,10 +2371,6 @@ dependencies = [
|
||||||
name = "util_tests"
|
name = "util_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
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",
|
"util 0.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ fn time_profiler_smoke_test() {
|
||||||
let chan = time::Profiler::create(&None, None);
|
let chan = time::Profiler::create(&None, None);
|
||||||
assert!(true, "Can create the profiler thread");
|
assert!(true, "Can create the profiler thread");
|
||||||
|
|
||||||
let (ipcchan, ipcport) = ipc::channel().unwrap();
|
let (ipcchan, _ipcport) = ipc::channel().unwrap();
|
||||||
chan.send(ProfilerMsg::Exit(ipcchan));
|
chan.send(ProfilerMsg::Exit(ipcchan));
|
||||||
assert!(true, "Can tell the profiler thread to exit");
|
assert!(true, "Can tell the profiler thread to exit");
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,6 @@ path = "lib.rs"
|
||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
msg = {path = "../../../components/msg"}
|
|
||||||
plugins = {path = "../../../components/plugins"}
|
|
||||||
style = {path = "../../../components/style"}
|
style = {path = "../../../components/style"}
|
||||||
style_traits = {path = "../../../components/style_traits"}
|
style_traits = {path = "../../../components/style_traits"}
|
||||||
util = {path = "../../../components/util"}
|
util = {path = "../../../components/util"}
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#![cfg(test)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![cfg_attr(test, feature(core_intrinsics))]
|
#![feature(core_intrinsics)]
|
||||||
#![plugin(plugins)]
|
|
||||||
|
|
||||||
extern crate app_units;
|
extern crate app_units;
|
||||||
extern crate cssparser;
|
extern crate cssparser;
|
||||||
extern crate euclid;
|
extern crate euclid;
|
||||||
extern crate msg;
|
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate selectors;
|
extern crate selectors;
|
||||||
#[macro_use(atom, ns)] extern crate string_cache;
|
#[macro_use(atom, ns)] extern crate string_cache;
|
||||||
|
@ -18,14 +17,14 @@ extern crate style_traits;
|
||||||
extern crate url;
|
extern crate url;
|
||||||
extern crate util;
|
extern crate util;
|
||||||
|
|
||||||
#[cfg(test)] mod attr;
|
mod attr;
|
||||||
#[cfg(test)] mod logical_geometry;
|
mod logical_geometry;
|
||||||
#[cfg(test)] mod media_queries;
|
mod media_queries;
|
||||||
#[cfg(test)] mod properties;
|
mod properties;
|
||||||
#[cfg(test)] mod stylesheets;
|
mod stylesheets;
|
||||||
#[cfg(test)] mod viewport;
|
mod viewport;
|
||||||
|
|
||||||
#[cfg(test)] mod writing_modes {
|
mod writing_modes {
|
||||||
use style::logical_geometry::WritingMode;
|
use style::logical_geometry::WritingMode;
|
||||||
use style::properties::{INITIAL_SERVO_VALUES, ComputedValues, get_writing_mode};
|
use style::properties::{INITIAL_SERVO_VALUES, ComputedValues, get_writing_mode};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,3 @@ doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
util = {path = "../../../components/util"}
|
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"
|
|
||||||
|
|
|
@ -2,18 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#![cfg_attr(test, feature(plugin, custom_derive))]
|
#![cfg(test)]
|
||||||
#![cfg_attr(test, plugin(plugins))]
|
|
||||||
#![feature(alloc)]
|
|
||||||
|
|
||||||
extern crate alloc;
|
|
||||||
extern crate app_units;
|
|
||||||
extern crate euclid;
|
|
||||||
extern crate libc;
|
|
||||||
extern crate util;
|
extern crate util;
|
||||||
|
|
||||||
#[cfg(test)] mod cache;
|
mod cache;
|
||||||
#[cfg(test)] mod opts;
|
mod opts;
|
||||||
#[cfg(test)] mod str;
|
mod prefs;
|
||||||
#[cfg(test)] mod thread;
|
mod str;
|
||||||
#[cfg(test)] mod prefs;
|
mod thread;
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub fn split_html_space_chars_whitespace() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_str_join_empty() {
|
pub fn test_str_join_empty() {
|
||||||
let slice = [] as [&str; 0];
|
let slice: [&str; 0] = [];
|
||||||
let actual = str_join(&slice, "-");
|
let actual = str_join(&slice, "-");
|
||||||
let expected = "";
|
let expected = "";
|
||||||
assert_eq!(actual, expected);
|
assert_eq!(actual, expected);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue