diff --git a/README.tpl b/README.tpl deleted file mode 100644 index 259d24202..000000000 --- a/README.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{crate}} ---------- - -[![Latest Version](https://img.shields.io/crates/v/uuid.svg)](https://crates.io/crates/uuid) -[![Join the chat at https://gitter.im/uuid-rs/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/uuid-rs/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge) -![Minimum rustc version](https://img.shields.io/badge/rustc-1.34.0+-yellow.svg) -{{badges}} - ---- - -{{readme}} - -[`Uuid`]: https://docs.rs/uuid/{{version}}/uuid/struct.Uuid.html - ---- -# License - -Licensed under either of - -* Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0) -* MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT) - -at your option. - -## Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in the work by you, as defined in the Apache-2.0 license, shall -be dual licensed as above, without any additional terms or conditions. diff --git a/benches/parse_str.rs b/benches/parse_str.rs index 7726c5744..e53ba242d 100644 --- a/benches/parse_str.rs +++ b/benches/parse_str.rs @@ -48,12 +48,3 @@ fn parse_invalid_group_len(b: &mut Bencher) { fn parse_invalid_groups(b: &mut Bencher) { b.iter(|| Uuid::parse_str("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4")); } - -#[cfg(feature = "macros")] -#[test] -fn test_valid_macro() { - let t = trybuild::TestCases::new(); - t.pass("benches/macros/valid_parse.rs"); - t.pass("benches/macros/renamed.rs"); - t.compile_fail("benches/macros/invalid_parse.rs"); -} diff --git a/bors.toml b/bors.toml deleted file mode 100644 index 713ea9b95..000000000 --- a/bors.toml +++ /dev/null @@ -1,3 +0,0 @@ -status = [ - "continuous-integration/travis-ci/push", -] diff --git a/tests/macros.rs b/tests/macros.rs new file mode 100644 index 000000000..cdb8ee571 --- /dev/null +++ b/tests/macros.rs @@ -0,0 +1,7 @@ +#[cfg(feature = "macros")] +#[test] +fn ui() { + let t = trybuild::TestCases::new(); + t.pass("tests/ui/compile_pass/*.rs"); + t.compile_fail("tests/ui/compile_fail/*.rs"); +} diff --git a/tests/ui/compile_fail.stderr b/tests/ui/compile_fail.stderr new file mode 100644 index 000000000..9f499ac5b --- /dev/null +++ b/tests/ui/compile_fail.stderr @@ -0,0 +1 @@ +error: couldn't read $DIR/tests/ui/compile_fail: Is a directory (os error 21) diff --git a/benches/macros/invalid_parse.rs b/tests/ui/compile_fail/invalid_parse.rs similarity index 98% rename from benches/macros/invalid_parse.rs rename to tests/ui/compile_fail/invalid_parse.rs index 1f4330f09..57beb4621 100644 --- a/benches/macros/invalid_parse.rs +++ b/tests/ui/compile_fail/invalid_parse.rs @@ -26,4 +26,4 @@ const _: Uuid = uuid!("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"); const _: Uuid = uuid!("01020304-1112-2122-3132-41424344"); const _: Uuid = uuid!("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"); -fn main() {} \ No newline at end of file +fn main() {} diff --git a/benches/macros/invalid_parse.stderr b/tests/ui/compile_fail/invalid_parse.stderr similarity index 79% rename from benches/macros/invalid_parse.stderr rename to tests/ui/compile_fail/invalid_parse.stderr index 563d2aa43..44882d3fa 100644 --- a/benches/macros/invalid_parse.stderr +++ b/tests/ui/compile_fail/invalid_parse.stderr @@ -1,125 +1,125 @@ error: invalid length: expected one of [36, 32], found 0 - --> benches/macros/invalid_parse.rs:3:23 + --> tests/ui/compile_fail/invalid_parse.rs:3:23 | 3 | const _: Uuid = uuid!(""); | ^^ error: invalid length: expected one of [36, 32], found 1 - --> benches/macros/invalid_parse.rs:4:23 + --> tests/ui/compile_fail/invalid_parse.rs:4:23 | 4 | const _: Uuid = uuid!("!"); | ^^^ error: invalid length: expected one of [36, 32], found 37 - --> benches/macros/invalid_parse.rs:5:23 + --> tests/ui/compile_fail/invalid_parse.rs:5:23 | 5 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E45"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid length: expected one of [36, 32], found 35 - --> benches/macros/invalid_parse.rs:6:23 + --> tests/ui/compile_fail/invalid_parse.rs:6:23 | 6 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-BBF-329BF39FA1E4"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found G at 20 - --> benches/macros/invalid_parse.rs:7:44 + --> tests/ui/compile_fail/invalid_parse.rs:7:44 | 7 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"); | ^ error: invalid number of groups: expected one of [1, 5], found 4 - --> benches/macros/invalid_parse.rs:8:23 + --> tests/ui/compile_fail/invalid_parse.rs:8:23 | 8 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid length: expected one of [36, 32], found 18 - --> benches/macros/invalid_parse.rs:9:23 + --> tests/ui/compile_fail/invalid_parse.rs:9:23 | 9 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa"); | ^^^^^^^^^^^^^^^^^^^^ error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found X at 18 - --> benches/macros/invalid_parse.rs:10:42 + --> tests/ui/compile_fail/invalid_parse.rs:10:42 | 10 | const _: Uuid = uuid!("F9168C5E-CEB2-4faaXB6BFF329BF39FA1E4"); | ^ error: invalid group length: expected 4, found 3 in group 1 - --> benches/macros/invalid_parse.rs:11:33 + --> tests/ui/compile_fail/invalid_parse.rs:11:33 | 11 | const _: Uuid = uuid!("F9168C5E-CEB-24fa-eB6BFF32-BF39FA1E4"); | ^^^ error: invalid group length: expected 12, found 8 in group 4 - --> benches/macros/invalid_parse.rs:12:48 + --> tests/ui/compile_fail/invalid_parse.rs:12:48 | 12 | const _: Uuid = uuid!("01020304-1112-2122-3132-41424344"); | ^^^^^^^^ error: invalid length: expected one of [36, 32], found 33 - --> benches/macros/invalid_parse.rs:13:23 + --> tests/ui/compile_fail/invalid_parse.rs:13:23 | 13 | const _: Uuid = uuid!("67e5504410b1426f9247bb680e5fe0c88"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid length: expected one of [36, 32], found 33 - --> benches/macros/invalid_parse.rs:14:23 + --> tests/ui/compile_fail/invalid_parse.rs:14:23 | 14 | const _: Uuid = uuid!("67e5504410b1426f9247bb680e5fe0cg8"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found % at 15 - --> benches/macros/invalid_parse.rs:15:39 + --> tests/ui/compile_fail/invalid_parse.rs:15:39 | 15 | const _: Uuid = uuid!("67e5504410b1426%9247bb680e5fe0c8"); | ^ error: invalid length: expected one of [36, 32], found 31 - --> benches/macros/invalid_parse.rs:18:23 + --> tests/ui/compile_fail/invalid_parse.rs:18:23 | 18 | const _: Uuid = uuid!("67e5504410b1426f9247bb680e5fe0c"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found X at 6 - --> benches/macros/invalid_parse.rs:19:30 + --> tests/ui/compile_fail/invalid_parse.rs:19:30 | 19 | const _: Uuid = uuid!("67e550X410b1426f9247bb680e5fe0cd"); | ^ error: invalid group length: expected 8, found 6 in group 0 - --> benches/macros/invalid_parse.rs:20:24 + --> tests/ui/compile_fail/invalid_parse.rs:20:24 | 20 | const _: Uuid = uuid!("67e550-4105b1426f9247bb680e5fe0c"); | ^^^^^^ error: invalid group length: expected 4, found 5 in group 3 - --> benches/macros/invalid_parse.rs:21:43 + --> tests/ui/compile_fail/invalid_parse.rs:21:43 | 21 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-B6BF1-02BF39FA1E4"); | ^^^^^ error: invalid length: expected one of [36, 32], found 35 - --> benches/macros/invalid_parse.rs:24:23 + --> tests/ui/compile_fail/invalid_parse.rs:24:23 | 24 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-BBF-329BF39FA1E4"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found G at 20 - --> benches/macros/invalid_parse.rs:25:44 + --> tests/ui/compile_fail/invalid_parse.rs:25:44 | 25 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"); | ^ error: invalid group length: expected 12, found 8 in group 4 - --> benches/macros/invalid_parse.rs:26:48 + --> tests/ui/compile_fail/invalid_parse.rs:26:48 | 26 | const _: Uuid = uuid!("01020304-1112-2122-3132-41424344"); | ^^^^^^^^ error: invalid number of groups: expected one of [1, 5], found 4 - --> benches/macros/invalid_parse.rs:27:23 + --> tests/ui/compile_fail/invalid_parse.rs:27:23 | 27 | const _: Uuid = uuid!("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/benches/macros/renamed.rs b/tests/ui/compile_pass/renamed.rs similarity index 100% rename from benches/macros/renamed.rs rename to tests/ui/compile_pass/renamed.rs diff --git a/benches/macros/valid_parse.rs b/tests/ui/compile_pass/valid.rs similarity index 98% rename from benches/macros/valid_parse.rs rename to tests/ui/compile_pass/valid.rs index 31ab620cc..1f536dc04 100644 --- a/benches/macros/valid_parse.rs +++ b/tests/ui/compile_pass/valid.rs @@ -17,4 +17,4 @@ const _: Uuid = uuid!("67e55044-10b1-426f-9247-bb680e5fe0c8"); // valid short const _: Uuid = uuid!("67e5504410b1426f9247bb680e5fe0c8"); -fn main() {} \ No newline at end of file +fn main() {}