Skip to content

Commit c6e7e38

Browse files
committed
Using r#""# syntax for char unit tests
1 parent a3851a4 commit c6e7e38

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/de/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -937,18 +937,18 @@ mod tests {
937937

938938
#[test]
939939
fn char() {
940-
assert_eq!(crate::from_str("\"n\""), Ok(('n', 3)));
941-
assert_eq!(crate::from_str("\"\\\"\""), Ok(('"', 4)));
942-
assert_eq!(crate::from_str("\"\\\\\""), Ok(('\\', 4)));
943-
assert_eq!(crate::from_str("\"/\""), Ok(('/', 3)));
944-
assert_eq!(crate::from_str("\"\\b\""), Ok(('\x08', 4)));
945-
assert_eq!(crate::from_str("\"\\f\""), Ok(('\x0C', 4)));
946-
assert_eq!(crate::from_str("\"\\n\""), Ok(('\n', 4)));
947-
assert_eq!(crate::from_str("\"\\r\""), Ok(('\r', 4)));
948-
assert_eq!(crate::from_str("\"\\t\""), Ok(('\t', 4)));
949-
assert_eq!(crate::from_str("\"\\u000b\""), Ok(('\x0B', 8)));
950-
assert_eq!(crate::from_str("\"\\u000B\""), Ok(('\x0B', 8)));
951-
assert_eq!(crate::from_str("\"\u{3A3}\""), Ok(('\u{3A3}', 4)));
940+
assert_eq!(crate::from_str(r#""n""#), Ok(('n', 3)));
941+
assert_eq!(crate::from_str(r#""\"""#), Ok(('"', 4)));
942+
assert_eq!(crate::from_str(r#""\\""#), Ok(('\\', 4)));
943+
assert_eq!(crate::from_str(r#""/""#), Ok(('/', 3)));
944+
assert_eq!(crate::from_str(r#""\b""#), Ok(('\x08', 4)));
945+
assert_eq!(crate::from_str(r#""\f""#), Ok(('\x0C', 4)));
946+
assert_eq!(crate::from_str(r#""\n""#), Ok(('\n', 4)));
947+
assert_eq!(crate::from_str(r#""\r""#), Ok(('\r', 4)));
948+
assert_eq!(crate::from_str(r#""\t""#), Ok(('\t', 4)));
949+
assert_eq!(crate::from_str(r#""\u000b""#), Ok(('\x0B', 8)));
950+
assert_eq!(crate::from_str(r#""\u000B""#), Ok(('\x0B', 8)));
951+
assert_eq!(crate::from_str(r#""Σ""#), Ok(('Σ', 4)));
952952
}
953953

954954
#[test]

0 commit comments

Comments
 (0)