Make tests/units/* compile without warnings in non-test mode

(if not usefully)
This commit is contained in:
Simon Sapin 2017-11-30 16:49:57 +01:00
parent 9d898cd460
commit 2a5c4133f9
7 changed files with 29 additions and 24 deletions

View file

@ -2,6 +2,8 @@
* 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)]
extern crate gfx; extern crate gfx;
#[cfg(test)] mod text_util; mod text_util;

View file

@ -2,7 +2,6 @@
* 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/. */
extern crate layout; #[cfg(all(test, target_pointer_width = "64"))] extern crate layout;
#[macro_use] extern crate size_of_test; #[cfg(all(test, target_pointer_width = "64"))] #[macro_use] extern crate size_of_test;
#[cfg(all(test, target_pointer_width = "64"))] mod size_of; #[cfg(all(test, target_pointer_width = "64"))] mod size_of;

View file

@ -2,6 +2,8 @@
* 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)]
extern crate euclid; extern crate euclid;
extern crate gfx; extern crate gfx;
extern crate gfx_traits; extern crate gfx_traits;
@ -13,7 +15,5 @@ extern crate profile_traits;
extern crate style; extern crate style;
extern crate time; extern crate time;
#[cfg(test)]
mod interactive_time; mod interactive_time;
#[cfg(test)]
mod paint_time; mod paint_time;

View file

@ -2,7 +2,6 @@
* 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/. */
extern crate msg; #[cfg(all(test, target_pointer_width = "64"))] extern crate msg;
#[macro_use] extern crate size_of_test; #[cfg(all(test, target_pointer_width = "64"))] #[macro_use] extern crate size_of_test;
#[cfg(all(test, target_pointer_width = "64"))] mod size_of; #[cfg(all(test, target_pointer_width = "64"))] mod size_of;

View file

@ -2,6 +2,8 @@
* 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)]
extern crate cookie as cookie_rs; extern crate cookie as cookie_rs;
extern crate devtools_traits; extern crate devtools_traits;
extern crate flate2; extern crate flate2;
@ -19,18 +21,18 @@ extern crate time;
extern crate unicase; extern crate unicase;
extern crate url; extern crate url;
#[cfg(test)] mod chrome_loader; mod chrome_loader;
#[cfg(test)] mod cookie; mod cookie;
#[cfg(test)] mod cookie_http_state; mod cookie_http_state;
#[cfg(test)] mod data_loader; mod data_loader;
#[cfg(test)] mod file_loader; mod fetch;
#[cfg(test)] mod fetch; mod file_loader;
#[cfg(test)] mod mime_classifier; mod filemanager_thread;
#[cfg(test)] mod resource_thread; mod hsts;
#[cfg(test)] mod hsts; mod http_loader;
#[cfg(test)] mod http_loader; mod mime_classifier;
#[cfg(test)] mod filemanager_thread; mod resource_thread;
#[cfg(test)] mod subresource_integrity; mod subresource_integrity;
use devtools_traits::DevtoolsControlMsg; use devtools_traits::DevtoolsControlMsg;
use hyper::server::{Handler, Listening, Server}; use hyper::server::{Handler, Listening, Server};

View file

@ -2,10 +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(test)]
extern crate net_traits; extern crate net_traits;
#[cfg(test)] mod image; mod image;
#[cfg(test)] mod pub_domains; mod pub_domains;
#[test] #[test]
fn test_trim_http_whitespace() { fn test_trim_http_whitespace() {

View file

@ -2,10 +2,11 @@
* 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)]
extern crate ipc_channel; extern crate ipc_channel;
extern crate profile; extern crate profile;
extern crate profile_traits; extern crate profile_traits;
extern crate servo_allocator; extern crate servo_allocator;
#[cfg(test)]
mod time; mod time;