Explorar o código

Rename test crates.

Simon Sapin %!s(int64=10) %!d(string=hai) anos
pai
achega
0cd4d36805
Modificáronse 3 ficheiros con 6 adicións e 3 borrados
  1. 2 2
      Cargo.toml
  2. 2 1
      tests/data.rs
  3. 2 0
      tests/unit.rs

+ 2 - 2
Cargo.toml

@@ -12,10 +12,10 @@ keywords = ["url", "parser"]
 license = "MIT/Apache-2.0"
 license = "MIT/Apache-2.0"
 
 
 [[test]]
 [[test]]
-name = "tests"
+name = "unit"
 
 
 [[test]]
 [[test]]
-name = "wpt"
+name = "data"
 harness = false
 harness = false
 
 
 [lib]
 [lib]

+ 2 - 1
tests/wpt.rs → tests/data.rs

@@ -6,7 +6,7 @@
 // option. This file may not be copied, modified, or distributed
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 // except according to those terms.
 
 
-//! Tests copied form https://github.com/w3c/web-platform-tests/blob/master/url/
+//! Data-driven tests
 
 
 extern crate rustc_serialize;
 extern crate rustc_serialize;
 extern crate test;
 extern crate test;
@@ -79,6 +79,7 @@ struct TestCase {
 }
 }
 
 
 fn main() {
 fn main() {
+    // Copied form https://github.com/w3c/web-platform-tests/blob/master/url/
     let json = Json::from_str(include_str!("urltestdata.json"))
     let json = Json::from_str(include_str!("urltestdata.json"))
         .expect("JSON parse error in urltestdata.json");
         .expect("JSON parse error in urltestdata.json");
     let tests = json.as_array().unwrap().iter().filter_map(|entry| {
     let tests = json.as_array().unwrap().iter().filter_map(|entry| {

+ 2 - 0
tests/tests.rs → tests/unit.rs

@@ -6,6 +6,8 @@
 // option. This file may not be copied, modified, or distributed
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 // except according to those terms.
 
 
+//! Unit tests
+
 extern crate url;
 extern crate url;
 
 
 use std::borrow::Cow;
 use std::borrow::Cow;