diff options
| author | acdenisSK <[email protected]> | 2017-07-27 06:42:48 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-27 07:30:23 +0200 |
| commit | 550030264952f0e0043b63f4582bb817ef8bbf37 (patch) | |
| tree | b921e2f78fd603a5ca671623083a32806fd16090 /tests/test_parsers.rs | |
| parent | Use a consistent indentation style (diff) | |
| download | serenity-550030264952f0e0043b63f4582bb817ef8bbf37.tar.xz serenity-550030264952f0e0043b63f4582bb817ef8bbf37.zip | |
rustfmt
Diffstat (limited to 'tests/test_parsers.rs')
| -rw-r--r-- | tests/test_parsers.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test_parsers.rs b/tests/test_parsers.rs index 7823ccb..e9d3d39 100644 --- a/tests/test_parsers.rs +++ b/tests/test_parsers.rs @@ -1,4 +1,4 @@ -#![cfg(feature="utils")] +#![cfg(feature = "utils")] extern crate serenity; @@ -6,36 +6,36 @@ use serenity::utils::*; #[test] fn invite_parser() { - assert_eq!(parse_invite("https://discord.gg/abc"), "abc"); - assert_eq!(parse_invite("http://discord.gg/abc"), "abc"); - assert_eq!(parse_invite("discord.gg/abc"), "abc"); + assert_eq!(parse_invite("https://discord.gg/abc"), "abc"); + assert_eq!(parse_invite("http://discord.gg/abc"), "abc"); + assert_eq!(parse_invite("discord.gg/abc"), "abc"); } #[test] fn username_parser() { - assert_eq!(parse_username("<@12345>").unwrap(), 12345); - assert_eq!(parse_username("<@!12345>").unwrap(), 12345); + assert_eq!(parse_username("<@12345>").unwrap(), 12345); + assert_eq!(parse_username("<@!12345>").unwrap(), 12345); } #[test] fn role_parser() { - assert_eq!(parse_role("<@&12345>").unwrap(), 12345); + assert_eq!(parse_role("<@&12345>").unwrap(), 12345); } #[test] fn channel_parser() { - assert_eq!(parse_channel("<#12345>").unwrap(), 12345); + assert_eq!(parse_channel("<#12345>").unwrap(), 12345); } #[test] fn emoji_parser() { - let emoji = parse_emoji("<:name:12345>").unwrap(); - assert_eq!(emoji.name, "name"); - assert_eq!(emoji.id, 12345); + let emoji = parse_emoji("<:name:12345>").unwrap(); + assert_eq!(emoji.name, "name"); + assert_eq!(emoji.id, 12345); } #[test] fn quote_parser() { - let parsed = parse_quotes("a \"b c\" d\"e f\" g"); - assert_eq!(parsed, ["a", "b c", "d", "e f", "g"]); + let parsed = parse_quotes("a \"b c\" d\"e f\" g"); + assert_eq!(parsed, ["a", "b c", "d", "e f", "g"]); } |