diff options
-rw-r--r-- | Cargo.lock | 7 | ||||
-rw-r--r-- | components/net_traits/Cargo.toml | 2 | ||||
-rw-r--r-- | components/net_traits/tests/image.rs (renamed from tests/unit/net_traits/image.rs) | 2 | ||||
-rw-r--r-- | components/net_traits/tests/pub_domains.rs (renamed from tests/unit/net_traits/pub_domains.rs) | 2 | ||||
-rw-r--r-- | components/net_traits/tests/whitespace.rs (renamed from tests/unit/net_traits/lib.rs) | 5 | ||||
-rw-r--r-- | python/servo/testing_commands.py | 2 | ||||
-rw-r--r-- | tests/unit/net_traits/Cargo.toml | 13 |
7 files changed, 7 insertions, 26 deletions
diff --git a/Cargo.lock b/Cargo.lock index 0c1218d2f7f..a20a0b57080 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1976,13 +1976,6 @@ dependencies = [ ] [[package]] -name = "net_traits_tests" -version = "0.0.1" -dependencies = [ - "net_traits 0.0.1", -] - -[[package]] name = "nodrop" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml index 82ca26c6b9c..eb1774c6106 100644 --- a/components/net_traits/Cargo.toml +++ b/components/net_traits/Cargo.toml @@ -8,6 +8,8 @@ publish = false [lib] name = "net_traits" path = "lib.rs" +test = false +doctest = false [dependencies] cookie = "0.10" diff --git a/tests/unit/net_traits/image.rs b/components/net_traits/tests/image.rs index e7d2d460d7e..238fae97050 100644 --- a/tests/unit/net_traits/image.rs +++ b/components/net_traits/tests/image.rs @@ -2,6 +2,8 @@ * 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/. */ +extern crate net_traits; + use net_traits::image::base::detect_image_format; #[test] diff --git a/tests/unit/net_traits/pub_domains.rs b/components/net_traits/tests/pub_domains.rs index d18ecb06e0c..36e70cd39a8 100644 --- a/tests/unit/net_traits/pub_domains.rs +++ b/components/net_traits/tests/pub_domains.rs @@ -2,6 +2,8 @@ * 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/. */ +extern crate net_traits; + use net_traits::pub_domains::{is_pub_domain, is_reg_domain, pub_suffix, reg_suffix}; // These tests may need to be updated if the PSL changes. diff --git a/tests/unit/net_traits/lib.rs b/components/net_traits/tests/whitespace.rs index 64135a6a2d4..4954e0f67f4 100644 --- a/tests/unit/net_traits/lib.rs +++ b/components/net_traits/tests/whitespace.rs @@ -2,13 +2,8 @@ * 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)] - extern crate net_traits; -mod image; -mod pub_domains; - #[test] fn test_trim_http_whitespace() { fn test_trim(in_: &[u8], out: &[u8]) { diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 907f6fa531b..0739501a42f 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -231,7 +231,7 @@ class MachCommands(CommandBase): else: test_patterns.append(test) - self_contained_tests = ["gfx", "layout", "msg", "net", "selectors"] + self_contained_tests = ["gfx", "layout", "msg", "net", "net_traits", "selectors"] if not packages: packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit"))) - set(['.DS_Store']) packages |= set(self_contained_tests) diff --git a/tests/unit/net_traits/Cargo.toml b/tests/unit/net_traits/Cargo.toml deleted file mode 100644 index 28da0a1d7c0..00000000000 --- a/tests/unit/net_traits/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "net_traits_tests" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" - -[lib] -name = "net_traits_tests" -path = "lib.rs" -doctest = false - -[dependencies] -net_traits = {path = "../../../components/net_traits"} |