From 7b9c9e14531b811da0f4dbf3596100e6fbb792d7 Mon Sep 17 00:00:00 2001 From: Prabhjyot Singh Sodhi Date: Thu, 16 Apr 2015 06:02:11 +0530 Subject: [PATCH 1/2] Split up the unit tests crate --- components/servo/Cargo.toml | 16 +++++++++++++-- python/servo/testing_commands.py | 5 +++-- tests/unit/gfx/Cargo.toml | 29 +++++++++++++++++++++++++++ tests/unit/lib.rs | 27 ------------------------- tests/unit/net/Cargo.toml | 32 ++++++++++++++++++++++++++++++ tests/unit/{ => script}/Cargo.toml | 22 ++------------------ tests/unit/style/Cargo.toml | 26 ++++++++++++++++++++++++ tests/unit/util/Cargo.toml | 29 +++++++++++++++++++++++++++ 8 files changed, 135 insertions(+), 51 deletions(-) create mode 100644 tests/unit/gfx/Cargo.toml delete mode 100644 tests/unit/lib.rs create mode 100644 tests/unit/net/Cargo.toml rename tests/unit/{ => script}/Cargo.toml (61%) create mode 100644 tests/unit/style/Cargo.toml create mode 100644 tests/unit/util/Cargo.toml diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index f8d3fa3aa3e..24ab504b303 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -16,8 +16,20 @@ test = false doc = false bench = false -[dev-dependencies.unit_tests] -path = "../../tests/unit" +[dev-dependencies.gfx_tests] +path = "../../tests/unit/gfx" + +[dev-dependencies.net_tests] +path = "../../tests/unit/net" + +[dev-dependencies.script_tests] +path = "../../tests/unit/script" + +[dev-dependencies.style_tests] +path = "../../tests/unit/style" + +[dev-dependencies.util_tests] +path = "../../tests/unit/util" [[test]] name = "reftest" diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index b93d3689700..62f4f213fbf 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -110,8 +110,9 @@ class MachCommands(CommandBase): self.ensure_bootstrapped() return 0 != subprocess.call( - ["cargo", "test", "-p", "unit_tests"] - + test_name, env=self.build_env(), cwd=self.servo_crate()) + ["cargo", "test", "-p", "gfx_tests", "net_tests", "script_tests", + "style_tests", "util_tests"] + test_name, + env=self.build_env(), cwd=self.servo_crate()) @Command('test-ref', description='Run the reference tests', diff --git a/tests/unit/gfx/Cargo.toml b/tests/unit/gfx/Cargo.toml new file mode 100644 index 00000000000..2817c0dc7a8 --- /dev/null +++ b/tests/unit/gfx/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "gfx_tests" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "gfx_tests" +path = "lib.rs" +doctest = false + +[dependencies.gfx] +path = "../../components/gfx" + +[dependencies.profile] +path = "../../components/profile" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" + +[dependencies.string_cache_plugin] +git = "https://github.com/servo/string-cache" + +[dependencies] +cookie = "*" +url = "*" +hyper = "0.3" diff --git a/tests/unit/lib.rs b/tests/unit/lib.rs deleted file mode 100644 index 05542a17840..00000000000 --- a/tests/unit/lib.rs +++ /dev/null @@ -1,27 +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/. */ - -#![feature(plugin)] -#![cfg_attr(test, feature(net, alloc, path, io))] - -#![plugin(string_cache_plugin)] - -extern crate cssparser; -extern crate geom; -extern crate gfx; -extern crate net; -extern crate net_traits; -extern crate profile; -extern crate script; -extern crate selectors; -extern crate string_cache; -extern crate style; -extern crate util; -extern crate url; - -#[cfg(test)] #[path="gfx/mod.rs"] mod gfx_tests; -#[cfg(test)] #[path="net/mod.rs"] mod net_tests; -#[cfg(test)] #[path="script/mod.rs"] mod script_tests; -#[cfg(test)] #[path="style/mod.rs"] mod style_tests; -#[cfg(test)] #[path="util/mod.rs"] mod util_tests; diff --git a/tests/unit/net/Cargo.toml b/tests/unit/net/Cargo.toml new file mode 100644 index 00000000000..ac655c9941b --- /dev/null +++ b/tests/unit/net/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "net_tests" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "net_tests" +path = "lib.rs" +doctest = false + +[dependencies.net] +path = "../../components/net" + +[dependencies.net_traits] +path = "../../components/net_traits" + +[dependencies.cssparser] +git = "https://github.com/servo/rust-cssparser" + +[dependencies.selectors] +git = "https://github.com/servo/rust-selectors" + +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" + +[dependencies.string_cache_plugin] +git = "https://github.com/servo/string-cache" + +[dependencies] +cookie = "*" +url = "*" +hyper = "0.3" diff --git a/tests/unit/Cargo.toml b/tests/unit/script/Cargo.toml similarity index 61% rename from tests/unit/Cargo.toml rename to tests/unit/script/Cargo.toml index 3c3c80a3e4b..ee219fab74e 100644 --- a/tests/unit/Cargo.toml +++ b/tests/unit/script/Cargo.toml @@ -1,31 +1,13 @@ [package] -name = "unit_tests" +name = "script_tests" version = "0.0.1" authors = ["The Servo Project Developers"] [lib] -name = "unit_tests" +name = "script_tests" path = "lib.rs" doctest = false -[dependencies.util] -path = "../../components/util" - -[dependencies.gfx] -path = "../../components/gfx" - -[dependencies.net] -path = "../../components/net" - -[dependencies.net_traits] -path = "../../components/net_traits" - -[dependencies.profile] -path = "../../components/profile" - -[dependencies.style] -path = "../../components/style" - [dependencies.script] path = "../../components/script" diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml new file mode 100644 index 00000000000..fbebb5e5a94 --- /dev/null +++ b/tests/unit/style/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "style_tests" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "style_tests" +path = "lib.rs" +doctest = false + +[dependencies.script] +path = "../../components/script" + +[dependencies.selectors] +git = "https://github.com/servo/rust-selectors" + +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" + +[dependencies.string_cache_plugin] +git = "https://github.com/servo/string-cache" + +[dependencies] +cookie = "*" +url = "*" +hyper = "0.3" diff --git a/tests/unit/util/Cargo.toml b/tests/unit/util/Cargo.toml new file mode 100644 index 00000000000..af6dcd23f63 --- /dev/null +++ b/tests/unit/util/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "util_tests" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +[lib] +name = "util_tests" +path = "lib.rs" +doctest = false + +[dependencies.util] +path = "../../components/util" + +[dependencies.cssparser] +git = "https://github.com/servo/rust-cssparser" + +[dependencies.selectors] +git = "https://github.com/servo/rust-selectors" + +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" + +[dependencies.string_cache_plugin] +git = "https://github.com/servo/string-cache" + +[dependencies] +cookie = "*" +url = "*" +hyper = "0.3" From ce1f2bab7bdc12ed3ff2b0d96f0000a8d478586b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 21 Apr 2015 18:24:11 +0200 Subject: [PATCH 2/2] Fix up the splitting of the unit tests crate. Closes #5707. (Includes a rebase of it.) Fixes #5688. --- components/servo/Cargo.lock | 76 ++++++++++++++++------- python/servo/testing_commands.py | 18 ++++-- tests/unit/gfx/Cargo.toml | 19 +----- tests/unit/gfx/{mod.rs => lib.rs} | 4 +- tests/unit/net/Cargo.toml | 20 +++--- tests/unit/net/lib.rs | 17 +++++ tests/unit/net/mime_classifier.rs | 4 +- tests/unit/script/Cargo.toml | 22 +------ tests/unit/{net/mod.rs => script/lib.rs} | 9 ++- tests/unit/style/Cargo.toml | 25 +++++--- tests/unit/style/lib.rs | 28 +++++++++ tests/unit/style/mod.rs | 16 ----- tests/unit/util/Cargo.toml | 20 +----- tests/unit/{script/mod.rs => util/lib.rs} | 9 ++- tests/unit/util/mod.rs | 8 --- 15 files changed, 156 insertions(+), 139 deletions(-) rename tests/unit/gfx/{mod.rs => lib.rs} (81%) create mode 100644 tests/unit/net/lib.rs rename tests/unit/{net/mod.rs => script/lib.rs} (65%) create mode 100644 tests/unit/style/lib.rs delete mode 100644 tests/unit/style/mod.rs rename tests/unit/{script/mod.rs => util/lib.rs} (59%) delete mode 100644 tests/unit/util/mod.rs diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 21b1955664d..a984dcf45a4 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -8,18 +8,22 @@ dependencies = [ "devtools 0.0.1", "devtools_traits 0.0.1", "gfx 0.0.1", + "gfx_tests 0.0.1", "glutin_app 0.0.1", "layout 0.0.1", "msg 0.0.1", "net 0.0.1", + "net_tests 0.0.1", "net_traits 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", "profile 0.0.1", "script 0.0.1", + "script_tests 0.0.1", + "style_tests 0.0.1", "time 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "unit_tests 0.0.1", "url 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "util_tests 0.0.1", "webdriver_server 0.0.1", ] @@ -346,6 +350,13 @@ dependencies = [ "util 0.0.1", ] +[[package]] +name = "gfx_tests" +version = "0.0.1" +dependencies = [ + "gfx 0.0.1", +] + [[package]] name = "gl_common" version = "0.0.4" @@ -661,6 +672,19 @@ dependencies = [ "util 0.0.1", ] +[[package]] +name = "net_tests" +version = "0.0.1" +dependencies = [ + "cookie 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "net 0.0.1", + "net_traits 0.0.1", + "profile 0.0.1", + "url 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "util 0.0.1", +] + [[package]] name = "net_traits" version = "0.0.1" @@ -824,6 +848,13 @@ dependencies = [ "uuid 0.1.11 (git+https://github.com/rust-lang/uuid)", ] +[[package]] +name = "script_tests" +version = "0.0.1" +dependencies = [ + "script 0.0.1", +] + [[package]] name = "script_traits" version = "0.0.1" @@ -905,6 +936,20 @@ dependencies = [ "util 0.0.1", ] +[[package]] +name = "style_tests" +version = "0.0.1" +dependencies = [ + "cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)", + "geom 0.1.0 (git+https://github.com/servo/rust-geom)", + "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", + "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", + "string_cache_plugin 0.0.0 (git+https://github.com/servo/string-cache)", + "style 0.0.1", + "url 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "util 0.0.1", +] + [[package]] name = "task_info" version = "0.0.1" @@ -928,27 +973,6 @@ name = "unicase" version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unit_tests" -version = "0.0.1" -dependencies = [ - "cookie 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.2.0 (git+https://github.com/servo/rust-cssparser)", - "geom 0.1.0 (git+https://github.com/servo/rust-geom)", - "gfx 0.0.1", - "hyper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "net 0.0.1", - "net_traits 0.0.1", - "profile 0.0.1", - "script 0.0.1", - "selectors 0.1.0 (git+https://github.com/servo/rust-selectors)", - "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", - "string_cache_plugin 0.0.0 (git+https://github.com/servo/string-cache)", - "style 0.0.1", - "url 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "util 0.0.1", -] - [[package]] name = "url" version = "0.2.23" @@ -987,6 +1011,14 @@ dependencies = [ "time 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "util_tests" +version = "0.0.1" +dependencies = [ + "geom 0.1.0 (git+https://github.com/servo/rust-geom)", + "util 0.0.1", +] + [[package]] name = "uuid" version = "0.1.11" diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 62f4f213fbf..81361b0081f 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -101,18 +101,26 @@ class MachCommands(CommandBase): @Command('test-unit', description='Run unit tests', category='testing') + @CommandArgument('--package', '-p', default=None, help="Specific package to test") @CommandArgument('test_name', nargs=argparse.REMAINDER, help="Only run tests that match this pattern") - def test_unit(self, test_name=None, component=None, package=None): + def test_unit(self, test_name=None, package=None): if test_name is None: test_name = [] self.ensure_bootstrapped() - return 0 != subprocess.call( - ["cargo", "test", "-p", "gfx_tests", "net_tests", "script_tests", - "style_tests", "util_tests"] + test_name, - env=self.build_env(), cwd=self.servo_crate()) + if package: + packages = [package] + else: + packages = os.listdir(path.join(self.context.topdir, "tests", "unit")) + + for crate in packages: + result = subprocess.call( + ["cargo", "test", "-p", "%s_tests" % crate] + test_name, + env=self.build_env(), cwd=self.servo_crate()) + if result != 0: + return result @Command('test-ref', description='Run the reference tests', diff --git a/tests/unit/gfx/Cargo.toml b/tests/unit/gfx/Cargo.toml index 2817c0dc7a8..24e43ff3def 100644 --- a/tests/unit/gfx/Cargo.toml +++ b/tests/unit/gfx/Cargo.toml @@ -9,21 +9,4 @@ path = "lib.rs" doctest = false [dependencies.gfx] -path = "../../components/gfx" - -[dependencies.profile] -path = "../../components/profile" - -[dependencies.geom] -git = "https://github.com/servo/rust-geom" - -[dependencies.string_cache] -git = "https://github.com/servo/string-cache" - -[dependencies.string_cache_plugin] -git = "https://github.com/servo/string-cache" - -[dependencies] -cookie = "*" -url = "*" -hyper = "0.3" +path = "../../../components/gfx" diff --git a/tests/unit/gfx/mod.rs b/tests/unit/gfx/lib.rs similarity index 81% rename from tests/unit/gfx/mod.rs rename to tests/unit/gfx/lib.rs index 4d160f2a8dc..9a5040b6fe1 100644 --- a/tests/unit/gfx/mod.rs +++ b/tests/unit/gfx/lib.rs @@ -2,4 +2,6 @@ * 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/. */ -mod text_util; +extern crate gfx; + +#[cfg(test)] mod text_util; diff --git a/tests/unit/net/Cargo.toml b/tests/unit/net/Cargo.toml index ac655c9941b..390d6f8ba01 100644 --- a/tests/unit/net/Cargo.toml +++ b/tests/unit/net/Cargo.toml @@ -9,24 +9,18 @@ path = "lib.rs" doctest = false [dependencies.net] -path = "../../components/net" +path = "../../../components/net" [dependencies.net_traits] -path = "../../components/net_traits" +path = "../../../components/net_traits" -[dependencies.cssparser] -git = "https://github.com/servo/rust-cssparser" +[dependencies.profile] +path = "../../../components/profile" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - -[dependencies.string_cache] -git = "https://github.com/servo/string-cache" - -[dependencies.string_cache_plugin] -git = "https://github.com/servo/string-cache" +[dependencies.util] +path = "../../../components/util" [dependencies] cookie = "*" +hyper = "*" url = "*" -hyper = "0.3" diff --git a/tests/unit/net/lib.rs b/tests/unit/net/lib.rs new file mode 100644 index 00000000000..d38edca2617 --- /dev/null +++ b/tests/unit/net/lib.rs @@ -0,0 +1,17 @@ +/* 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/. */ + +#![cfg_attr(test, feature(net, alloc, path, io))] + +extern crate net; +extern crate net_traits; +extern crate profile; +extern crate url; +extern crate util; + +#[cfg(test)] mod cookie; +#[cfg(test)] mod data_loader; +#[cfg(test)] mod image_cache_task; +#[cfg(test)] mod mime_classifier; +#[cfg(test)] mod resource_task; diff --git a/tests/unit/net/mime_classifier.rs b/tests/unit/net/mime_classifier.rs index e56e76d1cb3..8bba57290c5 100644 --- a/tests/unit/net/mime_classifier.rs +++ b/tests/unit/net/mime_classifier.rs @@ -23,7 +23,7 @@ fn read_file(path: &path::Path) -> io::Result> { fn test_sniff_mp4_matcher() { let matcher = Mp4Matcher; - let p = PathBuf::new("../../tests/unit/net/parsable_mime/video/mp4/test.mp4"); + let p = PathBuf::new("parsable_mime/video/mp4/test.mp4"); let read_result = read_file(&p); match read_result { @@ -43,7 +43,7 @@ fn test_sniff_full(filename_orig: &path::Path,type_string: &str,subtype_string: let current_working_directory = env::current_dir().unwrap(); println!("The current directory is {}", current_working_directory.display()); - let mut filename = PathBuf::new("../../tests/unit/net/parsable_mime/"); + let mut filename = PathBuf::new("parsable_mime/"); filename.push(filename_orig); let classifier = MIMEClassifier::new(); diff --git a/tests/unit/script/Cargo.toml b/tests/unit/script/Cargo.toml index ee219fab74e..759e0581545 100644 --- a/tests/unit/script/Cargo.toml +++ b/tests/unit/script/Cargo.toml @@ -9,24 +9,4 @@ path = "lib.rs" doctest = false [dependencies.script] -path = "../../components/script" - -[dependencies.geom] -git = "https://github.com/servo/rust-geom" - -[dependencies.cssparser] -git = "https://github.com/servo/rust-cssparser" - -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - -[dependencies.string_cache] -git = "https://github.com/servo/string-cache" - -[dependencies.string_cache_plugin] -git = "https://github.com/servo/string-cache" - -[dependencies] -cookie = "*" -url = "*" -hyper = "0.3" +path = "../../../components/script" diff --git a/tests/unit/net/mod.rs b/tests/unit/script/lib.rs similarity index 65% rename from tests/unit/net/mod.rs rename to tests/unit/script/lib.rs index 0d304270422..3073fcb8588 100644 --- a/tests/unit/net/mod.rs +++ b/tests/unit/script/lib.rs @@ -2,8 +2,7 @@ * 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/. */ -mod cookie; -mod data_loader; -mod image_cache_task; -mod mime_classifier; -mod resource_task; +extern crate script; + +#[cfg(all(test, target_pointer_width = "64"))] mod size_of; +#[cfg(test)] mod textinput; diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index fbebb5e5a94..64e34f2bd03 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -8,19 +8,26 @@ name = "style_tests" path = "lib.rs" doctest = false -[dependencies.script] -path = "../../components/script" +[dependencies.style] +path = "../../../components/style" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - -[dependencies.string_cache] -git = "https://github.com/servo/string-cache" +[dependencies.util] +path = "../../../components/util" [dependencies.string_cache_plugin] git = "https://github.com/servo/string-cache" +[dependencies.string_cache] +git = "https://github.com/servo/string-cache" + +[dependencies.geom] +git = "https://github.com/servo/rust-geom" + +[dependencies.selectors] +git = "https://github.com/servo/rust-selectors" + +[dependencies.cssparser] +git = "https://github.com/servo/rust-cssparser" + [dependencies] -cookie = "*" url = "*" -hyper = "0.3" diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs new file mode 100644 index 00000000000..9e379d1336b --- /dev/null +++ b/tests/unit/style/lib.rs @@ -0,0 +1,28 @@ +/* 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/. */ + +#![feature(plugin)] +#![plugin(string_cache_plugin)] + +extern crate cssparser; +extern crate geom; +extern crate selectors; +extern crate string_cache; +extern crate style; +extern crate url; +extern crate util; + + +#[cfg(test)] mod stylesheets; +#[cfg(test)] mod media_queries; + +#[cfg(test)] mod writing_modes { + use util::logical_geometry::WritingMode; + use style::properties::{INITIAL_VALUES, get_writing_mode}; + + #[test] + fn initial_writing_mode_is_empty() { + assert_eq!(get_writing_mode(INITIAL_VALUES.get_inheritedbox()), WritingMode::empty()) + } +} diff --git a/tests/unit/style/mod.rs b/tests/unit/style/mod.rs deleted file mode 100644 index a2af201f7c3..00000000000 --- a/tests/unit/style/mod.rs +++ /dev/null @@ -1,16 +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/. */ - -use util::logical_geometry::WritingMode; -use style::properties::{INITIAL_VALUES, get_writing_mode}; - - -mod stylesheets; -mod media_queries; - - -#[test] -fn initial_writing_mode_is_empty() { - assert_eq!(get_writing_mode(INITIAL_VALUES.get_inheritedbox()), WritingMode::empty()) -} diff --git a/tests/unit/util/Cargo.toml b/tests/unit/util/Cargo.toml index af6dcd23f63..48df1b5aedb 100644 --- a/tests/unit/util/Cargo.toml +++ b/tests/unit/util/Cargo.toml @@ -9,21 +9,7 @@ path = "lib.rs" doctest = false [dependencies.util] -path = "../../components/util" +path = "../../../components/util" -[dependencies.cssparser] -git = "https://github.com/servo/rust-cssparser" - -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - -[dependencies.string_cache] -git = "https://github.com/servo/string-cache" - -[dependencies.string_cache_plugin] -git = "https://github.com/servo/string-cache" - -[dependencies] -cookie = "*" -url = "*" -hyper = "0.3" +[dependencies.geom] +git = "https://github.com/servo/rust-geom" diff --git a/tests/unit/script/mod.rs b/tests/unit/util/lib.rs similarity index 59% rename from tests/unit/script/mod.rs rename to tests/unit/util/lib.rs index 1631a9adc8c..07ce741d972 100644 --- a/tests/unit/script/mod.rs +++ b/tests/unit/util/lib.rs @@ -2,5 +2,10 @@ * 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(target_pointer_width = "64")] mod size_of; -mod textinput; +extern crate util; +extern crate geom; + +#[cfg(test)] mod cache; +#[cfg(test)] mod logical_geometry; +#[cfg(test)] mod task; +#[cfg(test)] mod vec; diff --git a/tests/unit/util/mod.rs b/tests/unit/util/mod.rs deleted file mode 100644 index 756af732b67..00000000000 --- a/tests/unit/util/mod.rs +++ /dev/null @@ -1,8 +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/. */ - -mod cache; -mod logical_geometry; -mod task; -mod vec;